Last change
on this file since 19287 was
19287,
checked in by julien1311, 12 years ago
|
Begin work on picture.php
|
-
Property svn:eol-style set to
LF
|
File size:
731 bytes
|
Line | |
---|
1 | <?php |
---|
2 | add_event_handler('loc_end_index_thumbnails', 'pdf2tab_thumbnails'); |
---|
3 | |
---|
4 | function pdf2tab_thumbnails($tpl_thumbnails_var) { |
---|
5 | global $template; |
---|
6 | |
---|
7 | $template->set_prefilter('index_thumbnails', 'pdf2tab_add_tag_thumbnails'); |
---|
8 | |
---|
9 | $template->set_filename('pdf2tab_template_thumbnails', dirname(__FILE__).'/template/pdf2tab_thumbnails.tpl'); |
---|
10 | $template->concat('PLUGIN_INDEX_CONTENT_END', $template->parse('pdf2tab_template_thumbnails', true)); |
---|
11 | |
---|
12 | return $tpl_thumbnails_var; |
---|
13 | } |
---|
14 | |
---|
15 | function pdf2tab_add_tag_thumbnails($content, &$smarty) { |
---|
16 | global $template; |
---|
17 | |
---|
18 | $search = 'class="thumbnail"'; |
---|
19 | |
---|
20 | $replacement = 'class="thumbnail" pdf2tab="{$thumbnail.path}"'; |
---|
21 | $content= str_replace($search, $replacement, $content); |
---|
22 | |
---|
23 | return $content; |
---|
24 | } |
---|
25 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.