Changeset 26641
- Timestamp:
- Jan 12, 2014, 12:46:45 AM (10 years ago)
- Location:
- extensions/see_my_photos
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/see_my_photos/language/en_UK/plugin.lang.php
r26634 r26641 1 1 <?php 2 2 $lang['My photos'] = 'My photos'; 3 4 3 ?> -
extensions/see_my_photos/language/fr_FR/plugin.lang.php
r26634 r26641 1 1 <?php 2 2 $lang['My photos'] = 'Mes photos'; 3 4 3 ?> -
extensions/see_my_photos/main.inc.php
r26634 r26641 20 20 21 21 function add_link_SMP($menu_ref_arr) 22 {22 { 23 23 global $conf, $user; 24 25 $query = ' 26 SELECT DISTINCT(id) 24 $query = ' 25 SELECT DISTINCT(id) 27 26 FROM '.IMAGES_TABLE.' 28 27 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id 29 28 WHERE added_by = \''.$user['id'].'\' 30 29 ;'; 31 $result = pwg_query($query); 32 $row = pwg_db_fetch_assoc($result); 33 34 if (!is_a_guest() and !empty($row)) 35 { 30 $result = pwg_query($query); 31 $row = pwg_db_fetch_assoc($result); 32 if (!is_a_guest() and !empty($row)) 33 { 36 34 $menu = & $menu_ref_arr[0]; 37 38 35 if (($block = $menu->get_block('mbSpecials')) != null) 39 { 40 load_language('plugin.lang', SMP_PATH); 41 42 $position = (isset($conf['SMP_position']) and is_numeric($conf['SMP_position'])) ? $conf['SMP_position'] : count($block->data)+1; 43 44 array_splice($block->data, $position-1, 0, array('see_my_photos' => 36 { 37 load_language('plugin.lang', SMP_PATH); 38 $position = (isset($conf['SMP_position']) and is_numeric($conf['SMP_position'])) ? $conf['SMP_position'] : count($block->data)+1; 39 array_splice($block->data, $position-1, 0, array('see_my_photos' => 45 40 array( 46 41 'URL' => make_index_url(array('section' => 'see_my_photos')), … … 50 45 ) 51 46 ); 52 }} 47 } 48 } 53 49 } 54 50 55 51 function section_init_SMP() 56 {57 52 { 53 global $tokens; 58 54 if (in_array('see_my_photos', $tokens)) 59 60 }55 include(SMP_PATH . 'pagessmp.php'); 56 } 61 57 62 58 -
extensions/see_my_photos/pagessmp.php
r26634 r26641 1 1 <?php 2 3 2 load_language('plugin.lang', SMP_PATH); 4 3 5 4 global $page, $conf, $user; 6 7 5 $forbidden = get_sql_condition_FandF( 8 6 array( 'visible_images' => 'id' ), 9 7 'AND' 10 8 ); 11 12 9 $page['section'] = 'see_my_photos'; 13 10 14 11 $query = ' 15 12 SELECT DISTINCT(id) 16 17 18 19 20 13 FROM '.IMAGES_TABLE.' 14 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id 15 WHERE added_by = \''.$user['id'].'\' 16 '.$forbidden.' 17 '.$conf['order_by'].' 21 18 ;'; 22 23 $page = array_merge( 24 $page, 25 array( 26 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'.l10n('See photos by author').'</a>', 27 'items' => array_from_query($query, 'id'), 28 ) 29 ); 30 31 19 $page = array_merge 20 ( 21 $page, 22 array 23 ( 24 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'.l10n('See photos by author').'</a>', 25 'items' => array_from_query($query, 'id'), 26 ) 27 ); 32 28 ?>
Note: See TracChangeset
for help on using the changeset viewer.