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