JV2 Folder Gallery

Welcome to the JV2 Folder Gallery...

To get started using the gallery...
-------> REMEMBER to set the write permissions for THUMBCACHE !!!!
AND change admin username/password !!!
-> (set in "config/gallerysetup.php" or log in with current "admin"/"password" and change )

For additional info on how to get started (and more help): go to the forum

To see some of the stuff the gallery can be configured to do, visit: http://demo.jv2.net

FREE for Personal use - Please Donate
For commercial websites, get a Commercial License

Version 3.0

Directory structure and the content of MOST files changed since 2.x and 1.x!
Click here to see the Structure:

root/index.php
root/gallery/
root/gallery/images/     *place your image folders here*
root/gallery/config/     *default config options*
root/gallery/themes/     *themes for gallery*
root/gallery/thumbcache/ *folder to store thumbnails - give write permission*
root/gallery/include/    *all includes*
root/gallery/admin/      *all admin files*


HIDE

Admin area has been separated from the gallery. REMEMBER to set the username and password in your setup.
You can also delete the ADMIN folder if you have no use for it.

You can select the theme of the gallery by copying the foldername of the theme to the "$gallerytheme" setting in "config/gallerysetup.php", or by using the admin section dropdown menu.
More about themes... >>

The themes include a template ("template.php"), which defines the layout of the pages.
Styling of the theme is always contained in the theme folder in the stylesheet ("style.css").
The theme has it's own config file ("config.php"), which defines options relevant to layout.
The theme may also have a folder "/ICONS/" - Anything in here will override the default icons set in the gallery.
The gallery includes a wide variety of layout themes, just try them out...

For example, if you want to have a language select dropdown option choose "multi_language" or have a look at the template for the theme and copy the code for language select into what you are using...
Themes here do not have a wide colour choice; they are mainly for demonstrating options and layouts.

You can easily create a new theme and use it. If you'd like to share it with others, go to the forum.

If the theme you are changing to, has different image sizes in config compared to the theme you were using, you should empty your cache.
You can just delete all files in "thumbcache"... or in admin, empty and regenerate the cache all at once.

HIDE

This version of the gallery now handles any kind of files... Images, Video and other downloads...
More info >>

All images will be processed for thumbnails as usual... other files will be provided as a download.
Video files can be included in an embedded player. If you know what you are doing you can add your own video player code in "include/view_video.php"
You can configure file handling in "config/file_handling.php"
You can add icons for any filetypes you wish to have an icon for, by creating a jpg image and naming it with the file extension... i.e. for pdf files create pdf.jpg and put it in /icons/

HIDE

Gallery Config is now separated to two locations... the config folder and the theme folder...
More info >>

config folder contains all sorts, and theme folder config has stuff related to the layout.
config from config folder is loaded first.
setting in theme folder can override those if same settings are reset there.
All config options can be reset by defining the options inside "galleryconfig.php" in each image folder to have different options in different folders. Just as before :)


* gallerysetup.php *

This file contains all the main config for the gallery.
The setting here are "global" and they affect the whole gallery.


* galleryconfig.php *

The setting in this file contain more specific information on how to handle images.
When set in this file in this location, the setting are "global" and affect the whole gallery. If you make a copy of this file inside a image folder (a specific image folder which you want to change) you can then override the global setting and have that part of the gallery behave differently.

Some of the settings previously present in galleryconfig have been moved to the config file within the theme folder. the Setting contained in that file, are layout specific.

The settings in that "config.php" file within the theme folder can be overridden for a specific folder also (as described above)... but... do not make a copy of that config.php.
You should copy the setting from that file and insert them into the "galleryconfig.php" file that you have copied in the directory.


HIDE

You can Include the gallery into your own site code...
More info... >>

Example usage of the INCLUDE_MODE of the gallery is provided in the included "gallery_include_example.php" file.
YOU MAY DELETE the gallery_include_example.php after you do not need it.


HIDE

Adding Desciptions to images and albums
More info... >>

Images:
Description or comments file for each image can be added to the albums like this:
[imagename].txt
Then write your comments / description in the text file. The content will be displayed below the image in large view.
Style of description can be changed in the theme css file just like most elements in the gallery...
See the section on multiple languages for adding different description.


