Wizard.pm 0000644 0001761 0000162 00000001610 10752554023 014043 0 ustar 00ultranerds ultranerds # ==================================================================
# Auto Generated Plugin Configuration - Needed for Web Based Creator.
#
# Plugins::2007Design
# Author : Andy Newby
# Version : 1
# Updated : Thu Feb 7 02:06:53 2008
#
# ==================================================================
#
package Plugins::2007Design;
# ==================================================================
use strict;
use vars qw/$WIZARD/;
$WIZARD = {
'files' => [],
'hooks' => [],
'install' => '',
'install_code' => '',
'menu' => [],
'meta' => {
'author' => 'Andy Newby',
'description' => '2007 design',
'license' => 'Freeware',
'prog_ver' => '3.2.0',
'url' => 'http://www.ultranerds.com/',
'version' => '1'
},
'name' => '2007Design',
'uninstall' => '',
'uninstall_code' => '',
'user' => []
};
1;
Install.pm 0000644 0001761 0000162 00000014236 10752554075 014230 0 ustar 00ultranerds ultranerds # ==================================================================
# Plugins::2007Design - Auto Generated Install Module
#
# Plugins::2007Design
# Author : Andy Newby
# Version : 1
# Updated : Thu Feb 7 02:06:53 2008
#
# ==================================================================
#
package Plugins::2007Design;
# ==================================================================
use strict;
use vars qw/$VERSION $DEBUG $NAME $META/;
use GT::Base;
use GT::Plugins qw/STOP CONTINUE/;
use Links qw/:objects/;
$VERSION = '1';
$DEBUG = 0;
$NAME = '2007Design';
# Inhert from base class for debug and error methods
@Plugins::2007Design::ISA = qw(GT::Base);
$META = {
'author' => 'Andy Newby',
'description' => '2007 design',
'license' => 'Freeware',
'prog_ver' => '3.2.0',
'url' => 'http://www.ultranerds.com/',
'version' => '1'
};
sub pre_install {
# -----------------------------------------------------------------------------
# This function displays an HTML formatted message that will display any
# instructions/information to the user before they install the plugin.
#
my $inst_msg = qq~Please note, that you need to set the "default_template_set" option Setup > Build Options, to "2007" for this template set to show. Please see the "Readme" for more details. ~;
return $inst_msg;
}
sub pre_uninstall {
# -----------------------------------------------------------------------------
# This function displays an HTML formatted message that will display any
# instructions/information to the user before they remove the plugin.
#
my $uninst_msg = '';
return $uninst_msg;
}
sub install {
# -----------------------------------------------------------------------------
# This function does the actual installation. Its first argument is a plugin
# manager which you can use to register hooks, install files, add menu options,
# etc. The second argument is a GT::Tar object which you can use to access any
# files in your plugin module.
#
# You should return an HTML formatted string that will be displayed to the
# user.
#
# If there is an error, return undef, and set the error message in
# $Plugins::2007Design::error
#
my ($mgr, $tar) = @_;
# DO TEMPLATE STUFF
# make the template folder first.
my $folder_path = $CFG->{admin_root_path} . "/templates/2007";
mkdir( $folder_path );
system("mkdir $folder_path");
# Copying Templates.tar to $CFG->{admin_root_path}/.. directory.
$file = $tar->get_file ('2007.tar');
$file->name("$CFG->{admin_root_path}/2007.tar");
$file->write or return Plugins::2007Design->error("Unable to extract file: '$CFG->{admin_root_path}/2007.tar' ($GT::Tar::error)", 'WARN');
# open up the .tar file....
my $tar = GT::Tar->open("$CFG->{admin_root_path}/2007.tar") or die "Can't open: $GT::Tar::error";
# get a list of the files in the .tar, and write them one by one if .txt or.html.
my $files = $tar->files;
foreach my $file (@$files) {
my $name = $file->name;
#$name =~ s|\QphpAdsNew-2.0.7/||; # dont need that part of the folder really :)
# chmod, just in case we dont have default overwrite capabilities...
if (-e "$folder_path/$name") { chmod(0666,"$folder_path/$name"); }
$DEBUG ? print "Wrote template: $folder_path/$name
" : '';
$file->name( "$folder_path/$name" );
$file->write || die $GT::Tar::error . " on file: $name";
print "Wrote $name
";
}
my ($mgr, $tar) = @_;
# IMAGES AND CSS
# make the template folder first.
my $folder_path = $CFG->{build_static_path};
my $file;
# Copying Templates.tar to $CFG->{admin_root_path}/.. directory.
$file = $tar->get_file ('images.tar');
$file->name("$CFG->{admin_root_path}/images.tar");
$file->write or return Plugins::2007Design->error("Unable to extract file: '$CFG->{admin_root_path}/images.tar' ($GT::Tar::error)", 'WARN');
# open up the .tar file....
my $tar = GT::Tar->open("$CFG->{admin_root_path}/images.tar") or die "Can't open: $GT::Tar::error";
# get a list of the files in the .tar, and write them one by one if .txt or.html.
my $files = $tar->files;
foreach my $file (@$files) {
my $name = $file->name;
# chmod, just in case we dont have default overwrite capabilities...
if (-e "$folder_path/$name") { chmod(0666,"$folder_path/$name"); }
$DEBUG ? print "Wrote template: $folder_path/$name
" : '';
$file->name( "$folder_path/$name" );
$file->write || die $GT::Tar::error . " on file: $name";
print "Wrote $name
";
}
my ($mgr, $tar) = @_;
my @files;
my $files = $tar->files;
foreach my $file (@$files) {
my $html = $file->name;
if ($html !~ /\.html|\.eml/) { next; }
push @files, $html;
# if templates already exist... get rid of em!
if (-e "$CFG->{admin_root_path}/templates/2007/$html") { system("rm -f $CFG->{admin_root_path}/templates/2007/$html"); }
$file = $tar->get_file ($html);
$file->name("$CFG->{admin_root_path}/templates/2007/$html") or return Plugins::2007Design->error("Error: $GT::Tar::error");
unless ($file->write) {
last;
return Plugins::2007Design->error("Unable to extract file: '$CFG->{admin_root_path}/templates/2007/$html' ($GT::Tar::error)", 'WARN');
}
} # end 'for'
print "Extracted Templates... (" . join(",",@files) . ")
";
$mgr->install_menu ( '2007Design', [ ['Readme', 'admin.cgi?do=plugin&plugin=2007Design&func=Readme'] ] );
return "The plugin has been successfully installed!";
}
sub uninstall {
# -----------------------------------------------------------------------------
# This function removes the plugin. Its first argument is also a plugin
# manager which you can use to register hooks, install files, add menu options,
# etc. You should return an HTML formatted string that will be displayed to the
# user.
#
# If there is an error, return undef, and set the error message in
# $Plugins::2007Design::error
#
my $mgr = shift;
;
return "The plugin has been successfully removed!";
}
1;
2007Design.pm 0000644 0001761 0000162 00000013206 10752554075 014340 0 ustar 00ultranerds ultranerds # ==================================================================
# Plugins::2007Design - Auto Generated Program Module
#
# Plugins::2007Design
# Author : Andy Newby
# Version : 1
# Updated : Thu Feb 7 02:06:53 2008
#
# ==================================================================
#
package Plugins::2007Design;
# ==================================================================
use strict;
use GT::Base;
use GT::Plugins qw/STOP CONTINUE/;
use Links qw/:objects/;
# Inherit from base class for debug and error methods
@Plugins::2007Design::ISA = qw(GT::Base);
# Your code begins here.
sub Readme {
print $IN->header();
print q~
2007 Template Set Readme
Version: 1.0
Release Date: 11th Feb 2008
Author: Andy Newby (Ultranerds.com)
This plugin installs a pre-made template set, ready for use on your Gossamer Links site. All you have to do, is edit a couple of globals in Build > Template Globals
The main requirements are as follows:
All the template are compiled of the following format:
include_header.html
main content
include_footer.html
The main content of the header and footer is in include_header.html (due to it being a CSS design, so most of the design stuff is done by div 'ids')
There are also a couple of globals you need to edit, to fit your site (i.e "copyright" and the "side_advert_code" ones)
That's pretty much it =)
If you have any problems with this plugin, you can use either of the following methods to get support;
Ultranerds.com, All Rights Reserved. 2002-2008. A division of PUGDOG Enterprises
~; } # Always end with a 1. 1; 2007.tar 0000644 0001761 0000162 00001130000 10754545140 013344 0 ustar 00ultranerds ultranerds add.html 0000644 0001761 0000162 00000002167 10752552014 013631 0 ustar ultranerds ultranerdsPlease completely fill out the form, and we'll add your link as soon as possible.
<%include include_footer.html%>