Forum block : how do i get a vbulletin->options['content'] into forum blocks ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eqvaliser
    Senior Member
    • Apr 2008
    • 434
    • 1.1.x

    [Forum] Forum block : how do i get a vbulletin->options['content'] into forum blocks ?

    SOLVED!!


    Experimenting with forumblocks to move some widgets into it..

    But im stuck at getting options transfered...

    esample code

    PHP Code:
    $output "hello <br /><hr />"
     
    $output .= "ewen more hello - " $vbulletin->options['ew_highcol'] ; 
     
    return 
    $output
    Also tryed vB::$vbulletin->options['ew_highcol']
    but that just causes entire site failure with error vB:: class not found..

    tryed removeing ' ' in the braces, but no luck there either.

    Any suggestions ?
    Last edited by Eqvaliser; Wed 10 Feb '10, 3:22pm.
    Vbulletin fan
  • Eqvaliser
    Senior Member
    • Apr 2008
    • 434
    • 1.1.x

    #2
    nvm,, SOLVED

    needed to add

    global $vbulletin, $vbphrase;

    infront of it all!!
    Vbulletin fan

    Comment

    • Lynne
      Former vBulletin Support
      • Oct 2004
      • 26255

      #3
      You don't return $output, so remove that line. $output just gets output into the default template. And I think you can either make $vbulletin global or use vB:: in front of it (probably didn't work because of your return line).

      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

      • Eqvaliser
        Senior Member
        • Apr 2008
        • 434
        • 1.1.x

        #4
        Hi lynne,, long time no see

        i just tryed removeing the return $output;
        which just makes the block entirely empty..

        and again if i remove return and add the vB:: again then i get the missing class error..

        for the record, using the lastet build currently 4.0.1 and latest php/mysql availible via Xampp (localhost)
        so everything is up to date..

        But i guess if it does nothing, but still works for me with it, and not without it. Im just gonna leave it there..

        my complete test.
        PHP Code:
        global $vbulletin;
        $output "hello <br /><hr />";
        $myoption $vbulletin->options['ew_highcol'];
        $output .= "ew_highcol number = " .  $myoption;
        return 
        $output
        Just tryed converting my wow recruitment CMS widget to forumwidget using this as princip
        and it works, wery few changes needed for it to work in forumblocks.
        Vbulletin fan

        Comment

        • Lynne
          Former vBulletin Support
          • Oct 2004
          • 26255

          #5
          Ack! You know what, I was getting my widgets and blocks mixed up. (I don't know why since you clearly say forum block!) So sorry.

          I just tried this as a block (had to change the option to something I had):
          Code:
          global $vbulletin;
          $output = "hello <br /><hr />";
          $myoption = $vbulletin->options['description'];
          $output .= "ew_highcol number = " .  $myoption;
          return $output;
          That worked just fine for me.

          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

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