SimplePortal
Support => English Support => Topic started 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.
-
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.
-
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?
-
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.
-
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.
-
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?
-
Thank you!
1 thing is there a way to add small thumbnails I suppose beside the link instead of bullet points.
-
That would require some customization, to use a different set of images than the colorful dots.
-
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
-
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.