Setting up kissGallery

Setting up...

  1. Make a backup of your files!
    Always nice to have a backup befor you mess arround with the system
  2. Install the plugin loader, if not already done!
    The plugin loader can be downloaded from here http://
  3. 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
    | |
    | +-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

  4. 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

  5. Login to CMSimple 

  6. Choose the kissGallery plugin 

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


  7. Create a Gallery page

    Code like this:

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

    This code will create a page called My first gallery in CMSimple showing all the photos you have uploaded.

    Functions call
    #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. Trouble shooting
    If you run into problems during the installation please go to http:// and look for help.

  9. Intergration to TinyMCS v3.0b3
    If you want to use the images from kissGallery in TinyMCE - replace the code in tinymce.php (found in cmsimple directory) with the following code:
    <?php
    /*
    CMSimple version 2.4 - February 27. 2005
    Updated July 13. 2005
    Small - simple - smart
     1999-2005 Peter Andreas Harteg - peter@harteg.dk
    
    For TINY_MCE Editor (tinymce_1_44) integration
    
    Change log
    14.01.2008 : Modified by Softly - cmsimple@softly.dk
    	- kissGallery intergration to tiny_mce 3.0b3
    07.03.2006 : Modified by JAT - jan.kanters@telenet.be
        - support for latest stable TINY_MCE V 2.0.4
        - added select list labels for images & pages
    
    */
    
    if($cf['tinymce']['folder']=='')$cf['tinymce']['folder']='tiny_mce';
    if(@is_dir($pth['folder']['base'].$cf['tinymce']['folder'])){
    $hjs.='<script language="javascript" type="text/javascript" src="'.$pth['folder']['base'].$cf['tinymce']['folder'].'/tiny_mce.js"></script>
    
    <script language="javascript" type="text/javascript">
    	tinyMCE.init({
    		// General options
    		mode : "textareas",
    		theme : "advanced",
    		button_tile_map : true,
    		language: "'.$sl.'",
    		plugins : "style,table,save,advlink,advimage,emotions,insertdatetime,preview,searchreplace,contextmenu,paste,directionality,visualchars,inlinepopups,nonbreaking,xhtmlxtras",
    
    		// Theme options
    		theme_advanced_blockformats : "h1,h2,h3,h4,h5,h6,p,blockquote",
    		theme_advanced_buttons1:"save,preview,code,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,removeformat,cleanup,|,justifyleft,justifycenter,justifyright,justifyfull,|,outdent,indent,bullist,numlist",
    		theme_advanced_buttons2:"link,unlink,anchor,|,image,hr,charmap,emotions,|,insertdate,inserttime,|,visualaid,tablecontrols,|",
    		theme_advanced_buttons3:"fontselect,fontsizeselect,forecolor,backcolor,|,bold,italic,underline,strikethrough,|,sub,sup,|,ltr,rtl,|,styleprops,attribs,|,help",
    		theme_advanced_toolbar_location : "top",
    		theme_advanced_toolbar_align : "left",
    		theme_advanced_path_location : "bottom",
    		theme_advanced_resizing : true,
    
    		// Example content CSS (should be your site CSS)
    		content_css: "'.$sn.'?&stylesheet",
    		force_br_newlines : false,
    
            plugin_insertdate_dateFormat: "%d.%m.%Y",
    		plugin_insertdate_timeFormat: "%H:%M:%S",
    		inline_styles : true,
    		visual : true,
    		verify_css_classes: false,
    		verify_html: false,
    		trim_span_elements: true,
    		convert_urls : false,
    		valid_elements: "*[*]",
    		// Drop lists for link/image/media/template dialogs
    		// external_link_list_url : "/tinymce_list.php?doc",
            // external_image_list_url : "/tinymce_list.php?image",
    		file_browser_callback : "kissGallery"
    	});
    	function kissGallery(field_name, url, type, win) {
    		var cmsURL = "'.$pth['folder']['base'].$pth['folder']['plugins'].'kissgallery/tinymce_browser.php";
    		var searchString = "?";
    	    tinyMCE.activeEditor.windowManager.open({
        	    file : cmsURL + searchString + "&type=" + type, // PHP session ID is now included if there is one at all
            	width : 640,  // Your dimensions may differ - toy around with them!
    	        height : 400,
        	    resizable : "yes",
            	inline : "yes",  // This parameter only has an effect if you use the inlinepopups plugin!
    	        close_previous : "no"
        	}, {
            	window : win,
            	input : field_name
        	});
        	return false;
     	}	
    </script>';
    $o='<form method="post" id="ta" action="'.$sn.'">'.tag('input type="hidden" name="selected" value="'.$u[$s].'"').tag('input type="hidden" name="function" value="save"').'<textarea name="text" id="text" rows="40" cols="80">'.$c[$s].'</textarea></form>';}  else e('cntopen','folder',$cf['tinymce']['folder']);
    ?>