|
||
The Photo GalleryThe Photo Gallery Script is the first Nightmedia commercial script. It retails $499 which includes install help. If you pay by PayPal, please use Paypal: After submitting the payment, please send us an email with the ftp access
data to your site, and a way for us to contact you for the installations
particularities. We are aware that there are similar products on the market, with more fancy, but keep in mind that this project was started a month ago, and features will be added as we go. The Shop was not bigger than that, when it began less than 2 years ago. the admin user / pw is "admin" Installing the scriptIt installs like any other basic cgi script, but has one prerequisite: Image::Magick - needs to be installed on the server. The Perl part of the program can be installed from CPAN, it is not the only thing that makes it tick though. The package has a binary part that eventually needs to be compiled to your OS. We can help install it, and we require for that shell access to the system you are installing it to. We tried to make the install simple, although due to the way it operates we recommend to take advantage of our install assistance, since it might open severe security issues if installed improperly. The first thing to change is the first line of script, and of course, the script path, in the BEGIN block. This has to be set to the root path of the script: $BaseDir = 'w:/cgi/city/gallery';
Then, you need to edit the Library/This.pm and configure the basic data: my $BaseDir = $UseModPerl ? '/mod-cgi/gallery' : '/cgi-bin/gallery'; my $ScriptURL = $BaseDir.'/gallery.cgi'; my $DataPath = './Data'; my $SessionPath = './Sessions'; my $DefTemplate = './Source/default/template.html'; my $AdminMail = 'office@nightmedia.net'; my $UseCookies = 1; my $CookieDomain = '.snowcrest.net'; my $ValidBasePath = [( 'w:/http/city/', )]; The $BaseDir is the aliased directory for the script, depending whether you are using mod_perl or not. Even if you are using only mod_perl, be aware that you will need the standard mode when you are customizing the script template package. Mod_perl loads everything in memory, and the only way you will see your changes is if you restart the web server. $ScriptURL is the script URL, excluding the domain path. It is used for the form tags, and of course, to build the links throughout the shop. If you change your script name from .cgi to .pl, or choose an entirely different name, you will have to change it here too. $DataPath is the path where you keep the user database, and the directory database. $SessionPath is the path for the session files. The session files maintain the user authentication data, and various other transitional data. We avoided saving such data in cookies, part cause of the sensitivity, part cause of the size of the handled data. $DefTemplate is the file use as default template, should a certain gallery have no special requirements. It is useful during testing, to be able to switch back and forth between the templates. $AdminMail as expected, is the mail for the site administrator. It is not currently used, but will be at a later date, when email functions will be implemented. $UseCookies is a flag that enables the saving of the session ID only in a cookie. $CookieDomain is the base domain for setting the cookie $ValidBasePath is the most important security feature for this script. You should enter in this array alll base paths to your data directories only. That way, you avoid the misuse or hack attempts to your script. Even if somebody gets the password to your site, they cannot publish system sensitive information, by creating their own configuration, pointed to for example "/etc". There will be no online interface to the This.pm file, and we will always recommend editing the file by hand, to avoid security issues from popping up...
The last step is to configure the AppConfig.pm for the default directory. The gallery keeps the "default" entry as the reference which is used to create new configurations. We recommend populating this with a small set of neutral pics that can be used for testing porposes. Any new directory created using the online interface, will use the data in the default directory, and make a copy of it in its own path. You will have then to change the paths to reflect the new settings. The online interface will check for path validity, so you will have to create the source directories first.
Running the scriptThe Gallery can be run in a browser or at the command line. At the command line, the format is the following (all in one line): perl -e "$ENV{QUERY_STRING}='dir=default&PublishDataButton=1'
and `w:/cgi/city/gallery/gallery.cgi`"
This, of course, for NT systems. You should create a .cmd file with this line of script in it, then schedule the .cmd file to run when you desire. No authentication is necessary when it runs scheduled.
The template fileThe Gallery uses a html template with XML tags that trigger the display of the page content. The tags used in the template has one of the following formats: <cityapp:AppData:TagName/> Here is a list of valid tags, and their description: <cityapp:AppData:PageTitle/> <cityapp:AppData:Navigator/> <cityapp:AppData:PageNr/> <cityapp:AppData:DataDisplay/> The Process tags require extra processing, based on the passed parameter in the TagParams: <cityapp:Process:LastPublished:TagParams/>
More tags will be added when required.
|
||