Changeset 31459
- Timestamp:
- Mar 19, 2016, 5:42:50 AM (8 years ago)
- Location:
- extensions/see_my_photos
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/see_my_photos/index.php
r26641 r31459 1 1 <?php 2 // +-----------------------------------------------------------------------+3 // | Piwigo - a PHP based picture gallery |4 // +-----------------------------------------------------------------------+5 // | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |8 // +-----------------------------------------------------------------------+9 // | This program is free software; you can redistribute it and/or modify |10 // | it under the terms of the GNU General Public License as published by |11 // | the Free Software Foundation |12 // | |13 // | This program is distributed in the hope that it will be useful, but |14 // | WITHOUT ANY WARRANTY; without even the implied warranty of |15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |16 // | General Public License for more details. |17 // | |18 // | You should have received a copy of the GNU General Public License |19 // | along with this program; if not, write to the Free Software |20 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |21 // | USA. |22 // +-----------------------------------------------------------------------+23 24 2 // Recursive call 25 3 $url = '../'; -
extensions/see_my_photos/language/en_UK/index.php
r26641 r31459 1 1 <?php 2 // +-----------------------------------------------------------------------+3 // | Piwigo - a PHP based picture gallery |4 // +-----------------------------------------------------------------------+5 // | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |8 // +-----------------------------------------------------------------------+9 // | This program is free software; you can redistribute it and/or modify |10 // | it under the terms of the GNU General Public License as published by |11 // | the Free Software Foundation |12 // | |13 // | This program is distributed in the hope that it will be useful, but |14 // | WITHOUT ANY WARRANTY; without even the implied warranty of |15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |16 // | General Public License for more details. |17 // | |18 // | You should have received a copy of the GNU General Public License |19 // | along with this program; if not, write to the Free Software |20 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |21 // | USA. |22 // +-----------------------------------------------------------------------+23 24 2 // Recursive call 25 3 $url = '../'; -
extensions/see_my_photos/language/en_UK/plugin.lang.php
r26641 r31459 1 1 <?php 2 // +-----------------------------------------------------------------------+ 3 // | See My Photos plugin for piwigo | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2014 - 2016 ddtddt http://temmii.com/piwigo/ | 6 // +-----------------------------------------------------------------------+ 7 // | This program is free software; you can redistribute it and/or modify | 8 // | it under the terms of the GNU General Public License as published by | 9 // | the Free Software Foundation | 10 // | | 11 // | This program is distributed in the hope that it will be useful, but | 12 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 13 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 // | General Public License for more details. | 15 // | | 16 // | You should have received a copy of the GNU General Public License | 17 // | along with this program; if not, write to the Free Software | 18 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 19 // | USA. | 20 // +-----------------------------------------------------------------------+ 2 21 $lang['My photos'] = 'My photos'; 3 22 ?> -
extensions/see_my_photos/language/fr_FR/index.php
r26641 r31459 1 1 <?php 2 // +-----------------------------------------------------------------------+3 // | Piwigo - a PHP based picture gallery |4 // +-----------------------------------------------------------------------+5 // | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |8 // +-----------------------------------------------------------------------+9 // | This program is free software; you can redistribute it and/or modify |10 // | it under the terms of the GNU General Public License as published by |11 // | the Free Software Foundation |12 // | |13 // | This program is distributed in the hope that it will be useful, but |14 // | WITHOUT ANY WARRANTY; without even the implied warranty of |15 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |16 // | General Public License for more details. |17 // | |18 // | You should have received a copy of the GNU General Public License |19 // | along with this program; if not, write to the Free Software |20 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |21 // | USA. |22 // +-----------------------------------------------------------------------+23 24 2 // Recursive call 25 3 $url = '../'; -
extensions/see_my_photos/language/fr_FR/plugin.lang.php
r26641 r31459 1 1 <?php 2 // +-----------------------------------------------------------------------+ 3 // | See My Photos plugin for piwigo | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2014 - 2016 ddtddt http://temmii.com/piwigo/ | 6 // +-----------------------------------------------------------------------+ 7 // | This program is free software; you can redistribute it and/or modify | 8 // | it under the terms of the GNU General Public License as published by | 9 // | the Free Software Foundation | 10 // | | 11 // | This program is distributed in the hope that it will be useful, but | 12 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 13 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 // | General Public License for more details. | 15 // | | 16 // | You should have received a copy of the GNU General Public License | 17 // | along with this program; if not, write to the Free Software | 18 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 19 // | USA. | 20 // +-----------------------------------------------------------------------+ 2 21 $lang['My photos'] = 'Mes photos'; 3 22 ?> -
extensions/see_my_photos/main.inc.php
r27486 r31459 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=722 7 7 Author: ddtddt 8 Author URI: 8 Author URI: http://temmii.com/piwigo/ 9 9 */ 10 // +-----------------------------------------------------------------------+ 11 // | See My Photos plugin for piwigo | 12 // +-----------------------------------------------------------------------+ 13 // | Copyright(C) 2014 - 2016 ddtddt http://temmii.com/piwigo/ | 14 // +-----------------------------------------------------------------------+ 15 // | This program is free software; you can redistribute it and/or modify | 16 // | it under the terms of the GNU General Public License as published by | 17 // | the Free Software Foundation | 18 // | | 19 // | This program is distributed in the hope that it will be useful, but | 20 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 21 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 22 // | General Public License for more details. | 23 // | | 24 // | You should have received a copy of the GNU General Public License | 25 // | along with this program; if not, write to the Free Software | 26 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 27 // | USA. | 28 // +-----------------------------------------------------------------------+ 10 29 11 30 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); … … 18 37 add_event_handler('loc_end_section_init', 'section_init_SMP'); 19 38 39 add_event_handler('loading_lang', 'see_my_photos_loading_lang'); 40 function see_my_photos_loading_lang(){ 41 load_language('plugin.lang', SMP_PATH); 42 } 20 43 21 function add_link_SMP($menu_ref_arr) 22 44 45 function add_link_SMP($menu_ref_arr){ 23 46 global $conf, $user; 24 25 $query = ' 47 $query = ' 26 48 SELECT DISTINCT(id) 27 49 FROM '.IMAGES_TABLE.' … … 37 59 'WHERE' 38 60 ).' 39 AND added_by = \''.$user['id'].'\' 40 ;'; 61 AND added_by = \''.$user['id'].'\';'; 41 62 $result = pwg_query($query); 42 63 $row = pwg_db_fetch_assoc($result); 43 $nbp=count(array_from_query($query, 'id')); 44 45 if (!is_a_guest() and !empty($row)) 46 { 47 $menu = & $menu_ref_arr[0]; 48 if (($block = $menu->get_block('mbSpecials')) != null) 49 { 50 load_language('plugin.lang', SMP_PATH); 51 $position = (isset($conf['SMP_position']) and is_numeric($conf['SMP_position'])) ? $conf['SMP_position'] : count($block->data)+1; 52 array_splice($block->data, $position-1, 0, array('see_my_photos' => 53 array( 64 $nbp=count(array_from_query($query, 'id')); 65 if (!is_a_guest() and !empty($row)){ 66 $menu = & $menu_ref_arr[0]; 67 if (($block = $menu->get_block('mbSpecials')) != null){ 68 $position = (isset($conf['SMP_position']) and is_numeric($conf['SMP_position'])) ? $conf['SMP_position'] : count($block->data)+1; 69 array_splice($block->data, $position-1, 0, array('see_my_photos' => 70 array( 54 71 'URL' => make_index_url(array('section' => 'see_my_photos')), 55 72 'TITLE' => l10n('My photos'), 56 73 'NAME' => l10n('My photos').' ('.$nbp.')', 57 ) 58 ) 59 ); 60 } 61 } 74 ))); 75 } 76 } 62 77 } 63 78 64 function section_init_SMP() 65 { 66 global $tokens; 79 function section_init_SMP(){ 80 global $tokens; 67 81 if (in_array('see_my_photos', $tokens)) 68 include(SMP_PATH . 'pagessmp.php');69 82 include(SMP_PATH . 'pagessmp.php'); 83 } 70 84 ?> -
extensions/see_my_photos/pagessmp.php
r27486 r31459 1 1 <?php 2 load_language('plugin.lang', SMP_PATH); 2 // +-----------------------------------------------------------------------+ 3 // | See My Photos plugin for piwigo | 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2014 - 2016 ddtddt http://temmii.com/piwigo/ | 6 // +-----------------------------------------------------------------------+ 7 // | This program is free software; you can redistribute it and/or modify | 8 // | it under the terms of the GNU General Public License as published by | 9 // | the Free Software Foundation | 10 // | | 11 // | This program is distributed in the hope that it will be useful, but | 12 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 13 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 // | General Public License for more details. | 15 // | | 16 // | You should have received a copy of the GNU General Public License | 17 // | along with this program; if not, write to the Free Software | 18 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 19 // | USA. | 20 // +-----------------------------------------------------------------------+ 3 21 4 22 global $page, $conf, $user; 5 6 7 8 23 $forbidden = get_sql_condition_FandF( 24 array( 'visible_images' => 'id' ), 25 'AND' 26 ); 9 27 $page['section'] = 'see_my_photos'; 10 28 $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator']. '<a href="'.get_absolute_root_url().'index.php?/see_my_photos">'.l10n('My photos').'</a>'; … … 25 43 ).' 26 44 AND added_by = \''.$user['id'].'\' 27 '.$conf['order_by'].' 28 ;'; 29 $page = array_merge 30 ( 45 '.$conf['order_by'].';'; 46 $page = array_merge( 31 47 $page, 32 array 33 ( 48 array( 34 49 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'.l10n('See photos by author').'</a>', 35 50 'items' => array_from_query($query, 'id'),
Note: See TracChangeset
for help on using the changeset viewer.