Setting up kissGallery in CMSimple...

  1. Make a backup of all your files!
    It's always nice to have a backup before you mess arround with the system

  2. Download the kissGallery plugin, and unzip and keep the folder structure

    The folder structure will look like this:
    +-kissgallery
    | index.php
    | admin.php
    | kiss.php
    | tinymce_browser.php
    | getimage.php
    | |
    | +-languages
    | | da.php
    | | en.php
    | |
    | +-css
    | | stylesheet.css
    | |
    | +-config
    | | config.php
    | |
    | +-slimbox
    | | slimbox.js
    | | slimbox.css
    | | mootools_11.js
    | | closelabel.gif
    | | loading.gif
    | | nextlabel.gif
    | | prevlabel.gif
    | |
    | +-data
    | | album.txt
    | | photo.txt
    | |
    | +-photos
    | |
    | +-images
    | | add.gif
    | | delete.gif
    | | edit.gif
    | |
    | +-help
    | | help.htm
    | | tinymce.php

  3. Upload the folder kissgallery and it's content to the folder called plugins (the plugin loader)

    You will need to make write access to these files
    - /config/config.php
    - /data/album.txt
    - /data/photo.txt
    - /languages/da.php
    - /languages/en.php
    - /css/stylesheet.css

    and to the folder
    - /photos

  4. Login to CMSimple 

  5. First check your template

    Make sure that there is a XHTML DOCTYPE declaration at the very top of the HTML pages where you want to use Slimbox, so the browser will work in standards-compliant mode. The DOCTYPE must be XHTML 1.0 transitional, XHTML 1.0 strict, or XHTML 1.1. Example, for XHTML 1.0 transitional:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Important: Do not add a XML prolog before the DOCTYPE. If you add one, IE6 will not work in standards-compliant mode and Slimbox will not display correctly in this browser.

    Visit Slimbox setup

  6. Choose the kissGallery plugin 

    1. Create a new album
    2. Upload your photos to the album


  7. Create a Gallery page

    With code like this:

    <h1>My first gallery</h1>
    #CMSimple $output.= kissGallery();#

    When you save it, this code will create a page called My first gallery in CMSimple showing all the photos you have uploaded.

    Other functions call to kissGallery($func,$albumID) - examples
    #CMSimple $output.= kissGallery();# // show all photos
    #CMSimple $output.= kissGallery(1);# // show all photos
    #CMSimple $output.= kissGallery(2,1);# // show all photos in album id 1

  8. Using the script getimage.php in other pages
    How to insert a random image from the kissGallery into a html page.
    Use the tag <img alt="kissGallery random image" src="./plugins/kissgallery/getimage.php" />

    Parameters to getimage.php:
    [image=imageID] - show one image
    [album=albumID<,albumID2,albumID3..>] - show a random image from one or more albums
    [size=x] - size of the image x: s - small, t - thumbnail or n - normal

    Examples on calls to the script from an image tag
    <img src="./plugins/kissgallery/getimage.php?size=s" /> : shows a radom small image
    <img src="./plugins/kissgallery/getimage.php?album=2" /> : shows a random image from album ID 2
    <img src="./plugins/kissgallery/getimage.php?album=2,6,7" /> : shows a random image from album ID 2 6 and 7
    <img src="./plugins/kissgallery/getimage.php?album=1&size=s" /> : shows a random small image from album ID 1
    <img src="./plugins/kissgallery/getimage.php?image=3" /> : shows image ID 3

  9. Trouble shooting
    If you run into problems during the installation please go to CMSimple forum and look for help.

  10. Intergration to TinyMCE v3.0
    If you want to use the images from kissGallery in TinyMCE v3.0- replace the code in tinymce.php (found in cmsimple directory) with the file tinymce.php found in kissgallery/help directory.