SimplePortal

Support => English Support => Topic started by: mattb on September 30, 2010, 07:03:30 PM

Title: forum menu block
Post by: mattb on September 30, 2010, 07:03:30 PM
Hi,

I'm wondering if the forum menu block can be edited to add custom links to stuff sort of like a site navigation on vbulletin's vbadvanced cms.
Title: Re: forum menu block
Post by: AngelinaBelle on October 01, 2010, 09:07:29 AM
Without doing any customization:
 
For SMF 2.0 RC3,
function sp_menu in PortalBlocks.php uses $context['menu_buttons'].
You can see how this array is build in function setupMenuContext in Subs.php, and how it is used to make the button menu in function template_menu in index.template.php.
 
So I think the easiest way to add stuff to the nav. menu and the navigation block would be to add it to 'menu_buttons'. There are even some mods available at simplemachines.org to make it easier to add stuff to menu_buttons.
 
Of course, you can edit the forum menu block if you prefer. You might even enjoy it.
Title: Re: forum menu block
Post by: mattb on October 01, 2010, 11:41:06 PM
Ok so where could I edit the menu to wear it doesnt use the links from the navigation bar at the top and i can use my own?
Title: Re: forum menu block
Post by: deansmar on October 02, 2010, 08:25:39 AM
as your using SMF2 RC3, the menu is controlled by the Subs.php

look for ; function setupMenuContext()

not far after that you will find ; $buttons = array(

this is were all of the menu buttons are controled.
Title: Re: forum menu block
Post by: deansmar on October 03, 2010, 07:23:58 AM
this is very true... there are lots of mods for Menus over at SMF.org

even putting the menu right up top like the SMF.org site.
Title: Re: forum menu block
Post by: mattb on October 03, 2010, 04:14:54 PM
i saw some mods on smf.org but most where for older versions of smf, and the others are top menus like on smf.org I was thinking side menu like vbulletin's block "site navigation" if there isn't another way Could I try that html/php code xvp40?
Title: Re: forum menu block
Post by: mattb on October 03, 2010, 08:09:34 PM
Thank you!

1 thing is there a way to add small thumbnails I suppose beside the link instead of bullet points.
Title: Re: forum menu block
Post by: AngelinaBelle on October 12, 2010, 07:07:05 PM
That would require some customization, to use a different set of images than the colorful dots.
 
Title: Re: forum menu block
Post by: deansmar on October 13, 2010, 12:30:00 AM
if your after a menu that is vertical, why dont you use the Forum Menu Block
(Displays a vertical forum menu) that is already available in SP?

you could add thumbnails to that code...

and of course you can make your own with HTML or PHP


Title: Re: forum menu block
Post by: AngelinaBelle on October 14, 2010, 07:19:22 AM
The forum menu block uses your site's navigation menu in a block.  So any changes you make to the menu get made to the block.
 
If that is not what you want, you can certainly create a custom php block from the guts of the forum menu block, and change where it gets its menu data from.
SimplePortal 2.3.8 © 2008-2024, SimplePortal