Template Hooks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lairston
    Senior Member
    • Feb 2010
    • 170
    • 4.0.x

    [Forum] Template Hooks

    I was getting ready to add some links to the navbar when I noticed template_hook.navbar_community_menu_end And thought using that would be a lot better.

    How do I use this template hook.navbar_community_menu_end? I immediately thought plugin but that doesn't appear to be where you setup hooks for the template.
    Last edited by Lairston; Mon 31 May '10, 7:01am.
    Quarrels and Quills - always in need of more members
    RPG Tools
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    Your immediate thought was correct. You would write a plugin to use the template_hook. Something like:

    hook_location: process_templates_complete
    PHP Code:
    $template_hook['navbar_community_menu_end'] .= '<li><a href="yourlink.php">Your Link</a></li>'

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment

    • Lairston
      Senior Member
      • Feb 2010
      • 170
      • 4.0.x

      #3
      Thanks Lynne!
      Quarrels and Quills - always in need of more members
      RPG Tools

      Comment

      • Viper007Bond
        Member
        • Oct 2006
        • 59
        • 3.7.x

        #4
        Is "process_templates_complete" the hook that should be used for all of these types of things? I'm trying to do something similar with the "postbit_userinfo_right_after_posts" hook (to add in custom fields), but I can't get it to work even with a static string.


        EDIT: Nevermind, I got it working with "postbit_display_start".
        Last edited by Viper007Bond; Thu 3 Jun '10, 7:55pm.
        FinalGear.com Forums -- Top Gear and general automotive forums

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...