Last change
on this file since 7690 was
6488,
checked in by patdenice, 14 years ago
|
Update shadowbox to 3.0.3 version.
|
File size:
1.0 KB
|
Rev | Line | |
---|
[6486] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: HD Shadowbox |
---|
| 4 | Version: auto |
---|
| 5 | Description: Display HD pictures in a shadowbox |
---|
| 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=354 |
---|
| 7 | Author: RFDesigns & P@t |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | add_event_handler('loc_begin_picture', 'shadowbox'); |
---|
| 11 | |
---|
| 12 | function shadowbox() |
---|
| 13 | { |
---|
| 14 | global $template; |
---|
| 15 | |
---|
| 16 | $template->set_prefilter('default_content', 'shadowbox_prefilter'); |
---|
| 17 | |
---|
[6488] | 18 | $path = get_root_url().'plugins/'. basename(dirname(__FILE__)).'/shadowbox/'; |
---|
[6486] | 19 | |
---|
| 20 | $template->append('head_elements', ' |
---|
| 21 | <link rel="stylesheet" type="text/css" href="'.$path.'shadowbox.css"> |
---|
| 22 | <script type="text/javascript" src="'.$path.'shadowbox.js"></script> |
---|
| 23 | <script type="text/javascript"> |
---|
| 24 | Shadowbox.init(); |
---|
| 25 | </script>' |
---|
| 26 | ); |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | function shadowbox_prefilter($content, &$smarty) |
---|
| 30 | { |
---|
| 31 | $search = '<a href="javascript:phpWGOpenWindow(\'{$high.U_HIGH}\',\'{$high.UUID}\',\'scrollbars=yes,toolbar=no,status=no,resizable=yes\')">'; |
---|
| 32 | |
---|
| 33 | $replacement = '<a href="{$high.U_HIGH}" rel="shadowbox">'; |
---|
| 34 | |
---|
| 35 | return str_replace($search, $replacement, $content); |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.