- added trigger_action in menubar and page_tail (begin and end)
- small cosmetic change in menubar to simplify life for some plugin features git-svn-id: http://piwigo.org/svn/trunk@1595 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
0428fbe288
commit
eb4214096f
3 changed files with 39 additions and 35 deletions
|
|
@ -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(
|
||||
l10n('%d pictures are also linked to current tags'),
|
||||
$tag['counter']
|
||||
),
|
||||
|
||||
'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']
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------- 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');
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue