<?php

// To convert this PHP file to html, take a look at the
// respective FAQ/Help page and add &html to the URL.

$helpArray = array(

array('_type_'=>'h1',
      'text'=>'Introduction'),
array('_type_'=>'none',
      'text'=>'This is the user manual, which teaches the use of PHPmyGallery and it\'s adminmenu. You will also find installation instructions in here.<br>
A troubleshooting section regarding the use of the script is located at the bottom of this page.<br><br>
Have fun using this script!'),
      
array('_type_'=>'h1',
      'text'=>'Installing'),
array('_type_'=>'none',
      'text'=>'To install PHPmyGallery, all you have to do is copy the entire contents of the downloaded ZIP archive to a webserver with PHP running. You can name the directory phpmygallery is in the way you like.<br>
You should set write permissions of all files and directories within the _conf/db/ directory to 777 (rwxrwxrwx). Login to your webspace via FTP. In most FTP clients, right clicking a file or directory shows the option to set it\'s write permissions.<br>
The next thing you should do is set an admin password for the admin menu. To do this, just visit the _conf/ directory within your browser. You will now be asked to enter the password twice (remember it!). Submit the form and the password is saved for your next login to the admiin menu.<br><br>

The next time you visit the _conf directory, you are asked to type in the password to enter the admin menu. From now on you have a fully working PHP web gallery!<br>
You may now proceed to the next step, "Managing your galleries".

Check the troubleshooting section if you have lost your password or if any other errors occur.'),

array('_type_'=>'h2',
      'text'=>'Installing PlugIns'),
array('_type_'=>'none',
      'text'=>'Installing a plug-in requires mostly two or three steps.<br>
Firstly, copy the php file into the plug-ins directory. The templates (should be .html files) have to be copied to templates/plug-ins/. If the plug-in has to save data, create a folder in the db/plugins directory (name specified in the PlugIn readme file.<br>
Please check the readme file of the plugin you want to install, it should give you all the information to get it running.<br><br>

You can access the PlugIn from within the admin menu (check the "PlugIns" section of this manual).'),

array('_type_'=>'h1',
      'text'=>'Managing your galleries'),
array('_type_'=>'none',
      'text'=>'This script uses directories in the phpmygallery folder as groups. Within these groups, every directory is a gallery. Each gallery can have any amount of pictures inside them - it\'s your decision how you organise them.<br>
In a gallery you can use thumbnails, display the picturename or the filename. If you click on them, the full picture of this gallery is shown.<br><br>

You can define your own group names, gallery names, picture names and picture descriptions. This is handled in the "The admin backend" section.<br>
But first let\'s create our own group and gallery in the following sections...'),
      
array('_type_'=>'h2',
      'text'=>'Creating groups and galleries'),
array('_type_'=>'none',
      'text'=>'Until now, groups and galleries can only be created via FTP. Log in to your webspace account with your favourite FTP client software. Browse to the directory where you copied PHPmyGallery to.<br>
Creating a new directory here creates a new group within PHPmyGallery. If you create a subdirectory in a group, it will be used as another gallery from that group.'),
      
array('_type_'=>'h2',
      'text'=>'Uploading pictures'),
array('_type_'=>'none',
      'text'=>'After you have created a gallery directory, upload the pictures you want to have within that gallery. By default, pictures can be .gif, .jpg, .bmp or .png files.<br>
The order pictures are displayed is the alphabetical order of the pictures\' filenames. Pictures that start with th_ will be used as a thumbnail (a small version of a picture you can click on to see the big picture). So th_pic.jpg will be used as a thumbnail for pic.jpg. You can change this in the gallery\'s settings later if you want.'),
      
array('_type_'=>'h1',
      'text'=>'The admin backend'),
array('_type_'=>'none',
      'text'=>'The following sections explain how to use the admin backend. If you haven\'t logged in, visit the _conf directory with your favourite webbrowser and enter your password. Submitting the form sends you to the starting page of the admin menu.'),
      
array('_type_'=>'h2',
      'text'=>'Main navigation'),
array('_type_'=>'none',
      'text'=>'<i>Note: If you haven\'t logged in, you can only see "Home", "FAQ/Help" and "Contact".</i>'),
      
array('_type_'=>'h3',
      'text'=>'Home'),
array('_type_'=>'none',
      'text'=>'Klicking this link will bring you back to the starting page of the admin menu. If you haven\'t logged in it will display the page where you have to enter the password.'),
      
array('_type_'=>'h3',
      'text'=>'PlugIns'),
array('_type_'=>'none',
      'text'=>'Lists and executes the installed plug-ins for the admin menu. Klicking a name executes the plugin and displays it\'s output. For details, check the manual of the selected plugin.'),
      
array('_type_'=>'h3',
      'text'=>'FAQ/Help'),
array('_type_'=>'none',
      'text'=>'Well you should have already klicked this one so congratulations on your ability to navigate within a web page /^.^/'),
      
array('_type_'=>'h3',
      'text'=>'Contact'),
array('_type_'=>'none',
      'text'=>'Opens a new window with the PHPmyGallery Website\'s contact form, please read this manual completely before you send questions :) You may report bugs here, too!'),
      
array('_type_'=>'h3',
      'text'=>'Logout'),
array('_type_'=>'none',
      'text'=>'Ends this session and displays the login screen again. When logging in via htaccess, just close the current browser window or tab.'),
      
array('_type_'=>'h2',
      'text'=>'Main setup etc.'),
array('_type_'=>'none',
      'text'=>'You are offered several things here. You can edit the overall settings, view usage statistics of your galleries or check if file permissions are sufficient to create files in the database.'),
      
array('_type_'=>'h3',
      'text'=>'Overall settings'),
array('_type_'=>'none',
      'text'=>'These settings are used if you haven\'t specified the settings for a gallery. Check "Gallery setup" below to review the options you have."'),
      
array('_type_'=>'h3',
      'text'=>'Usage statistics'),
array('_type_'=>'none',
      'text'=>'Here you can see the most viewed groups, galleries and pictures. You can choose between the top 10, 25 or 50 entries.<br>
Every item within the displayed tables can be clicked on to see it (opens a new window). Please note, your own clicks are not ignored for these statistics.'),
      
array('_type_'=>'h3',
      'text'=>'File permissions'),
array('_type_'=>'none',
      'text'=>'This is a little tool which displays if all neccesary directories are on 777 (rwxrwxrwx) to create new files. It can try to set them to 777 for you, it depends on your webspace if it allows PHP to use the chmod command.'),
      
array('_type_'=>'h2',
      'text'=>'Groups and Galleries'),
array('_type_'=>'none',
      'text'=>'All your groups and galleries are listed here for easy editing.'),
      
array('_type_'=>'h3',
      'text'=>'Groups settings'),
array('_type_'=>'none',
      'text'=>'Edit the names of your groups. By default, the name of the group is it\'s directory name with underscores (_) replaced by spaces.'),
      
array('_type_'=>'h3',
      'text'=>'Gallery setup'),
array('_type_'=>'none',
      'text'=>'Within the gallery setup, you can change things like the language, how thumbnails are arranged and many more. An explanation of what the settings do can be found next to each entry. If no settings are saved for a gallery, settings from the main setup will be used.'),
      
array('_type_'=>'h3',
      'text'=>'Picture descriptions'),
array('_type_'=>'none',
      'text'=>'Clicking on this link opens a page where you can set the name of the gallery and edit picture names and picture comments. You can click on the links on the right to view the picture you\'re editing.<br>
If the gallery name is not set, the directory name is used (underscores ( _ ) replaced with spaces). Same goes for pictures, if a picture name is not set it\'s filename is used.'),
      
array('_type_'=>'h1',
      'text'=>'Troubleshooting'),
array('_type_'=>'none',
      'text'=>'Check here if you experience problems using PHPmyGallery.'),
      
array('_type_'=>'h2',
      'text'=>'Wrong picture count'),
array('_type_'=>'none',
      'text'=>'If you see a "?" or a wrong picture count in gallery index view, this means you haven\'t saved the picture descriptions. PHPmyGallery counts gallery pictures according to the thumbnail prefix/suffix settings. Because each gallery can have its own setting, thumbnail settings are unknown until you save the picture descriptions.<br>
You will have to save the picture descriptions if you upload new pictures to a gallery, too.<br><br>The "?" will also show up if you renamed directories. Check out the directories "gallerysettings", "groupssetup" and "picsdescriptions" in _conf/db/. Rename the files inside accordingly.'),
    
array('_type_'=>'h2',
      'text'=>'Thumbnails don\'t display correctly'),
array('_type_'=>'none',
      'text'=>'Thumbnails have to use the same extension as their matching pictures and uppercase/lowercase is important, too.<br>If you\'ve got pic.jpg it has to be th_pic.jpg and not th_pic.gif, th_Pic.jpg or th_pic.JPG).'),
    
array('_type_'=>'h2',
      'text'=>'I can\'t login!'),
array('_type_'=>'none',
      'text'=>'Using sessions to login (default): This depends on the webserver\'s PHP settings. If it is required to accept a Cookie to start a session, maybe your browser is refusing it. You can check your browser\'s Cookie settings to automatically accept Cookies from the domain you host your site on.<br>
PHP sessions could be disabled on your webserver or not configured correctly. Consult your webspace provider on this problem. If you host the webspace on your own server, well, try searching the web for similar problems.<br><br>

If you have still problems to login, you can set PHPmyGallery to use htaccess as login method. Edit _conf/db/mainsetup/data.php with your favourite text editor.<br>'),
array('_type_'=>'code',
      'title'=>'Change the line',
      'text'=>'$data[\'login_system\'] = \'sessions\';'),
array('_type_'=>'code',
      'title'=>'to',
      'text'=>'$data[\'login_system\'] = \'htaccess\';'),

array('_type_'=>'none',
      'text'=>'<br>You can now create an .htaccess file within the _conf directory with your favourite htaccess creating tool or let PHPmyGallery create the htaccess file for you.<br>
Just visit the _conf directory within your webbrowser, you will be asked to type in a username and password which will be asked everytime you want to login to the admin menu.<br><br>

Using htaccess login: Check if a valid .htaccess file exist in the _conf directory. Make sure the webspace supports htaccess and has it configured properly.'),
      
array('_type_'=>'h2',
      'text'=>'Adminmenu links don\'t work'),
array('_type_'=>'none',
      'text'=>'You haven\'t been logged in correctly. Please read "I can\'t login!" above.<br>
If you have logged in correctly, then you\'ve just found a bug - please use the contact form on PHPmyGallery\'s website.'),
      
array('_type_'=>'h2',
      'text'=>'Settings are not saved'),
array('_type_'=>'none',
      'text'=>'Maybe your webserver doesn\'t allow PHP to write files or the file doesn\'t have write permissions set.<br>
If you have FTP Access (Web FTP should work, too), login to your webspace via FTP and set the file\'s write permissions (CHMOD) to 777 (rwxrwxrwx). In most FTP clients, right clicking a file or directory shows the option to set it\'s write permissions.<br><br>

If you do not know which file to chmod, take a look in the db directory. The file- and subdirectorynames are very descriptive so you should find the file easily.<br>
Note that the file does not exist when writing it the first time. Set the directory\'s write permissions in which the file will be created to 777 (rwxrwxrwx).'),
      
array('_type_'=>'h2',
      'text'=>'Forgot your password?'),
array('_type_'=>'none',
      'text'=>'If you have lost your password you can reset it.<br>
Using sessions login: Edit db/mainsetup/adminpassword.php. You can set the password there directly or set it to an empty string \'\'. If the password is reset you will be asked to enter it again like when you installed the script.<br>
Using htaccess login: Delete the .htaccess file or delete it\'s contents.'),
      
array('_type_'=>'h2',
      'text'=>'I need an FTP client'),
array('_type_'=>'none',
      'text'=>'Typing FTP client download in any search engine will give you several alternatives to choose from. One of them is BlazeFTP which is freeware:<br>'),
array('_type_'=>'weblink',
      'url'=>'http://www.flashpeak.com/blazeftp/download.htm',
      'linkname'=>'www.flashpeak.com/blazeftp/download.htm'),
array('_type_'=>'none',
      'text'=>'<br>Check your webspace provider\'s website for help on using FTP to access your webspace.'),
      
array('_type_'=>'h2',
      'text'=>'Reporting bugs'),
array('_type_'=>'none',
      'text'=>'You can use the official website\'s contact form. Just click on the "Contact" link in the main navigation (opens a new window/tab).'),
      
);

?>
