PDA

View Full Version : Add to quick links VB 4.1.8


I.G.O.T.A.
01-05-2012, 02:41 PM
OK I have researched and really don't understand where to modify and add to the quick links or get them from. The links I want to add to the quick links are below. Thanks for the help.

-subscribed threads (already there)
-private messages
-profile settings
-my posts
-my threads
-who's online (already there)

Lynne
01-05-2012, 04:37 PM
You would edit the navbar template and add those links in. Or, just use the template_hooks that are there:
{vb:raw template_hook.navbar_quick_links_menu_pos1}
{vb:raw template_hook.navbar_quick_links_menu_pos2}
{vb:raw template_hook.navbar_quick_links_menu_pos3}

I.G.O.T.A.
01-05-2012, 05:27 PM
OK, I'm still confused, lol. Can you give me a break down how to do that. Thanks JJ

Lynne
01-05-2012, 06:48 PM
To do what?

To edit the template - Style Manager > find style > Edit templates > find navbar > add in your links

To write plugin, Plugin Manager > add new plugin > hook location is probably "process_templates_complete" and then just add in the code like this:
$template_hook['navbar_quick_links_menu_pos1'] .= 'your link code here';

I.G.O.T.A.
01-05-2012, 07:00 PM
Thanks for the help!

jefferis
01-05-2012, 07:20 PM
The problem with this solution is that the link to member profile is variable depending on the user ID, so, is there a way to add this type of code to a link:
<vb:if condition="$memberinfo['musername']">{vb:raw memberinfo.musername}<vb:else />{vb:raw memberinfo.username}</vb:if>

<a href="{vb:link member, {vb:raw memberinfo}}">
{vb:rawphrase view_profile}
</a>
</li>

</vb:if>

Not sure that is even close to being right.

Lynne
01-05-2012, 07:25 PM
You could use a variable to define it first (I think the function is something like fetch_seo_url). It's php, so just write php to define the url and then insert it into the link.

$myvar=fetch_seo_url(whatever....);
$template_hook['navbar_quick_links_menu_pos1'] .= 'htm' .$myvar. 'more html';

kkinsey
06-28-2012, 01:27 PM
Lynne --- is this still valid info?

I've added a plugin to product "vBulletin" at the "process_templates_complete" hook. The PHP code is:$template_hook['navbar_quick_links_menu_pos1'] .= '<li>My Test Menu Item</li>'; Exec. order is "5" and the plugin's marked active.

However, I can't find the text anywhere on the page or in its HTML source... :confused:

I am running 4.2.0 --- did the navigation update change this?

--------------- Added 1340893800 at 1340893800 ---------------

did the navigation update change this?
Nevermind! Apparently it did. I'll cheerfully add my links now :D