source: extensions/hide_title_on_browse_path/main.inc.php @ 15874

Last change on this file since 15874 was 12644, checked in by plg, 13 years ago

new plugin (very simple, very specific)

File size: 718 bytes
RevLine 
[12644]1<?php
2/*
3Plugin Name: Hide Title on Browse Path
4Version: auto
5Description: Hide the photo title on Browse Path
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=589
7Author: plg
8Author URI: http://piwigo.wordpress.com
9*/
10
11if (!defined('PHPWG_ROOT_PATH'))
12{
13  die('Hacking attempt!');
14}
15
16add_event_handler('loc_end_picture', 'hide_title_on_browse_path');
17function hide_title_on_browse_path()
18{
19  global $template;
20     
21  $template->set_prefilter('picture', 'hide_title_on_browse_path_prefilter');
22}
23
24function hide_title_on_browse_path_prefilter($content, &$smarty)
25{
26  $pattern = '#\{\$LEVEL_SEPARATOR\}\{\$current.TITLE\}#ms';
27  $replacement = '';
28  return preg_replace($pattern, $replacement, $content);
29}
30?>
Note: See TracBrowser for help on using the repository browser.