Last change
on this file since 19821 was
19821,
checked in by julien1311, 11 years ago
|
[file_uploader] pdf2tab update
|
-
Property svn:eol-style set to
LF
|
File size:
1017 bytes
|
Rev | Line | |
---|
[19675] | 1 | <?php |
---|
[19821] | 2 | add_event_handler('loc_end_index_thumbnails', 'file_uploader_pdf2tab_thumbnails'); |
---|
[19675] | 3 | |
---|
[19821] | 4 | function file_uploader_pdf2tab_thumbnails($tpl_thumbnails_var) { |
---|
| 5 | global $template, $conf; |
---|
[19675] | 6 | |
---|
[19821] | 7 | $conf_file_uploader = unserialize($conf['file_uploader']); |
---|
[19675] | 8 | |
---|
[19821] | 9 | $template->set_prefilter('index_thumbnails', 'file_uploader_pdf2tab_add_tag_thumbnails'); |
---|
[19675] | 10 | |
---|
[19821] | 11 | $template->assign('file_uploader_pdf2tab_supported_extensions', $conf_file_uploader['pdf2tab_extensions']); |
---|
| 12 | $template->set_filename('file_uploader_pdf2tab_template_thumbnails', FILE_UPLOADER_PDF2TAB_ABSOLUTE_PATH.'template/thumbnails.tpl'); |
---|
| 13 | $template->concat('PLUGIN_INDEX_CONTENT_END', $template->parse('file_uploader_pdf2tab_template_thumbnails', true)); |
---|
| 14 | |
---|
[19675] | 15 | return $tpl_thumbnails_var; |
---|
| 16 | } |
---|
| 17 | |
---|
[19821] | 18 | function file_uploader_pdf2tab_add_tag_thumbnails($content, &$smarty) { |
---|
[19675] | 19 | global $template; |
---|
| 20 | |
---|
| 21 | $search = 'class="thumbnail"'; |
---|
| 22 | |
---|
[19821] | 23 | $replacement = 'class="thumbnail" file_uploader_pdf2tab="{$thumbnail.path}"'; |
---|
[19675] | 24 | $content= str_replace($search, $replacement, $content); |
---|
| 25 | |
---|
| 26 | return $content; |
---|
| 27 | } |
---|
| 28 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.