Changeset 4382 for extensions/AMenuManager/amm_root.class.inc.php
- Timestamp:
- Nov 28, 2009, 7:20:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMenuManager/amm_root.class.inc.php
r3690 r4382 4 4 Author : Grum 5 5 email : grum@grum.fr 6 website : http://photos. fr6 website : http://photos.grum.fr 7 7 PWG user : http://forum.piwigo.org/profile.php?id=3706 8 8 … … 11 11 See main.inc.php for release information 12 12 13 AMM_root : root class efor plugin13 AMM_root : root class for plugin 14 14 15 15 --------------------------------------------------------------------------- */ … … 19 19 include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/common_plugin.class.inc.php'); 20 20 include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/css.class.inc.php'); 21 21 22 22 23 class AMM_root extends common_plugin 23 24 { 24 25 protected $css; //the css object 26 protected $defaultMenus = array( 27 'favorites' => array('container' => 'special', 'visibility' => '', 'order' => 0, 'translation' => 'favorite_cat'), 28 'most_visited' => array('container' => 'special', 'visibility' => '', 'order' => 1, 'translation' => 'most_visited_cat'), 29 'best_rated' => array('container' => 'special', 'visibility' => '', 'order' => 2, 'translation' => 'best_rated_cat'), 30 'random' => array('container' => 'special', 'visibility' => '', 'order' => 3, 'translation' => 'random_cat'), 31 'recent_pics' => array('container' => 'special', 'visibility' => '', 'order' => 4, 'translation' => 'recent_pics_cat'), 32 'recent_cats' => array('container' => 'special', 'visibility' => '', 'order' => 5, 'translation' => 'recent_cats_cat'), 33 'calendar' => array('container' => 'special', 'visibility' => '', 'order' => 6, 'translation' => 'calendar'), 34 'qsearch' => array('container' => 'menu', 'visibility' => '', 'order' => 0, 'translation' => 'qsearch'), 35 'tags' => array('container' => 'menu', 'visibility' => '', 'order' => 1, 'translation' => 'Tags'), 36 'search' => array('container' => 'menu', 'visibility' => '', 'order' => 2, 'translation' => 'Search'), 37 'comments' => array('container' => 'menu', 'visibility' => '', 'order' => 3, 'translation' => 'comments'), 38 'about' => array('container' => 'menu', 'visibility' => '', 'order' => 4, 'translation' => 'About'), 39 'rss' => array('container' => 'menu', 'visibility' => '', 'order' => 5, 'translation' => 'Notification') 40 ); 25 41 26 42 function AMM_root($prefixeTable, $filelocation) … … 49 65 'amm_randompicture_height' => 0, //0: automatic, otherwise it's the fixed height in pixels 50 66 'amm_randompicture_title' => array(), 51 'amm_sections_modspecials' => array( 52 'favorites' => 'y', 53 'most_visited' => 'y', 54 'best_rated' => 'y', 55 'random' => 'y', 56 'recent_pics' => 'y', 57 'recent_cats' => 'y', 58 'calendar' => 'y' 59 ), 60 'amm_sections_modmenu' => array( 61 'qsearch' => 'y', 62 'tags' => 'y', 63 'search' => 'y', 64 'comments' => 'y', 65 'about' => 'y', 66 'rss' => 'y' 67 ) 67 'amm_sections_items' => $this->defaultMenus 68 68 ); 69 69 … … 191 191 192 192 193 protected function sortSectionsItemsCompare($a, $b) 194 { 195 if($a['container']==$b['container']) 196 { 197 if($a['order']==$b['order']) return(0); 198 return(($a['order']<$b['order'])?-1:1); 199 } 200 else return(($a['container']<$b['container'])?-1:1); 201 } 202 203 protected function sortSectionsItems() 204 { 205 uasort($this->my_config['amm_sections_items'], array($this, "sortSectionsItemsCompare")); 206 } 193 207 194 208 } // amm_root class 195 209 196 210 211 197 212 ?>
Note: See TracChangeset
for help on using the changeset viewer.