]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updating plugin to use new administration links and canvas.
authorNick Whitt <nick.whitt@gmail.com>
Mon, 24 May 2010 21:30:17 +0000 (21:30 +0000)
committerNick Whitt <nick.whitt@gmail.com>
Mon, 24 May 2010 21:30:17 +0000 (21:30 +0000)
pages/admin.php
start.php

index d3e81035164b11f8038cf85f2d01d777fe811cbe..addff5b50475621e2f0c207b9125b48051a846cf 100644 (file)
@@ -18,6 +18,6 @@
        
        $body .= elgg_view("tidypics/admin/tidypics", array('tab' => $tab));
        
-       page_draw(elgg_echo('tidypics:administration'), elgg_view_layout("two_column_left_sidebar", '', $body));
+       page_draw(elgg_echo('tidypics:administration'), elgg_view_layout("administration", $body));
 
 ?>
\ No newline at end of file
index 02f0c6414443f3a13f19c402ccc036e69e670ba8..c447c2a3468dccdd543ac2a9e667dd34f4164766 100644 (file)
--- a/start.php
+++ b/start.php
                }
                                
                // Extend CSS
-               extend_view('css', 'tidypics/css');
+               elgg_extend_view('css', 'tidypics/css');
                
                // Extend hover-over and profile menu
-               extend_view('profile/menu/links','tidypics/hover_menu');
+               elgg_extend_view('profile/menu/links','tidypics/hover_menu');
                
                //group view  ** psuedo widget view for group pages**
-               extend_view('groups/right_column','tidypics/groupprofile_albums');
+               elgg_extend_view('groups/right_column','tidypics/groupprofile_albums');
                
                // rss extensions
-               extend_view('extensions/xmlns', 'extensions/tidypics/xmlns');
-               extend_view('extensions/channel', 'extensions/tidypics/channel');
+               elgg_extend_view('extensions/xmlns', 'extensions/tidypics/xmlns');
+               elgg_extend_view('extensions/channel', 'extensions/tidypics/channel');
                
                // Register a page handler, so we can have nice URLs
                register_page_handler('photos','tidypics_page_handler');
                }
                
                // slideshow plugin hook
-               register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow');            
+               register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow');
+               
+               elgg_add_submenu_item(array(
+                       'text' => elgg_echo('tidypics:administration'),
+                       'href' => "{$CONFIG->wwwroot}mod/tidypics/pages/admin.php",
+                       'parent_id' => 'site',
+               ), 'admin', 'default');
        }
        
        /**
                }
                
        }
-       
-       /**
-        * Sets up tidypics admin menu. Triggered on pagesetup.
-        */
-       function tidypics_adminmenu()
-       {
-               global $CONFIG;
-               if (get_context() == 'admin' && isadminloggedin()) {
-                       add_submenu_item(elgg_echo('tidypics:administration'), $CONFIG->url . "mod/tidypics/pages/admin.php");
-               }
-       }
 
        /**
         * Sets up submenus for tidypics most viewed pages
                $slideshow_link = "javascript:PicLensLite.start({maxScale:0,feedUrl:location.href+'?view=rss'})";
                
                // add the slideshow javascript to the header
-               extend_view('metatags', 'tidypics/js/slideshow');
+               elgg_extend_view('metatags', 'tidypics/js/slideshow');
                
                return $slideshow_link;
        }
        // Make sure tidypics_init is called on initialisation
        register_elgg_event_handler('init','system','tidypics_init');
        register_elgg_event_handler('pagesetup','system','tidypics_submenus');
-       register_elgg_event_handler('pagesetup','system','tidypics_adminmenu');
        
        // Register actions
        register_action("tidypics/settings", false, $CONFIG->pluginspath . "tidypics/actions/settings.php");