source: extensions/pdf2tab/thumbnails.inc.php @ 19663

Last change on this file since 19663 was 19663, checked in by julien1311, 12 years ago

rename 2 files

  • Property svn:eol-style set to LF
File size: 891 bytes
Line 
1<?php
2add_event_handler('loc_end_index_thumbnails', 'pdf2tab_thumbnails');
3
4load_language('plugin.lang', PDF2TAB_PATH);
5
6function pdf2tab_thumbnails($tpl_thumbnails_var) {
7        global $template;
8        include_once('include/constants.inc.php');
9       
10        $template->set_prefilter('index_thumbnails', 'pdf2tab_add_tag_thumbnails');
11       
12        $template->assign('pdf2tab_supported_extensions', $supported_extensions);
13        $template->set_filename('pdf2tab_template_thumbnails', PDF2TAB_ABSOLUTE_PATH.'template/thumbnails.tpl');
14        $template->concat('PLUGIN_INDEX_CONTENT_END', $template->parse('pdf2tab_template_thumbnails', true));
15       
16        return $tpl_thumbnails_var;
17}
18
19function pdf2tab_add_tag_thumbnails($content, &$smarty) {
20        global $template;
21
22        $search = 'class="thumbnail"';
23       
24        $replacement = 'class="thumbnail" pdf2tab="{$thumbnail.path}"';
25        $content= str_replace($search, $replacement, $content);
26
27        return $content;
28}
29?>
Note: See TracBrowser for help on using the repository browser.