Folders:
Description or comments file for each folder can be added to the folders like this.
Create a file for the default language inside the folder like this:
"folder.txt"
Then write your comments / description in the text file. The content will be displayed below the folder thumbnail or as a javascript "tooltip" div when you hover your mouse over the folder image (if that option is selected).
Style of description can be changed in the theme css file just like most elements in the gallery...
See the section on multiple languages for adding different description.




HIDE

The Gallery now supports MULTIPLE LANGUAGES.
More info >>

------------------
* MULTI LANGUAGE *

The Gallery supports multiple languages.

You can define new languages in the config/lang folder, by translating the content in "english.php" and renaming it to the name of the language.

That name will then appear in the dropdown menu if you are using that.
See example theme for dropdown... or use this line in your template.php of the theme you are using


This will then print out a dropdown selection box for available languages.

The settings defined in these lang files obviously only affect the "labels" and links in the gallery.


If you are using a language with non western characters (e.g. russian - cyrillic), I recommend you set the default language to english and do all the folder and image names in english. This way the URls will work nicely. Especially since IE seems to screw up with creating links out of these types of file names.
Then to get your language of choice working, follow instructions below, to set the folder and image names for display on page in your language.
Then set $_SESSION['language']="russian";
below the config section in "gallery.php" where the language is set.


------------------
* FOLDER NAMES *

You can have the folder names in multiple languages.
To do this... keep the names of the folders in the default language defined in setup.
Then, to add new names for folders in other languages:

Create a txt file inside the folder and name it with the language,
For example for finnish... i.e. "suomi"... I have a lang file suomi.php in the lang dir.
To tie in with this language, I would create a file "suomi.txt" inside the folder I want to rename.
Inside this txt file, type the name of the folder it is placed in, in the language you want.
Then when the language is selected, the folder name is displayed with that language.
This affects both the menu and the name below the folder.
It does not affect the URL.


------------------
* IMAGE NAMES *

You can have the image names in multiple languages.
To do this... keep the names of the images in the default language defined in setup.
Then, to add new names for images in other languages:

Create a txt file inside the folder and name it like this:
[imagename]_name_[language].txt
For example for finnish... i.e. "suomi"... and a image called "my_photo.jpg" I would create a text file called "my_photo_name_suomi.txt"
Inside this txt file, type the name of the image in the language you want.
Then when the language is selected, the image name is displayed with that language.
This will only affect the name below the image (if you have the option to display it turned on).
It does not affect the URL.


------------------
* DESCRIPTIONS *

Images:
Description or comments file for each image can be done in several languages also.
Create your normal comments file for the default language like this:
[imagename].txt
To create additional comments in other languages:
[imagename]_[language].txt

e.g. from the example used above:
english -> my_photo.txt
finnish -> my_photo_suomi.txt


Folders:
Description or comments file for each folder can be done in several languages also.
Create your normal comments file for the default language like this:
"folder.txt"
To create additional comments in other languages:
folder_[language].txt

e.g. for folder "Photos" put these files inside:
english -> folder.txt
finnish -> folder_suomi.txt


------------------
* INCLUDING IN YOUR MULTI LANG SITE*

To use this in your existing site, where you already have language selection for the whole site...
Include the site normally... according to the instructions elsewhere.

To get the gallery language to work with your language selection... do the following:

assign your languge selection from your site to a variable called:
$_SESSION['lang']

you must use the same way to name the language in your site and the gallery... so it will recognise the language file wanted and so on... obviously :)


HIDE

The Gallery has a slideshow option now.
More info... >>

The slideshow will work from any page (not root). You can set the option in setup to display or hide the link.
The slideshow can also be used in the popup window.
If you select popup option 5 the popup window will use (or generate) cached images in the size defined in config.
If you select popup option 6 the popup window will use original images. (when using this, make sure the original images are not too big to display on the screen)


HIDE

About the ICONS:
The Gallery supports defining your own icons for each filetype you want to provide.
The images will still be shown as thumbnails... unless you select the the file_list_view.
More info >>

