source: extensions/LinkRoot/main.inc.php @ 29334

Last change on this file since 29334 was 3356, checked in by laurent.duretz, 16 years ago

Insertion of plugin in repository

File size: 680 bytes
Line 
1<?php
2/*
3Plugin Name: LinkRoot
4Version: 2.0
5Description: Add link to root in the categories navigation tree
6Plugin URI: http://www.phpwebgallery.net/ext/extension_view.php?eid=226
7Author: Laurent Duretz
8Author URI: http://www.duretz.net
9*/
10
11add_event_handler('loc_end_index', 'link_root' );
12
13function 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.