File Submitter: Cris D.
File Submitted: 8 Apr 2007
File Updated: 18 Jun 2007
File Category: Images & Galleries
This snippet is to call pictures from a range of etogal galleries into a single page. The default installation will call all pictures from the etomite gallery table and limit the return to the first 20 sorted by pict. id. More advanced users can also sort by table field (title, gal_id, id etc), add where clauses, change number of results returned and set the maximum number to be displayed on a page at a time.
1)This snippet assumes that EtoGal has already been installed and the table is populated.
2)Copy this text and add to snippet library in etomite.
3)Copy "etogal_tpl" and add to chunk library.
4)Create a page, save it and publish it, call this snippet by typing [!etogal_multigals3.1!] into the page & save.
It can be customised to suit your own template to format the output or use the included template as default (edit the etogal_tpl to change the table structure of the pics). For more control, add class .even{}; class .odd{}; to your css and define them or use in-line styling.
This is an easy way to change the visual representation of etogal (not the etogal manager) as the html that controls the way etogal is rendered is in a separate file from the code (template attached in the top of the snippet).
Note the latest version is now 3.1
See the new features in action...here.
Updated 18/6/07 **Another new feature** Added hyperlinked numbers as part of the Prev Next navigation. Also changed the ceil() to floor() to round down (Page 1 of "n") resulting in a more accurate number.
Updated 31/5/07 ***NEW FEATURE*** Now with Previous | Page x of y | Next navigation. YOU set how many pictures to show per page from the snippet call.
31/5/07 Version 3 Prev| page x of y |Next navigation added and the ability to set the number of results from a result set to show on a page.
3/5/07 Version 2.1 with all parameters that can be added to the snippet call instead of inside the snippet. Upgrading to this version will not affect previous version, the defaults are still the same.
Snippet parameters that can be called are:
include= any table field, where_clause= MANY SQL "where" queries, sort_by= any table field retrieved, return_limit= number or records to show, sort_direction= DESCending (default ASCending), template= any saved chunk. See in snippet for examples of use and syntax to use.
This can be called in the same page as etogal and etogal_multigals and multiple etogal_multigals snippets on a page.
8/5/07 V2.2added stripslashes to output so " " will look like " " instead of \" \".
22/5/07 default etogal_tpl now includes a link to the original etogal picture (zoomed in) in the gallery where it originated, and in a new window. (simple html <a href><img src> addition ad ZOOM in.. (opens in new window) addition).
Click here to download this file
Attached Files
Edited by Cris D., 18 June 2007 - 12:48 PM.













