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