1
technobia
I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 16:41

  • technobia

  • Not too shy to talk

  • Posts: 122

  • Since: 2006/4/17


XOOPS: Just Upgraded from 2.0.13.1 to 2.0.14
PHP: 4.3.11
MySQL: 4.1
Web Server: IIS 6.0
OS Windows 2003 Server
Theme: Cloned Default

When I was first working with XOOPS I thought I was doing a smart thing and now I realize it was really stupid.

I did not want all the sub menu options showing up in the main menu. I wanted visitors to visit each section for accessing the module/section options. I really want to keep the main menu as small as possible becasue I want to use a block directly below it that is, at least partically, displayed when the home page loads. Otherwise, it would be pushed down and people may not scroll down and see it.

So what I did was edit some file(s) to remove the sub menu options from the code. It worked beautifully until I reciently realized that some modules like AMS have the Submit Article button that only appears on the Sub Menu. Consequently there is no way to submit an article now.

OK so now all I have to do is restore the old file(s) right? Well that would be easy if I only remembered what file(s) I edited. I have searched and searched and can't seem to find the file(s) I edited.

I really do know better than to edit files without making a back up AND documenting the changes. I have definatly RE-learned that lesson

Would someone please show some mercy and help me recover from this bluder? What files do I need to restore?
Thanks, Technobia
http://www.PrideDEPOT.com
Everybody Has A Right!

2
gestroud
Re: I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 17:58

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


Most, if not all, submenu functions can be found in the xoops_version.php file for each module. Just look for the "menu" and "sub menu" sections.

Hopefully, you just commented the code out.

3
technobia
Re: I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 20:57

  • technobia

  • Not too shy to talk

  • Posts: 122

  • Since: 2006/4/17


hmmm... I compared the two xoops_version.php files in the system module with the origininal download and the one I am using now and they are identical. So, I guess I did not alter that file.

I did not change any of these files in the other modules either.

Is there another global menu .php or template file? Any other suggestions?

Thanks!
Thanks, Technobia
http://www.PrideDEPOT.com
Everybody Has A Right!

4
gestroud
Re: I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 21:23

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


You could also look at modinfo.php in the language folders.

5
technobia
Re: I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 21:41

  • technobia

  • Not too shy to talk

  • Posts: 122

  • Since: 2006/4/17


Nope not that one either.

Honestly, I looked and looked and I do not see any files that might have something to do with the main & sub menus menu that appear to be altered.

I was sure there was some file(s) is altered somewhare.

OK let's assume I am remembering it wrong. What else might cause the sub menus for all modules not to show up in the main menu?

I am pretty sure it is not at the module level or ASM Submit Article would be there. Right?
Thanks, Technobia
http://www.PrideDEPOT.com
Everybody Has A Right!

6
msdana
Re: I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 21:48

  • msdana

  • Just can't stay away

  • Posts: 817

  • Since: 2005/12/11


Perhaps you removed it from the system_block_mainmenu.html?

Quote:
<{foreach item=sublink from=$module.sublinks}>
<{$sublink.name}>
<{/foreach}>


Just a thought....
[size=x-small]If God is watching us, the least we can do is be entertaining.[/size]
Graphic Worx : Xoops Themes

7
technobia
Re: I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 22:21

  • technobia

  • Not too shy to talk

  • Posts: 122

  • Since: 2006/4/17


Thanks msdana! That was it!

Now the issue that was the reason I did this in the first place has returned.

I have the weblinks directory set to the home page so now the weblinks sub menu os really long.

Anysuggestions on

A. How to disable the main sub menu just for the webliinks directory module OR

B. Put the weblinks search form and Category list of Web links in a custom block to place on the home page.

THANKS AGAIN!
Thanks, Technobia
http://www.PrideDEPOT.com
Everybody Has A Right!

8
msdana
Re: I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 23:12

  • msdana

  • Just can't stay away

  • Posts: 817

  • Since: 2005/12/11


Quote:
How to disable the main sub menu just for the webliinks directory module


In the weblinks module, starting around line 116 comment out this:
Quote:
// Submenu
// category of the first level by Tom
global $xoopsDB;
$table_link = $xoopsDB->prefix($MODULE_DIRNAME."_category");
$result = $xoopsDB->query("SELECT cid, title FROM ".$xoopsDB->prefix("weblinks_category")." WHERE pid='0' ORDER BY orders, cid");
$i = 4;
while (list($cid, $title) = $xoopsDB->fetchRow($result))
{
$modversion['sub'][$i]['name'] = " - ".$title;
$modversion['sub'][$i]['url'] = "viewcat.php?cid=".$cid."";
$i++;
}


That should prevent your categories from showing up, but will keep Submit,Top Rated, and Popular sub-menus.

[size=x-small]If God is watching us, the least we can do is be entertaining.[/size]
Graphic Worx : Xoops Themes

9
technobia
Re: I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 23:40

  • technobia

  • Not too shy to talk

  • Posts: 122

  • Since: 2006/4/17


Hey that worked great! Thanks!

Is there a way to temporailry remove the Submit, Top, & Popular as well?

The submit link is available directly above the links index and the others will come up blank for some time since I have not launched the site yet and it may take awhile for there be enough data to make it worthwhile to display.
Thanks, Technobia
http://www.PrideDEPOT.com
Everybody Has A Right!

10
msdana
Re: I did a stupid thing! - Main Sub Menus Missing
  • 2006/7/18 23:44

  • msdana

  • Just can't stay away

  • Posts: 817

  • Since: 2005/12/11


Same file, right above what you removed...comment out this:

Quote:
// Menu
$modversion['hasMain'] = 1;
$modversion['sub'][1]['name'] = _MI_WEBLINKS_SMNAME1;
$modversion['sub'][1]['url'] = "submit.php";
$modversion['sub'][2]['name'] = _MI_WEBLINKS_SMNAME2;
$modversion['sub'][2]['url'] = "topten.php?hit=1";
$modversion['sub'][3]['name'] = _MI_WEBLINKS_SMNAME3;
$modversion['sub'][3]['url'] = "topten.php?rate=1";


When you need them again, just un-comment them
[size=x-small]If God is watching us, the least we can do is be entertaining.[/size]
Graphic Worx : Xoops Themes

Login

Who's Online

305 user(s) are online (265 user(s) are browsing Support Forums)


Members: 0


Guests: 305


more...

Donat-O-Meter

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

Latest GitHub Commits