Ignore:
Timestamp:
Jan 12, 2014, 12:55:14 AM (11 years ago)
Author:
ddtddt
Message:

[extensions] - see_photos_by_user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/see_photos_by_user/main.inc.php

    r26636 r26643  
    1111if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    1212
    13 
    1413define('SPBA_DIR' , basename(dirname(__FILE__)));
    1514define('SPBA_PATH' , PHPWG_PLUGINS_PATH . SPBA_DIR . '/');
    1615
    17 
    1816function add_link_SPBA($menu_ref_arr)
    19 {
     17 {
    2018  global $conf, $user;
    21 
    2219  $menu = & $menu_ref_arr[0];
    23  
    2420  if (($block = $menu->get_block('mbSpecials')) != null)
    25   {
    26     load_language('plugin.lang', SPBA_PATH);
    27 
    28     $position = (isset($conf['SPBA_position']) and is_numeric($conf['SPBA_position'])) ? $conf['SPBA_position'] : count($block->data)+1;
    29 
    30     array_splice($block->data, $position-1, 0, array('See_photos_by_user' =>
    31       array(
    32         'URL' => make_index_url(array('section' => 'See_photos_by_user')),
    33         'TITLE' => l10n('See photos by user'),
    34         'NAME' => l10n('See photos by user')
    35         )
    36       )
    37     );
    38   }
    39 }
     21   {
     22   load_language('plugin.lang', SPBA_PATH);
     23   $position = (isset($conf['SPBA_position']) and is_numeric($conf['SPBA_position'])) ? $conf['SPBA_position'] : count($block->data)+1;
     24   array_splice
     25         ($block->data, $position-1, 0, array
     26          ('See_photos_by_user' =>
     27      array
     28                         (
     29                         'URL' => make_index_url(array('section' => 'See_photos_by_user')),
     30                         'TITLE' => l10n('See photos by user'),
     31                         'NAME' => l10n('See photos by user')
     32       )
     33    )
     34   );
     35   }
     36 }
    4037
    4138function section_init_SPBA()
     
    4340  global $tokens;
    4441  if (in_array('See_photos_by_user', $tokens))
    45     include(SPBA_PATH . 'pagespba.php');
     42  include(SPBA_PATH . 'pagespba.php');
    4643}
    4744
Note: See TracChangeset for help on using the changeset viewer.