Last change
on this file since 18011 was
12361,
checked in by mistic100, 13 years ago
|
remove a prefilter for a better integration, add an option to display a mark on thumbnails list
|
File size:
1.2 KB
|
Rev | Line | |
---|
[10819] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: Back2Front |
---|
| 4 | Version: auto |
---|
| 5 | Description: Add a link on picture's page to show a alternative version of the pic (for postcards for example) |
---|
| 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=533 |
---|
| 7 | Author: Mistic |
---|
| 8 | Author URI: http://www.strangeplanet.fr |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 12 | global $prefixeTable; |
---|
| 13 | |
---|
| 14 | define('B2F_DIR', basename(dirname(__FILE__))); |
---|
| 15 | define('B2F_PATH', PHPWG_PLUGINS_PATH . B2F_DIR . '/'); |
---|
| 16 | define('B2F_TABLE', $prefixeTable . 'image_verso'); |
---|
| 17 | |
---|
| 18 | load_language('plugin.lang', B2F_PATH); |
---|
| 19 | include_once(B2F_PATH . 'Back2Front.php'); |
---|
| 20 | |
---|
[10852] | 21 | if (script_basename() == 'picture') |
---|
| 22 | { |
---|
| 23 | add_event_handler('render_element_content', 'Back2Front_picture_content', 99, 2); |
---|
| 24 | } |
---|
[10819] | 25 | |
---|
[12361] | 26 | if (script_basename() == 'index') |
---|
| 27 | { |
---|
| 28 | add_event_handler('loc_end_index_thumbnails', 'Back2Front_thumbnails', 99, 2); |
---|
| 29 | } |
---|
| 30 | |
---|
[10852] | 31 | if (script_basename() == 'admin') |
---|
| 32 | { |
---|
[11219] | 33 | add_event_handler('loc_begin_admin_page', 'Back2Front_picture_modify'); |
---|
[10852] | 34 | |
---|
[12361] | 35 | add_event_handler('get_admin_plugin_menu_links', 'Back2Front_admin_menu'); |
---|
| 36 | function Back2Front_admin_menu($menu) |
---|
| 37 | { |
---|
| 38 | array_push($menu, array( |
---|
| 39 | 'NAME' => 'Back2Front', |
---|
| 40 | 'URL' => get_root_url().'admin.php?page=plugin-' . B2F_DIR)); |
---|
| 41 | return $menu; |
---|
| 42 | } |
---|
[10852] | 43 | } |
---|
| 44 | |
---|
[10821] | 45 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.