If you want to create a new gallery type type for I18N Gallery, you need to
Ad i18n_gallery_type_edit:
All fields must be named type-xxx
Ad i18n_gallery_type_header:
Use helper functions from helper.php, e.g.
Make sure to separate your CSS into general parts (for all galleries of this type) and specific parts (e.g. size settings for the current gallery.
Ad i18n_gallery_type_content:
If the gallery shows thumbnails you should check, if only one thumbnail should be displayed (function i18n_gallery_thumb) and hide all other thumbnails in this case.
You should also check, if a specific picture ($pic) should be displayed.
Preferably the gallery should also work with Javascript switched off (currently cycle works without Javascript and fancybox and prettyPhoto have a fallback).
Please look at the existing gallery types (plugin_xxx.php) for more information.
Edit: This information and more can also be found here.
- create a new PHP file plugin_type.php in plugins/i18n_gallery, and in this file
- register the type with i18n_gallery_register('type', 'Name for dropdown', 'description including licensing information', 'i18n_gallery_type_edit', 'i18n_gallery_type_header', 'i18n_gallery_type_content')
- create a function i18n_gallery_type_edit to display the options in the administration
- create a function i18n_gallery_type_header to output the CSS and JS includes in the HTML header
- create a function i18n_gallery_type_content to output the gallery itself.
Ad i18n_gallery_type_edit:
All fields must be named type-xxx
Ad i18n_gallery_type_header:
Use helper functions from helper.php, e.g.
- i18n_gallery_check to check for general gallery settings
- i18n_gallery_needs_include to check if a file needs to be included or was already included for another gallery
Make sure to separate your CSS into general parts (for all galleries of this type) and specific parts (e.g. size settings for the current gallery.
Ad i18n_gallery_type_content:
If the gallery shows thumbnails you should check, if only one thumbnail should be displayed (function i18n_gallery_thumb) and hide all other thumbnails in this case.
You should also check, if a specific picture ($pic) should be displayed.
Preferably the gallery should also work with Javascript switched off (currently cycle works without Javascript and fancybox and prettyPhoto have a fallback).
Please look at the existing gallery types (plugin_xxx.php) for more information.
Edit: This information and more can also be found here.