Russian Russian   English English
Latest version 1.3

Easy 2 Gallery documentation

You should go into Config tab in e2g module and set custom options before you start working with gallery.

  • All gallery maintenance is done through module.
  • CSS styling is done in assets/modules/easy2/templates/style.css
  • When you call your snippet first time it generates thumbnails (same when you clear cache)
  • Image viewing and watermarking is done by show.easy2gallery.php
  • Comments viewing and adding is done by comments.easy2gallery.php
  • Comments save in UTF-8

 

Snippet call parameters description

 

gid - gid - gallery id from which snippet starts it work. default is 1 - root

 

Thumbnails parameters

w - thumbnail width, px.

h - thumbnail height, px.

Remember if you want to apply changes to added images you should clean cache. Folder _thumbnails in root of gallery.

thq - Level of jpeg-compression. 0 to 100%. (100 - max)

 

Display parameters

name_len - Max length of thumbnail name

cat_name_len - Max length of folder name

colls - Quantity of thumbnails per row

limit - Quantity of thumbnails per page.

gpn - start page number.

orderby - Field by which thumbs will be sorted out: date_added, last_modified, comments, filename, name, random.

order - Sort ASCENDING or DESCENDING, ASC и DESC correspondingly.

 

Comments parameters

ecm - comments on/off, 1 и 0 correspondingly.

ecl - Comments per page.

 

Templates parameters

css - CSS style
chunk name or path to file
Default: assets/modules/easy2/templates/style.css

tpl - gallery template
chunk name or path to file
Default: assets/modules/easy2/templates/gallery.htm

dir_tpl - folder template
chunk name or path to file.
Default: assets/modules/easy2/templates/directory.htm

thumb_tpl - thumbnail template.
chunk name or path to file.
Default: assets/modules/easy2/templates/thumbnail.htm

rand_tpl - random pic template
chunk name or path to file.
Default: assets/modules/easy2/templates/random_thumbnail.htm

comments_tpl - comments template.
chunk name or path to file, relative to file comments.easy2gallery.php.
Default: assets/modules/easy2/templates/comments.htm

comments_row_tpl - comments row template.
chunk name or path to file, relative to file comments.easy2gallery.php.
Default: assets/modules/easy2/templates/comments_row.htm

See additional features section for more info.

 

All parameters can be combined, e.g. [!easy2?gid=7&w=200&h=180&thq=90!]

 

Placeholders description

 

gallery

[+easy2:cat_name+] - current folder name
[+easy2:back+] - link back to parent
[+easy2:content+] - content
[+easy2:pages+] - pagination

Folders

[+easy2:cat_name+] - folder name
[+easy2:cat_id+] - folder id
[+easy2:parent_id+] - parent folder id
[+easy2:cat_level+] - level

and all thumbnail placeholders

Thumbnails

[+easy2:src+] - path to thumbnail
[+easy2:w+] - thumb's width
[+easy2:h+] - thumb's height
[+easy2:id+] - id of image
[+easy2:name+] - image name (if > name_len, that lenght = name_len-2)
[+easy2:title+] - title (full name)
[+easy2:description+] - image description
[+easy2:filename+] - image filename
[+easy2:size+] - size of file (bytes)
[+easy2:comments+] - comments total for image
[+easy2:date_added+] - date added
[+easy2:last_modified+] - last modified date
[+easy2:dir_id+] - folder id

Comments (row)

[+easy2:id+] - comment id
[+easy2:file_id+] - file id
[+easy2:author+] - author's name
[+easy2:email+] - author's email
[+easy2:name_w_mail+] - if email is set "<a href="mailto:[+easy2:email+]">[+easy2:author+]</a>", else "[+easy2:author+]"
[+easy2:comment+] - comment
[+easy2:date_added+] - comment date
[+easy2:last_modified+] - comment last modified date

Comments (page)

[+easy2:title+] - pagetitle (from langs/*.comments.php)
[+easy2:body+] - comments
[+easy2:pages+] - pagination links
+ language specific settings langs/*.comments.php

 

Additional features

 

Random thumbnail output

You should use limit = `1` and random order (orderby=`random`)
In this case random_tpl is used.
WARNING: you need to modify rand_tpl and set there url of your gallery page.

e.g.
you have gallery.html (page where main gallery resides) and want to put random pic on your main page or anywhere else.

you put [!easy2? orderby=`random` & limit=`1`!] anywhere you want and modify random_tpl from
<a href="#"><img src="[+easy2:src+]" alt="[+easy2:title+]" title="[+easy2:title+]" width="[+easy2:w+]" height="[+easy2:h+]"></a>
<br>[+easy2:name+]
to
<a href="/gallery.html"><img src="[+easy2:src+]" alt="[+easy2:title+]" title="[+easy2:title+]" width="[+easy2:w+]" height="[+easy2:h+]"></a>
<br>[+easy2:name+]

that's it, you've done!

 

Javascript libraries used

Highslide JS http://vikjavev.no/highslide/
Docs - http://vikjavev.no/highslide/doc.php
please consult their site for legal notice


© 2007-2009