Very good discussion and imo the first post and info that follows by everyone else makes this worthy of being a Article! I moved this thread here to the articles forum, there is a 7 day redirect link in programming discussions and normally I don't do redirects but just in case some look there first in the next few days ;).
|
Try commenting out the $result line at the bottom. I don't know if that will work in that hook.
|
Quote:
Code:
global $show; |
Quote:
Hook: build_navigation_array Code: PHP Code:
|
A while back I commented about using the database method for adding things to the navigation menu and nobody has shown how to do that.
So, here's my method broken out and heavily commented so it's easy to understand.... Code:
// ########## CREATE NEW NAVIGATION ITEMS ########## |
What hook do they run it in?
|
Quote:
Thank you for your help. You code works, but only for one link. When i want to add more than 1 link, only the last is displayed. Tested with this code : PHP Code:
|
Quote:
I use it in both PHP code for dynamic menus added by an admin from inside a mod and in the admin_options_processing_build hook for adding menus defined by the settings group for a mod. If you use it in the admin_options_processing_build hook, add a !$settings['dummyvar'] condition at the beginning of the code and set $settings['dummyvar'] to 1 at the end of the code so it only runs once when the settings are updated. Of course the variables would have to be gotten from the $settings['xyz'] values from the mod settings and/or some hard coded into the plugin. EDIT: The advantage to using the database for menu items is there aren't any plugins required once the menu is created. vB itself will generate them for you at the proper time. That should be a BIG HINT for the discussion above and below this post that's revolving around a plugin to create a menu that on the surface appears to be a fixed menu that can accept variables (ie: {userinfo.userid} ). Create it once in settings or some other method and forget about it until it needs to change. Which I don't see that happening very often. Code:
{options.toppath}search.php?do=finduser&userid={userinfo.userid}&starteronly=1&contenttype=vBForum_Thread I do not suggest the database method for navigation items where the displayed text for the navigation item changes frequently (the name of the item ie: Forum or What's New) or where the link is not a fixed link with variables. |
Quote:
PHP Code:
|
Quote:
For guys who read : Add an id... |
Quote:
|
Quote:
A higher number will be much better (ex: 1001) OR Get the last navid of link in menu. PHP Code:
PHP Code:
|
What I need to know is how to use the $vbulletin options in a url in the navigation manager
|
{options.optionname}
|
Quote:
I know of...
Can we have custom objects? Thanks! Kym Edit: Found the answer in the code. See: function process_navigation_linkvars($url) in ./includes/functions.php :D Anything in $GLOBALS or in $vbulletin->object where object is options, userinfo etc. |
1- I want add a new Tab, what shoup i put in Tab Script(s) ?
2- I want add a menu and link only for Users Awaiting Moderation, what shoud i put in Show Permission Name ? |
We use Photopost vBgallery and it runs in a different root path to the forum...
eg: ./forurm vs ./gallery As a result any relative paths in the Tabs fail when in the Gallery unless you do some edits in the Navigation Manager. I've built an interim product file for vBgallery 3.01 that has support for the new vB4.2.0 navigation. (I can't post it due to (c) reasons). Chuck @ Photopost has my code and will release an update for vBgallery (soon-ish I hope) |
Quote:
Code:
define('THIS_SCRIPT', 'thenameofthescript'); Quote:
Code:
if(is_member_of($vbulletin->userinfo,3)) |
<removed>
|
Hey guys. I am having an issue with some Show Permissions. I have successfully gotten some working, creating the hook for each special usergroup, however when I add them together, so say I want usergroups X, Y, and Z to see a link, each having a separate $show variable in the hook I have created, when I combine them such as "showx.showy.showz" this seems to make the link appear only if a user is in ALL groups. Is there a character I am supposed to use aside from the dot to create an "or" combination versus and "and" combination? Thanks!
|
Joining them with a dot in the permissions box means all of them must be true.
There isnt any way to do an OR within the box, you would need to do it a hook and assign the result to another show variable. |
Can someone, pleace, tell mi how to make these steps because I'm new in Vbulletin and I had installed some Mod but the NavBar totaly screwed up...
Quote:
|
Quick question, my navigation works for all plugins installed but one.
I doubt it will be updated so any help would be appreciated. This application sits outside of the forum path and the navigation menu doesn't show up. Any code I can add to templates or the php file so it shows the navbar menu then i can disable the navbar plugin for this application. Thanks |
I am using Navigation Manager with an enhancement from DBTech
https://vborg.vbsupport.ru/showthread.php?t=274972 I want to change the appearance (background and text) of just one or two tabs to make them stand out. (hover and non hover) How can I do this please? |
Answered in the other thread you started.
|
I have created a tab via the Nav Manager that links directly to an article.
That link works just fine; however, when I click on the "regular" Articles tab (the standard one, that links to content.php), my users that are not logged in get an Access Denied message. I have checked and the Not Logged In usergroup has read access to CMS. Any ideas? |
1 Attachment(s)
I re-did my site and the problem, above, is fixed.
Now I have another question. :) I am using the Navication manager in 4.2.2 and adding in some Tab sub-menus. My Tabs that have a drop-down menu attached are 1px taller than the ones that do not have sub-menus. :( I see where I can edit the tab template, but I'm not sure what to change. Edit: Another possibility is that the Tab with the drop-down menu is looking at the stylevar or CSS height of the "selected" tab, because they both appear to be 1px larger along the bottom. I am attaching a screenshot of what I mean. |
That is a issue that is related to your custom style, you would need to ask the skin designer what the issue is.
|
Thanks! It looks like we set the navtab border color to the same as the background, so it disappeared.
It looks like the "issue" is that the Tab with the drop-down isn't getting the border applied to it, even with the default style. |
how can i add fb group link in navigation ?
|
In Admin CP go to Settings -> Navigation Manager.
If you want a new tab click the Add Tab button at the bottom. If you want to make it a sub-menu option of an existing tab go to the drop down menu for that tab and choose the "Add Link" option. In either case on the next screen paste in the URL of the Facebook Group. Set any other settings you want. Save Changes. |
All times are GMT. The time now is 01:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|