Changeset 1736


Ignore:
Timestamp:
Jan 18, 2007, 11:01:28 PM (17 years ago)
Author:
rub
Message:

Issue 0000624: Enhanced Links Menu

Change default value.
By default, a link will be opened on new tab/window.

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/config_default.inc.php

    r1730 r1736  
    177177//  you can pass a array with different optional parameter values
    178178//  $conf['links'] = array(
    179 //    'http://phpwebgallery.net' => array('label' => 'PWG website', 'new_window' => true, 'eval_visible' => 'return true;'),
     179//    'http://phpwebgallery.net' => array('label' => 'PWG website', 'new_window' => false, 'eval_visible' => 'return true;'),
    180180//    'http://forum.phpwebgallery.net' => array('label' => 'For ADMIN', 'new_window' => true, 'eval_visible' => 'return is_admin();'),
    181181//    'http://phpwebgallery.net/doc' => array('label' => 'For Guest', 'new_window' => true, 'eval_visible' => 'return $user[\'is_the_guest\'];'),
    182182//    );
    183 //
     183// Parameters:
     184//  'label':
     185//    Label to display for the link, must be defined
     186//  'new_window':
     187//    If true open link on tab/window
     188//    [Default value is true if it's not defined]
     189//  'eval_visible':
     190//    It's php code witch must return if the link is visible or not
     191//    [Default value is true if it's not defined]
     192//
    184193// Equivalence:
    185194//  $conf['links'] = array(
  • trunk/include/menubar.inc.php

    r1728 r1736  
    7575        )
    7676      );
    77     if (isset($url_data['new_window']) and $url_data['new_window'])
     77    if (!isset($url_data['new_window']) or $url_data['new_window'])
    7878    {
    7979      $template->assign_block_vars('links.link.new_window', array('1'=>'1'));
Note: See TracChangeset for help on using the changeset viewer.