1
tg1979
How do I remove sublinks on the main menu?
  • 2007/7/18 12:02

  • tg1979

  • Just popping in

  • Posts: 4

  • Since: 2007/3/14


Hey everyone,

I've been trying to figure out how to remove/hide the sublinks that appear under the main link of MXdirectory. Basically I just want the Submit, Popular and My Listings links to stay, as I will not be using the rating or coupon features.

Anyone know how/where to do this?

Thanks!

2
iHackCode
Re: How do I remove sublinks on the main menu?

just remove or comment out the link and name for that link, in the array for sublinks in the xoops_version.php file for that module.

an example from the dxo wiki.
*

      
$modversion['sub'][1]['name'] = _MI_NEWS_SMNAME1;
          
o Name of the submenu in the Main Menu (when you click on the module)
    *

      
$modversion['sub'][1]['url'] = "submit.php";
          
o File to run in the module directory


but.. some modules also have a permission setting for showing/hiding submenu links.

if you are having problems with editing it, paste in the code and i'll try to assist.

edit.. christian has a good answer below with code.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

3
christian
Re: How do I remove sublinks on the main menu?
  • 2007/7/18 13:50

  • christian

  • Just can't stay away

  • Posts: 401

  • Since: 2002/2/24


it's easy

Edit the xoops_version.php file and search this :

// Menu
global $xoopsUser;
$modversion['hasMain'] = 1;
if (
$xoopsUser) {
$modversion['sub'][1]['name'] = _MI_XDIR_SMNAME1;
$modversion['sub'][1]['url'] = "submit.php";
}
$modversion['sub'][2]['name'] = _MI_XDIR_SMNAME2;
$modversion['sub'][2]['url'] = "topten.php?hit=1";
$modversion['sub'][3]['name'] = _MI_XDIR_SMNAME3;
$modversion['sub'][3]['url'] = "topten.php?rate=1";
$modversion['sub'][4]['name'] = _MI_XDIR_SMNAME4;
$modversion['sub'][4]['url'] = "savings.php";
if (
$xoopsUser) {
  
$modversion['sub'][5]['name'] = _MI_XDIR_SMNAME5;
  
$modversion['sub'][5]['url'] = "mylistings.php";
}


To hide a line it is enough to put the line concerned in comment by prefixing it with the // characters.


To know the correspondence of the links, the answer is in the file language modinfo.php
// Sub menu titles
define("_MI_XDIR_SMNAME1","Submit");
define("_MI_XDIR_SMNAME2","Popular");
define("_MI_XDIR_SMNAME3","Top Rated");
define("_MI_XDIR_SMNAME4","Special Offers");
define("_MI_XDIR_SMNAME5","My Listings");

After modifications, you must update the module.

4
PepeMty
Re: How do I remove sublinks on the main menu?
  • 2007/7/18 13:57

  • PepeMty

  • Just popping in

  • Posts: 59

  • Since: 2005/11/14


I rather use the MultiMenu module which allows you to highly customize your menus.

Give it a try.

5
tg1979
Re: How do I remove sublinks on the main menu?
  • 2007/7/18 14:06

  • tg1979

  • Just popping in

  • Posts: 4

  • Since: 2007/3/14


xoops_version.php is like the one file I didn't look at... go figure! Thank you all for your help, you guys are awesome!

PepeMty... I'll check into the Multimenu module. Thanks for the recommendation!

6
christian
Re: How do I remove sublinks on the main menu?
  • 2007/7/18 14:14

  • christian

  • Just can't stay away

  • Posts: 401

  • Since: 2002/2/24


The xoops_version.php file is in the mxdirectory folder ->[root]/modules/mxdirectory/xoops_version.php

Login

Who's Online

163 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits