How to hide more tab menu ?

Elgg version : 2.0.1

Hi.

I would like to know how to hide the more tab menu ? I 've tried this hook but it doesn't work :

elgg_unregister_menu_item('prepare', 'menu:site', 'elgg_site_menu_setup');

Thank you.

  • I am looking for that answer's been a long time, has not yet found solution, leave the pop-up menu, I would also remove the "show all" my version 1.10

  • elgg_register_event_handler('init','system','disable_more_init');
    
    function disable_more_init(){
       elgg_unregister_plugin_hook_handler('prepare', 'menu:site', '_elgg_site_menu_setup');
    }

    I am not using 2.0.1 but this is how it works in 1.12.x.

  • It works perfectly.

    Thank you very much.

  • This is the code for a custom plugin to do this.
    You just need a plugin with only 2 files in the plugin folder; the manifest and start.php

    The start.php file is where the above goes.

  • Then we'll make you one ;-)
     

    1. Make a directory on your computer and name it: 'disable_more' (or whatever you want).
    2. In that directory, make a file with a sourcecode editor, or text editor, and name it manifest.xml
    3. In that manifest.xml file, copy/past this:
      
      <?xml version="1.0" encoding="UTF-8"?>
      <plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
          <name>Remove More menu</name>
          <author>Your name</author>
          <version>1.0</version>
          <category>Tools</category>
          <description>Removes the more menu</description>
          <website>http://www.yoursite.com</website>
          <copyright></copyright>
          <license>MIT Licence</license>
          <license>GNU General Public License version 2</license>
          <requires>
              <type>elgg_release</type>
              <version>1.9</version>
          </requires>
      </plugin_manifest>
      
    4. now, create a file: start.php, also in that folder
    5. In that file, copy/paste this:
      elgg_register_event_handler('init','system','disable_more_init');
      
      function disable_more_init(){
         elgg_unregister_plugin_hook_handler('prepare', 'menu:site', '_elgg_site_menu_setup');
      }
    6. Upload the directory you created into the /mod folder, and activate it.
    7. You're a developer now ;)
  • with only two folders "manifestations" and "starphp" this activates it anger?

  • Yes Yes! two files within a folder.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking