importing variables from plugins

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mikep
    Senior Member
    • Jun 2006
    • 164
    • 3.5.x

    importing variables from plugins

    Not sure if I should be asking these sorts of things here or .org

    but If I have just created a simple plugin( in Postbit_diplsay_complete), say:

    title: xyz

    global $vbulletin;
    if (stristr($thread['title'],'a title')){
    $dirlink = "a title";
    print $dirlink;
    }

    how can I know import $dirlink so that I can use it within a template, for example: navbar
    Last edited by mikep; Sat 29 Dec '07, 1:29pm.
    ai-stockmarketforum vbulletin-faq vbulletin-fans
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    You would have to change the hook location to one that is within scope of the navbar, like the parse_templates hook location.

    Comment

    • mikep
      Senior Member
      • Jun 2006
      • 164
      • 3.5.x

      #3
      Thanks Jake, I place the code above in (general)parse_templates, but when trying to use $dirlink in navbar, $dirlink returns blank (even in threads that contain 'a title') since $thread['title'] does not exist in parse_templates

      I have found a way, Im using $foruminfo[title] instead of
      $thread['title']
      Last edited by mikep; Sat 29 Dec '07, 3:04pm.
      ai-stockmarketforum vbulletin-faq vbulletin-fans

      Comment

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