SGL is a php5 script to list pictures.
This script finds all the pictures in a directory under ./test_pic/ and makes menus based on directories.
All you have to do is putt your pictures in ./test_pic/ directory. Or edit $strPathToFiles = ‘./test_pic’; in sgl4.class.php file.
You can organize your pictures by category, by putting it under sub-directories.
The thumbs/ directory must be writable (CHMOD 755) to generate thumbnails automatically first time you visit the site. It will help loading your images faster.
HOW TO INSTALL
All you have to do is unzip the file.
Unpack the sgl4.php and configure the paths.
Putt your pictures under ./test_pic/ directory.
And don’t forget to chmod 755 thumbs directory.
When you post a form with checkbox it dose not return any value when the checkbox is not ticked.
This is something that should have been fixed a long time ago.
But for now here is the solution:
You put an hidden input before checkbox input with the same name.
Since the last checkbox overwrite the value when it is checked, the hidden input do not return “0″ but when the checkbox is not checked, the hidden input with the same name returns a “0″.
So when the checkbox is checked it returns “on” and when it is not checked it returns “0″
And to make it easier to click on the ckeckbox use “label” tag around the name.
Before:
My Checkbox
After:
This way you can click on the checkbox label and make it checked.
The correct way to write an checkbox checked from the start is like this: