aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xinclude/menubar.inc.php66
-rw-r--r--include/page_tail.php4
-rw-r--r--template/yoga/menubar.tpl4
3 files changed, 39 insertions, 35 deletions
diff --git a/include/menubar.inc.php b/include/menubar.inc.php
index 971b32782..8b7c816c3 100755
--- a/include/menubar.inc.php
+++ b/include/menubar.inc.php
@@ -35,6 +35,8 @@ $template->set_filenames(
)
);
+trigger_action('loc_begin_menubar');
+
$template->assign_vars(
array(
'NB_PICTURE' => $user['nb_total_images'],
@@ -51,29 +53,21 @@ $template->assign_vars(
);
//-------------------------------------------------------------- external links
-if (count($conf['links']) > 0)
+foreach ($conf['links'] as $url => $label)
{
- $template->assign_block_vars('links', array());
-
- foreach ($conf['links'] as $url => $label)
- {
- $template->assign_block_vars(
- 'links.link',
- array(
- 'URL' => $url,
- 'LABEL' => $label
- )
- );
- }
+ $template->assign_block_vars(
+ 'links.link',
+ array(
+ 'URL' => $url,
+ 'LABEL' => $label
+ )
+ );
}
//------------------------------------------------------------------------ tags
if ('tags' == $page['section'])
{
- $template->assign_block_vars('tags', array());
-
// display tags associated to currently tagged items, less current tags
$tags = array();
-
if ( !empty($page['items']) )
{
$tags = get_common_tags($page['items'],
@@ -87,20 +81,6 @@ if ('tags' == $page['section'])
$template->assign_block_vars(
'tags.tag',
array(
- 'URL_ADD' => make_index_url(
- array(
- 'tags' => array_merge(
- $page['tags'],
- array(
- array(
- 'id' => $tag['tag_id'],
- 'url_name' => $tag['url_name'],
- ),
- )
- )
- )
- ),
-
'URL' => make_index_url(
array(
'tags' => array(
@@ -116,14 +96,33 @@ if ('tags' == $page['section'])
'TITLE' => l10n('See pictures linked to this tag only'),
- 'TITLE_ADD' => sprintf(
+ 'CLASS' => 'tagLevel'.$tag['level']
+ )
+ );
+
+ $template->assign_block_vars(
+ 'tags.tag.add',
+ array(
+ 'URL' => make_index_url(
+ array(
+ 'tags' => array_merge(
+ $page['tags'],
+ array(
+ array(
+ 'id' => $tag['tag_id'],
+ 'url_name' => $tag['url_name'],
+ ),
+ )
+ )
+ )
+ ),
+ 'TITLE' => sprintf(
l10n('%d pictures are also linked to current tags'),
$tag['counter']
),
-
- 'CLASS' => 'tagLevel'.$tag['level']
)
);
+
}
}
//---------------------------------------------------------- special categories
@@ -301,5 +300,6 @@ if (isset($page['category']) and $page['cat_uploadable'] )
);
}
+trigger_action('loc_end_menubar');
$template->assign_var_from_handle('MENUBAR', 'menubar');
?>
diff --git a/include/page_tail.php b/include/page_tail.php
index 50b433f9e..0f78484ba 100644
--- a/include/page_tail.php
+++ b/include/page_tail.php
@@ -26,6 +26,8 @@
// +-----------------------------------------------------------------------+
$template->set_filenames(array('tail'=>'footer.tpl'));
+trigger_action('loc_begin_page_tail');
+
$template->assign_vars(
array(
'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
@@ -74,10 +76,10 @@ if ( !empty($debug_vars) )
$template->assign_block_vars('debug',$debug_vars );
}
+trigger_action('loc_end_page_tail');
//
// Generate the page
//
-
$template->parse('tail');
$template->p();
diff --git a/template/yoga/menubar.tpl b/template/yoga/menubar.tpl
index 983260d13..cb613ec2e 100644
--- a/template/yoga/menubar.tpl
+++ b/template/yoga/menubar.tpl
@@ -27,7 +27,9 @@
<ul id="menuTagCloud">
<!-- BEGIN tag -->
<li>
- <a href="{tags.tag.URL_ADD}" title="{tags.tag.TITLE_ADD}"><img src="{pwg_root}{themeconf:icon_dir}/add_tag.png" alt="+"></a>
+ <!-- BEGIN add -->
+ <a href="{tags.tag.add.URL}" title="{tags.tag.add.TITLE}"><img src="{pwg_root}{themeconf:icon_dir}/add_tag.png" alt="+"></a>
+ <!-- END add -->
<a href="{tags.tag.URL}" class="{tags.tag.CLASS}" title="{tags.tag.TITLE}">{tags.tag.NAME}</a>
</li>
<!-- END tag -->