Changeset 1743


Ignore:
Timestamp:
Jan 22, 2007, 11:06:17 PM (17 years ago)
Author:
rub
Message:

Issue 0000624: Enhanced Links Menu

Add name and features options when new_window is true.
(To display a popup for example)

Location:
trunk
Files:
3 edited

Legend:

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

    r1736 r1743  
    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\'];'),
     182//    'http://download.gna.org/phpwebgallery/' =>
     183//      array('label' => 'PopUp', 'new_window' => true,
     184//      'nw_name' => 'PopUp', 'nw_features' => 'width=800,height=450,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'),
    182185//    );
    183186// Parameters:
     
    187190//    If true open link on tab/window
    188191//    [Default value is true if it's not defined]
     192//  'nw_name':
     193//    Name use when new_window is true
     194//    [Default value is '' if it's not defined]
     195//  'nw_features':
     196//    features use when new_window is true
     197//    [Default value is '' if it's not defined]
    189198//  'eval_visible':
    190199//    It's php code witch must return if the link is visible or not
  • trunk/include/menubar.inc.php

    r1736 r1743  
    7777    if (!isset($url_data['new_window']) or $url_data['new_window'])
    7878    {
    79       $template->assign_block_vars('links.link.new_window', array('1'=>'1'));
     79      $template->assign_block_vars(
     80        'links.link.new_window',
     81        array(
     82          'name' => (isset($url_data['nw_name']) ? $url_data['nw_name'] : ''),
     83          'features' => (isset($url_data['nw_features']) ? $url_data['nw_features'] : '')
     84          )
     85        );
    8086    }
    8187  }
  • trunk/template/yoga/menubar.tpl

    r1728 r1743  
    1010        <a href="{links.link.URL}"
    1111        <!-- BEGIN new_window -->
    12          onclick="window.open(this.href, ''); return false;"
     12         onclick="window.open(this.href,
     13                              '{links.link.new_window.name}',
     14                              '{links.link.new_window.features}'
     15                              ); return false;"
    1316        <!-- END new_window -->
    1417        >{links.link.LABEL}
Note: See TracChangeset for help on using the changeset viewer.