vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Add to quick links VB 4.1.8 (https://vborg.vbsupport.ru/showthread.php?t=276483)

I.G.O.T.A. 01-05-2012 02:41 PM

Add to quick links VB 4.1.8
 
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:
HTML Code:

                            {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:
PHP Code:

$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:
Code:

<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.

PHP Code:

$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:
PHP Code:

$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 [DATE]1340893800[/DATE] at [TIME]1340893800[/TIME] ---------------

Quote:

Originally Posted by kkinsey
did the navigation update change this?

Nevermind! Apparently it did. I'll cheerfully add my links now :D


All times are GMT. The time now is 07:10 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01398 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete