Last change
on this file since 25433 was
3356,
checked in by laurent.duretz, 15 years ago
|
Insertion of plugin in repository
|
File size:
680 bytes
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: LinkRoot |
---|
4 | Version: 2.0 |
---|
5 | Description: Add link to root in the categories navigation tree |
---|
6 | Plugin URI: http://www.phpwebgallery.net/ext/extension_view.php?eid=226 |
---|
7 | Author: Laurent Duretz |
---|
8 | Author URI: http://www.duretz.net |
---|
9 | */ |
---|
10 | |
---|
11 | add_event_handler('loc_end_index', 'link_root' ); |
---|
12 | |
---|
13 | function link_root() |
---|
14 | { |
---|
15 | global $template, $conf, $lang; |
---|
16 | |
---|
17 | $local_title = $template->get_template_vars('TITLE'); |
---|
18 | if (!(stripos($local_title, $lang['home']) === 0)) |
---|
19 | { |
---|
20 | $local_title = '<a href="'.PHPWG_ROOT_PATH.'">'.$lang['home'].'</a>'.$conf['level_separator'].$local_title; |
---|
21 | } |
---|
22 | |
---|
23 | $template->assign('TITLE', $local_title); |
---|
24 | } |
---|
25 | |
---|
26 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.