Changeset 26643 for extensions/see_photos_by_user/main.inc.php
- Timestamp:
- Jan 12, 2014, 12:55:14 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/see_photos_by_user/main.inc.php
r26636 r26643 11 11 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 12 12 13 14 13 define('SPBA_DIR' , basename(dirname(__FILE__))); 15 14 define('SPBA_PATH' , PHPWG_PLUGINS_PATH . SPBA_DIR . '/'); 16 15 17 18 16 function add_link_SPBA($menu_ref_arr) 19 {17 { 20 18 global $conf, $user; 21 22 19 $menu = & $menu_ref_arr[0]; 23 24 20 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 } 40 37 41 38 function section_init_SPBA() … … 43 40 global $tokens; 44 41 if (in_array('See_photos_by_user', $tokens)) 45 42 include(SPBA_PATH . 'pagespba.php'); 46 43 } 47 44
Note: See TracChangeset
for help on using the changeset viewer.