1
dream77
multimenue
  • 2005/10/2 12:32

  • dream77

  • Just popping in

  • Posts: 72

  • Since: 2005/7/24


Hi!

I want to have two dynamic sublinks, but I do not want them to show at the same time. And that is the problem

for instance

A
test a (dynamic sublink)

B
test b (dynamic sublink)

This is how it looks when I press A, but I want it to look like this.

A
test a (dynamic sublink)

B
And now this dynamic sublink are gone, and will onley be shown if you press B, and then ofcourse the A´s dynamic sublink will not be shown.

How do I make this happen, please help me.

2
dream77
Re: multimenue
  • 2005/10/8 17:02

  • dream77

  • Just popping in

  • Posts: 72

  • Since: 2005/7/24


Anyone? Please help!

3
dream77
Re: multimenue
  • 2005/12/31 4:58

  • dream77

  • Just popping in

  • Posts: 72

  • Since: 2005/7/24


Ok, I try again.

Hello, Anyone, Please help me with this.

Regards, Martin

4
gestroud
Re: multimenu
  • 2005/12/31 9:09

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


As a non-coder, the only suggestion I could make would to make a copy of your multimenu block, but make one show "A" as a dynamic sublink, and the other show "B." Give them the same weight in Blocks Administration, and have one that will show up on every page except the "B" page and the other one will only show up on the "B" page.

Probably doesn't make any sense. I really need to stop taking peyote.

5
dream77
Re: multimenu
  • 2005/12/31 13:54

  • dream77

  • Just popping in

  • Posts: 72

  • Since: 2005/7/24


But then I will have two blocks, and that is not god, I onley whant to show one block. It would look strange with a block with just one link. But Maybe I misunderstood you?

I found this solution, but I do not get it. Unfortenley I could not register to post at that time and ask, maybe someone her understand it.

"In the gizmhail version of block.php"
I do not find any gizmhail at all, and in block.php I do not find the lines they talk about.

Please help me if you can.

Re: sublinks open all at once

in the gizmhail version of block.php:
1/ replace the first addition by:
/*
Twins addition : dynamic sub-menu hack
*/

$opengroupheadermenu = -1;
$sql = "SELECT pid ,link
FROM ".$xoopsDB->prefix('multimenu').$options[13]."
WHERE hide = 1
ORDER BY ".$options[3];
$result = $xoopsDB->queryF($sql ,$randlimit ,$rand);
while ( $myrow = $xoopsDB->fetchArray($result) ) {

$isCurrent = substr_count($_SERVER['REQUEST_URI'], $myrow['link']);

if ($isCurrent>0)
{
$opengroupheadermenu = $myrow['pid'];
}
}
/*
End of the addition
*/

2/ remove the second addition

3/ find the line (just above the second addition):
"&& ( $myrow['submenu'] == 1 || $myrow['submenu'] == 2 ) "

4/ add the condition (add a line above the line found at 3/:
&& ($myrow['pid']==$opengroupheadermenu) // Twins addition : dynamic sub-menu hack

This solution have a small restriction:You have to use relative paths in the links of your multimenu, if you do not, it will not work.

Sorry, no comments in my code. If you understand anything to php, you will quickly see why it is better; if you do not, i think you even don't care about that

Thank you guys for the Multimenu mod, it's really great!!

6
gestroud
Re: multimenue
  • 2005/12/31 14:47

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


No. You would not have two blocks displaying at the same time. But do what you want and have fun. Bye.

7
Gizmhail
Re: multimenu
  • 2006/1/6 17:24

  • Gizmhail

  • Just popping in

  • Posts: 15

  • Since: 2005/2/15


Quote:

dream77 wrote:


"In the gizmhail version of block.php"
I do not find any gizmhail at all, and in block.php I do not find the lines they talk about.

Please help me if you can.


I've fallen upon this thread, and I guess I'm the Gizmhail you speak about

The post you quote must be this one. Its author has enhanced (I guess ) a modification I made for multimenu. Here is this modification, a download link is in the page:
http://www.gizmhail.net/xoops/modules/wiwimod/index.php?page=Multimenu_submenu_Patch&back=Multimenu_patch

If I can help you more, don't hesitate !

8
dream77
Re: multimenu
  • 2006/1/6 19:33

  • dream77

  • Just popping in

  • Posts: 72

  • Since: 2005/7/24


Haha, I finaly found gizmhail, or maybe you can say he found me. That was really funny, I am laughing, haha!

Thank you for the link and the edeting of multimenue.


Martin

9
Gizmhail
Re: multimenu
  • 2006/1/6 21:50

  • Gizmhail

  • Just popping in

  • Posts: 15

  • Since: 2005/2/15


Hehe, it's quite handy to have a nickname not really common : a glance at google and I know if someone need help on my works ;)

Well, I read your post again, and my patch should suit your need : if it doesn't, I'm interested, to be able to correct my patch, since it is exactly its goal

Login

Who's Online

235 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 235


more...

Donat-O-Meter

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

Latest GitHub Commits