when you add files other than images into the gallery...
these icons will be used instead of a thumbnail.
By default, when file type is not defined in the icons here... it will use the blank "default.gif"

You can add any icons here to display a specific image for the filetype.
You must name the file according to the file extension.
for example... avi.gif mpg.gif mov.gif doc.gif zip.gif


If you are creating a new theme, you can override any of the default icons by creating a folder "icons" inside the theme folder... e.g. have a look at my grey and dark themes. Works for both folder image and any file icon.
However, if you dont have an icon for a filetype in your "themename/icon" but it is found in "DEFAULT_ICONS" then that is used.

The styles for the deafult themes have been condifgured to the icons size 64 x 64 and thumbnail size 140 x 105
If you want to use different size icons, you will need to edit the CSS styles to align them properly.

The folder.gif folder icon image has to always have the same dimesnsions as the thumbnails.

You can set the folder icon individually for each folder... by dropping a another "folder.gif" inside that folder.


---------------------------------------

The default icon set here is by Kearone

You can download the rest from:
http://www.deviantart.com/deviation/4846702/

If you wish to add more icons to the set here... I recommend resizing to 64x64...
and convert to transparent GIF as the PNG support in IE is a bit dodgy to say the least.

---------------------------------------

HIDE

This version now includes option to use mod_rewrite.
More info >>

To get this working you will need to turn it on in the setup - and copy the htaccess file from the admin/htaccess folder into the root - or rename the "Copy of . htaccess" to just ".htaccess" in the root

HIDE

HIGHSLIDE JS
The latest gallery includes out of the box support for Highslide JS
More info >>

This can be turned on by setting $popupimage="4" in your theme config.

To use this option... you must download the package from
http://vikjavev.no/highslide/
and copy it to the ROOT of the gallery... i.e. alongside this readme file.

Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 License.

Highslide JS, formerly Vevstein Thumbnail Expander, is a piece of JavaScript that streamlines the use of thumbnail images on web pages. The library offers these features and advantages:

* No plugins like Flash or Java required.
* Popup blockers are no problem. The images expand within the active browser window.
* Single click. After expanding the image, the user can scroll further down or leave the page without restoring the image.
* The approach uses two separate images. No heavy full-size image packed into thumbnail display size! The full-size image is loaded in the background either on page load or when the user clicks the thumb. You specify this option in the script's settings.
* Compatibility and safe fallback. If the user has disabled JavaScript or the JavaScript fails in any way, the browser redirects directly to the image itself. This fallback is able to cope with most exceptions and incompatibilities.


HIDE

Uploading Zips
what you need to do to upload multiple images at once in zip files... >>

If the zip upload is not working, you most likely do not have the php_zip extension installed.
To correct this...
You must have access to you php.ini on your server!

you will need to do a search in the file for "php_ini"
you will find it under extensions
then remove the semicolon from the beginning of the line.
restart the server... -> zips should work


HIDE

UPGRADING?
find out what you should do when upgrading... >>

You can copy all your image folders including the settings etc to this gallery version... they will work the same as they did before. Some new setting have been added... if they are not added manually to the individual config files - then default values will be used for those settings.
Additionally, themes now include default config. If you override those settings in the folders, the layout may be affected.


index.php will only calls the code from the gallery directory.
This has been changed so that the structure is kept more clean.

It has been deemed important to keep all the gallery files separate from the root
for the sake of the include mode.
So now, when you use include() in your site. You do not need to copy the files to your root.
Simply drop in the gallery folder.

The way the include mode is configured has changed
Example usage of this is provided in the included "gallery_include_example.php" file.
YOU MAY DELETE the gallery_include_example.php after you do not need it.


HIDE

Please see changelog for other new options / changes.

Any problems? -> Please visit the FORUM



I would like to thank Rich for testing approx. 10 beta versions of version 3
However, neither of us take any responsibility for any bugs left in the script... :)
If you find one, don't cry... just report it in the forum and I'll see what I can do about it...



If you like my gallery, find it useful.... and want to reward my efforts...
or if you are, for example, using my gallery for commercial purposes, and are feeling guilty making money...
then please consider donating something towards my server and other running costs...

Thanks!!