source: extensions/UserCollections/README.txt @ 29055

Last change on this file since 29055 was 26176, checked in by mistic100, 11 years ago

add readme about template variables and prefilters

File size: 2.4 KB
Line 
1User Collections
2
3AVAILABLE TEMPLATE VARIABLES
4=====================================================================
5  File: thumbnails.tpl (index_thumbnails)
6  Trigger: loc_end_index_thumbnails
7  See: include/events.inc.php (user_collections_thumbnails_list)
8 
9  $USER_COLLEC_PATH - path from root to UserCollections directory
10 
11  $COLLECTIONS - all collections of the current user
12    * id
13    * name
14    * nb_images
15   
16  $thumbnails - The following attributes are added for each element
17    * COLLECTIONS - comma separated ids of collections containing the element
18   
19---------------------------------------------------------------------
20  File: thumbnails.tpl (index_thumbnails)
21  Trigger: loc_end_index_thumbnails
22  See: include/display_thumbnails.inc.php (user_collections_thumbnails_in_collection)
23 
24  Only applied when viewing thumbnails of a collection.
25 
26  $thumbnails - The following attributes are added for each element
27    * FILE_SRC - direct link to large image
28   
29---------------------------------------------------------------------
30  File: mainpage_categories.tpl (index_category_thumbnails)
31  Trigger: loc_end_index
32  See: include/diplay_collections.inc.php
33 
34  Only applied when viewing collections list.
35 
36  $category_thumbnails - The following attributes are added for each element
37    * U_DELETE
38
39
40
41PREFILTERS
42=====================================================================
43  File: thumbnails.tpl (index_thumbnails)
44  Searches: (<li>|<li class="gthumb">)
45  See: include/events.inc.php (user_collections_thumbnails_list_button)
46 
47  This prefilter tries to add the "Add to collection" button for every element.
48  The button must have class="addCollection" and have data-id="{$thumbnail.id}"
49  and data-cols="[{$thumbnail.COLLECTIONS}]".
50 
51---------------------------------------------------------------------
52  File: thumbnails.tpl (index_thumbnails)
53  Searches: <a href="{$thumbnail.URL}"
54  See: include/collections.inc.php (user_collections_add_colorbox)
55 
56  This prefilter tries to add metadata for Colorbox interactions on collections
57  view and edit pages.
58 
59---------------------------------------------------------------------
60  File: mainpage_categories.tpl (index_category_thumbnails)
61  Searches: <div class="thumbnailCategory">
62  See: include/collections.inc.php (user_collections_categories_list)
63 
64  This prefilter tries to add "Edit" and "Delete" links on categories list,
65  which uses the same template as albums.
66 
Note: See TracBrowser for help on using the repository browser.