Make a drop down menu for links

Started by Don Houston, October 15, 2016, 07:00:20 PM

Previous topic - Next topic

Don Houston

Yes I have links in my forum but I would prefer to have them as a drop down menu instead of how they are currently is there a mod or plugin to do that?  I am not a very good php coder so I would not know where to start.  If it is not possible then I just won't do it

Illori

how are they currently? some details as to what you have, may help us tell you how to do what you want.

Don Houston

The are posted as redirects at the moment.  Look at kdsupport.info

Vehement Works

Would you explain better, you want a Dropdown menu for your forum, or a dropdown links? with a picture would be better for us. instead if you want a dropdown menu, check subs.php and look the part of private message, it is dropdown, just copy the array and change it values
Last released modifications: AdSense Mod|Font AweaZome BBC code

Sir Osis of Liver

Add this to main button array in /Sources/Subs.php




'links' => array(
'title' => 'Links',
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
'smf' => array(
'title' => 'SimpleMachines',
'href' => 'http://www.simplemachines.org',
'show' => true,
'target' => '_blank',
),
'ks' => array(
'title' => 'NY Times',
'href' => 'http://www.nytimes.com',
'show' => true,
'target' => '_blank',
),
),
),



Find 'All the buttons', it's near the end of the file.  Links will open in new window/tab.  You can add as many as you need.  Backup the file before you try it.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Don Houston

I am not finding it and I am using Dream Weaver, I guess I will just leave it the way it is, I am not a php coder and do not feel like messing anything up

Sir Osis of Liver

If you attach your Subs.php, I'll add the sample code.  You'll just have to edit in your own links.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Don Houston

Sorry was out all day with my family.  Here is the file you asked for

Sir Osis of Liver

File attached.  Look for '/// Add links dropmenu' to find the code.  You can add as many links as you like by copying the link code in the sub_buttons array, just be careful with the brackets.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Don Houston

Never mind I just leave it the way it is.  I put it on my test server first and got an error
QuoteParse error: syntax error, unexpected ';', expecting ')' in /home/kdtestcl/public_html/forum/Sources/Subs.php on line 4129
I am not good and php and do not know how to fix it so I will leave it the way I have it no big deal

Matthew K.

You could also use a menu modification such as Menu Editor Lite or Menu Editor Pro that would allow you to easily do this through your admin panel.

Don Houston

Quote from: Matthew K. on October 18, 2016, 02:10:49 AM
You could also use a menu modification such as Menu Editor Lite or Menu Editor Pro that would allow you to easily do this through your admin panel.

Can I get the link to the Menu Editor Lite?  Don't have the money for pro at this moment


Don Houston

HI Matt Thanks for the link..

Couple Questions:

1.  Can I make a link that is a drop down menu instead of having four links

Basically I am asking for this'


  • KD Links
  • Link 1
  • Link 2
  • Link 3
  • Link 4
Instead of going vertical on the menu bar I would like to see it go down under one menu

Matthew K.

Yeah, you can definitely do that. Menu Editor Lite lacks the ability to deal with permissions for a lot of cases, which is one of the reasons that the Pro version is far superior. Try out the Lite version, see if it works for you, you might be interested in upgrading to Pro shortly after, it can do a lot. You can definitely add links as submenus in Lite though.

Don Houston

Well i am trying to do links and sub menus but I am unable to and right now I can't afford the pro version

Sir Osis of Liver

If you still have it, post the Subs.php you tried to edit.  Looks like you just made a simple code error.  If you try the file I gave you, you'll see how it works.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: