Announcement

Collapse
No announcement yet.

3.8 to 4.0 upgrade breaks file include Plugin

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

  • NickyDee
    replied
    The method for including PHP files changed between 3.8 and 4.0. Have a look on vbulletin.org, you probably need to make modifications to both the plugin and the filetoinclude.php itself. - your finished piece will look something like;

    Code:
    //phpinclude
    ob_start();
    include('filetoinclude.php');
    $includedphp = ob_get_contents();
    ob_end_clean();
    vB_Template::preRegister('name_of_template', array('includedphp' => $includedphp));
    You may also run into problems using a variable named $header and $footer when both already exist in vB.
    Last edited by NickyDee; Fri 2 Jul '10, 5:18pm.

    Leave a comment:


  • icarusforde
    replied
    Agreed, vB.com doesn't provide hack help.

    Leave a comment:


  • Reeve of Shinra
    replied
    vbulletin.org would be the correct place to ask for help on this.

    Leave a comment:


  • EnvanoVB
    replied
    Bump.

    Leave a comment:


  • EnvanoVB
    started a topic [Forum] 3.8 to 4.0 upgrade breaks file include Plugin

    3.8 to 4.0 upgrade breaks file include Plugin

    Under the plugin manager I am currently using the following:

    Code:
    ob_start();
       $blockHBX = true;
       include($_SERVER['DOCUMENT_ROOT'] . '/lib/header.inc.php');
       $header = ob_get_contents();
       vB_Template::preRegister('header',array('header' => $header));
    ob_clean();
       $miller_forumbanner = 'projectsforum';
       $miller_noinc = true;
       include($_SERVER['DOCUMENT_ROOT'] . '/lib/footer.inc.php');
       $footer = ob_get_contents();
       vB_Template::preRegister('footer',array('footer' => $footer));
    ob_end_clean();
    In my 'common template' header & footer area I am using the following:

    Code:
    $header
    $footer
    Yet this is not working. it just renders it as normal PHP. Can somebody help me to get this working?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X