Announcement

Collapse
No announcement yet.

importing variables from plugins

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 29th Dec '07, 1:29pm.
    ai-stockmarketforum vbulletin-faq vbulletin-fans

  • #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


    • #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 29th 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...
      X