There are a ton of things you can do with the PHP JackKnife online gallery system. If you
have a good question or comment, we'll add it here. The only bad question is the one
left unasked -- and this also goes for online gallery software!
If you need help with something, ask us. If the gallery software doesn't already
do it, we can build it for you. No problem!
PHP runs fine, but prints out a bunch of garbage. And a ton of things that look like <?=[something here]?> with
the <?= and =>.
You have to update your php.ini file to enable the "short open tag":
http://us2.php.net/manual/en/ini.core.php#ini.short-open-tag
How do I install this crazy thing?
Good question. Follow these steps.
If you plan on using MSSQL, modify the php.ini file and uncomment the line "extension=php_mssql.dll".
Make sure the php_mssql.dll is in your php directory.
If you plan on using the Native PHP calls for image manipulation (you're not using GflAX), modify the
php.ini file by uncommenting the line "extension=php_gd2.dll". Make sure the php_gd2.dll is in your
php directory.
Unzip the files into your website's directory. Don't rename the PHPJK directory because it's been hardcoded into a lot of places.
Give these directories MODIFY (on *nix try chmod 777) rights:
\PHPJK\Images\CategoryImages\
\PHPJK\Admin\ManageEnMasse\Images\ and ALL the ManageEnMasse subdirectories
\PHPJK\Galleries\ -- this is only if this is the directory you plan on putting all your images in (this is the default).
Otherwise, give whichever directory you plan on putting the images in the MODIFY rights.
Give this directory MODIFY (on *nix try chmod 777) rights DURING INSTALL ONLY!:
\PHPJK\Includes\
Make sure your website is all set up in DNS and your webserver.
Create a database for PHP JackKnife in MSSQL or MySQL.
Create a user and make it the owner (all rights) of the PHP JackKnife database you created in the previous step.
Install GflAx, ASPMail, CDONTS or whatever third party stuff you want.
Change these variables in the \PHPJK\Includes\Config\i_Variables.asp file (there are more notes in the file for you):
$sUseDB -- change to the database you are going to use.
$sDatabaseName -- change to the database name you created for PHP JackKnife in your database server.
$sOS -- change to the OS you are using.
$iColorScheme -- change to the color scheme number you want to use. This only affects the admin pages.
$sTemplates -- change to the template you'd like to use. This does not affect the admin pages.
Later you'll want to go back and change all the files in the \PHPJK\Includes\Config\ directory -- they hold the
text for the various emails that are sent out.
Go to (replace "mywebsite" with your website's domain): www.mywebsite.com/PHPJK_Installation/
Fill out the script. It'll ask you all sorts of personal questions, then create the
tables for you. It'll also modify the \PHPJK\Includes\i_OpenDomain.php file (which is why
you needed to give the \PHPJK\Includes\ directory MODIFY rights).
Once the script runs successfully, go to www.mywebsite.com/PHPJK/ to see if the gallery page comes up.
Remove the MODIFY rights from the \PHPJK\Includes\ directory once you're satisfied.
Delete the \PHPJK\PHPJK_Installation\ directory so no one can re-run your installation and mess things up.
Change the files in the \PHPJK\Includes\Nav\ directory so the different pages in the system look like
your pages.
These are some of the Configuration Variables I suggest you change right off:
All the email stuff.
If you don't want the gallery images to be stored in the \PHPJK\Galleries\ directory, change the
IG Configuration Variable. Make sure to give whichever directory you change it to MODIFY (chmod 777)
rights.
IMAGEGALLERY_THUMBNAIL_GENERATOR -- change to either GFL, PHP, or leave blank to
not allow dynamic thumbnail generation. If it's blank then you won't be able to dynamically create
Alternate View images either.
How can I make my own template?
Copy an existing template from the \PHPJK\Templates\ directory.
Rename the directory to your new templates name.
Change the $sTemplates variable in the \PHPJK\Includes\Config\i_Variables.asp
to the name of your new tempate directory.
Modify the template files in your new template directory.
How can I make it so members of my site can make their own galleries without things getting out of hand?
There is no set method, but here is a rough guide. These are things I've done in the past to allow
users to create their own galleries, but not wreak havoc on my server.
Set these Initial Rights:
PHP_JK_IG_ADD_CF_IMAGE—Add custom fields to images
PHP_JK_IG_ADD_CR_2IMAGES—Associate copyrights with images
PHP_JK_IG_CREATE_GALLERY—Create New Image Galleries
PHP_JK_IG_DEL_CF_IMAGE—Delete image custom fields
PHP_JK_IG_EDIT_CF_DATA_IMAGE—Edit image custom field data
PHP_JK_IG_EDIT_CF_IMAGE—Edit image custom fields
PHP_JK_IG_REF_GALLERY—Rights to reference images in multiple galleries (this is fun, but not required and
users will only be able to reference images in galleries they create, so its not much of a
security risk. And, images are not copied, so disk space won't be wasted.)
Set limitations. You can set limitations for new users by setting various Configuration Variables.
Existing users you'll have to set individually. Or, another way to look at it is that if you have
a buddy who you want to allow to upload an unlimited number of videos, you can simply edit his
information to allow him to do so.
Configuration Variables to set. These will set the limits for new accounts.
IMAGEGALLERY_INITIAL_HD_SPACE-This is the amount of disk space each user initially gets. In bytes. Set to -1 for unlimited
IMAGEGALLERY_INITIAL_MAX_NUM_GALLERIES-This is the initial number of galleries each user can create. Set to -1 for unlimited
IMAGEGALLERY_INITIAL_NUMDOWNLOADS-The default max number of files new users can download each day. Set to -1 for unlimited
IMAGEGALLERY_INITIAL_NUMUPLOAD-The default number of files new users can upload to their galleries. Set to -1 for unlimited
IMAGEGALLERY_INITIAL_UPLOADBYTES-The default max number of bytes per file new users can upload. Set to -1 for unlimited
IMAGEGALLERY_INITIAL_UPLOADTYPE-The default files type new users can upload
ADVs to set. These will allow you to modify the limitations of existing accounts.
PHPJK_IG_UPLOADTYPE-File types user can upload
PHPJK_IG_UPLOADBYTES-Max file size user can upload in bytes (-1 infinite)
PHPJK_IG_TTLUPLOADABLE-Num bytes user allowed to upload
PHPJK_IG_TTLUPLOADED-Num bytes user has uploaded (in case you want to reset or change it)
PHPJK_IG_NUMALLOWED-Num files user is allowed to upload (-1 infinite)
PHPJK_IG_NUMUPLOADED-Num files user has uploaded (in case you want to reset or change it)
PHPJK_IG_NUM_DL_DAY-Num files user is allowed to download each day (-1 infinite)
PHPJK_IG_NUM_HAS_DL-Num files user has downloaded today (for your curiousity)
PHPJK_IG_NUM_GALLERIES-Num galleris user may create (-1 infinite)
You may want to limit users to specific categories. To do so, make that category
require PHP_JK_IG_CREATE_GALLERY (create galleries) rights. Then, make all other
categories with PHP_JK_IG_ADMIN_ALL (admin all galleries) rights. That way, because
general users will have PHP_JK_IG_CREATE_GALLERY rights, but not PHP_JK_IG_ADMIN_ALL
rights, they'll only be able to create galleries within those specific categories.
Are you able to upload images online?
Yes, you can add images to galleries individually via HTML upload (through a browser).
There are a variety of methods to add images to galleries:
Upload individual images.
FTP images to the server and add them from the PHP JackKnife administrative pages.
Referencing images from other galleries and from other websites.
You can use the GflAx component (recommended) to dynamically create thumbnails. This component can
convert up to 100 image types. (XnView)
Or, you can use the PHP native calls. The PHP native calls are limited to manipulating JPG, GIF, PNG and BMP files.
These components are not required, instead you can upload your own thumbnail images if you like.
How do I customize the navigation of the gallery to match my existing site?
There are several PHP files that contain the top and bottom navigation of each page. You basically
just need to change them.
The files reside in the \PHPJK\Templates\\Nav\ directory.
PHP_JK_GALLERIES_CLOSE.php
This is the closing code for all the publically viewable gallery pages.
PHP_JK_GALLERIES_OPEN.php
This is the opening code for all the publically viewable gallery pages.
PHP_JK_GALLERIES_OPEN_IMAGEDISPLAY.php
This is the opening code for just the \PHPJK\ImageDetail.php page. If you look at it closely,
there is a bit of difference in the code between it and PHP_JK_GALLERIES_OPEN.php. The reason
is that this one has a bit of code in it to up your site's position in search engines based
on the info associated with that particular image.
How do I customize the gallery?
This is open source, so you can do whatever you like to your copy of the gallery.
Just keep in mind that when patches or updates are released, they have a very good
chance of overwriting your changes and/or breaking your custom code. So be careful.
If you look in the \PHPJK\Includes\i_Domains.php and \PHPJK\Includes\i_Accounts.php files, there
are some files that'll help with accessing data from the system. Things like
checking to see if a user has a particular right, or returning or setting an ADV value.
Feel free to create custom pages with those functions.
How do I add my Aricaur.com links?
There are two ways to add Aricaur links to your images. First, add the link to individual images, and second, adding
the link to all images in a gallery.
Requirements of Both Methods
You must log into PHP JackKnife using an account that has PHPJK_IG_ARICAUR rights.
If you don't have this right, ask the gallery administrator to give it to you.
Only images with an Alternate View Image that is appropriate for Aricaur
(see Image limitations and reference in the Aricaur Management Console for image requirements)
can have Aricaur links. The Alternate View Image becomes the image that is actually used
when creating the product to be sold.
If you have GFLAx
you will be able to create Aricaur links with more image types. Without this component, you can only create
Aricaur links with JPG, BMP, and PNG images (using native PHP calls).
Adding Individually
Click the "Manage" link in top navigation.
Click the "[Images]" link in the top navigation.
Choose the gallery to work in by changing the "Category -- Gallery:" drop-down list.
Click on "Edit Aricaur Links". This link may not appear on all images.
The link only appears when the image has an Alternate View Image that is appropriate
for Aricaur (see Image limitations and reference in the Aricaur Management Console for image requirements).
The new page will first display the thumbnail image that is being used in the gallery. You will want to make
sure that the Alternate View Image chosen for use with Aricaur is identical (or nearly identical) to the
thumbnail image being used in the gallery.
Only Alternate View Images useable with Aricaur will be listed. You can click on the "View image in popup" link
to see the image.
Click the radio button with whichever image you'd like to use and click the "Edit Aricaur Link" button at the bottom.
The system will automatically create a special Aricaur thumbnail for you and it will now display it
in addition to the original image information. The Aricaur thumbnail will now be used when creating the
simulated product images in the Aricaur store -- instead of the gallery thumbnail.
Now, when you view the image in the gallery, there will be a new link to the Aricaur store specificially for this image.
Adding by the Gallery
Click the "Manage" link in top navigation.
Click the "[Galleries]" link in the top navigation.
Choose the category from the "Category:" drop-down list that your gallery is in.
Click on "Aricaur Links" associated with your gallery.
This page displays details about the link creation and image limitations.
See the Image limitations and reference in the Aricaur Management Console page for detailed image requirements.
There are two radio buttons on this page. The first one will add links to all images and
change any links that aren't optimized but that have already been set. If the secont radio
button is checked, the script will only add links to images that don't already have one -- it
will not change any pre-existing links.
Once you click the "Add Links" button, the script will choose the best Alternate View Image
to use for Aricaur. It does this based on the X and Y dimensions of the images and chooses
the largest image. The script will also create a special Aricaur thumbnail that will be
used in the Aricaur store when creating the simulated product images.
After the script is done, it will display the results of each image for you. It will also
show you the gallery thumbnail next to the Aricaur thumbnail so you can compare and make
sure they are identical. If they are not close enough, click the
"If the images are different, choose another image." link under them to manually manage
the Aricaur link for that image.