aboutsummaryrefslogtreecommitdiffstats
path: root/include/menubar.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-01-17 22:27:10 +0000
committerrub <rub@piwigo.org>2007-01-17 22:27:10 +0000
commit94755e7bd764e2e4ccfa6cbc146b324ac27dc116 (patch)
treedd0844ccd0eaaf4cd1a50327f7abfb4d9daadd4a /include/menubar.inc.php
parent5d9a865fe1931869d3d9edb19f64d66783a0f4f4 (diff)
Issue 0000624: Enhanced Links Menu
Add optional parameter values: o Allow to open url of links menu on new window. o Dynamic visibility of links menu It's a proposition. git-svn-id: http://piwigo.org/svn/trunk@1728 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/menubar.inc.php33
1 files changed, 25 insertions, 8 deletions
diff --git a/include/menubar.inc.php b/include/menubar.inc.php
index 09d08a902..0fcaf1cbc 100644
--- a/include/menubar.inc.php
+++ b/include/menubar.inc.php
@@ -53,15 +53,32 @@ $template->assign_vars(
);
//-------------------------------------------------------------- external links
-foreach ($conf['links'] as $url => $label)
+foreach ($conf['links'] as $url => $url_data)
{
- $template->assign_block_vars(
- 'links.link',
- array(
- 'URL' => $url,
- 'LABEL' => $label
- )
- );
+ if (!is_array($url_data))
+ {
+ $url_data = array('label' => $url_data);
+ }
+
+ if
+ (
+ (!isset($url_data['eval_visible']))
+ or
+ (eval($url_data['eval_visible']))
+ )
+ {
+ $template->assign_block_vars(
+ 'links.link',
+ array(
+ 'URL' => $url,
+ 'LABEL' => $url_data['label']
+ )
+ );
+ if (isset($url_data['new_window']) and $url_data['new_window'])
+ {
+ $template->assign_block_vars('links.link.new_window', array('1'=>'1'));
+ }
+ }
}
//------------------------------------------------------------------------ filter