No announcement yet.

Module to call php code

  • Filter
  • Time
  • Show
Clear All
new posts

  • Module to call php code

    I'm trying to create a module that will run a php script. below is my php script. I guess I just don't know well enough how to make that run on the forums. I tried to put the raw data in a static html page, but that didn't work so I was thinking I needed to find a way to call the .php script on the server. Am I even remotely close to figuring this out?

    PHP Code:

    if (eregi("block-Sample_Block.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");

    $content = <<<EOT

    <span id="instantventrilo"><a href="">ventrilo</a> Hosting by</span><script type="text/javascript" src=";PORT=10275&amp;STYLE=2&amp;CHANNEL_WNOUSER=YES&amp;SHOW_IP_PORT=NO&amp;HELP=YES&amp;CONLINK=YES&amp;WIDTH=200&amp;FONTSIZE=10&amp;BGCOLOR=FFFFFF&amp;SN_BGCOLOR=000000&amp;SN_COLOR=FFFFFF&amp;INFO_BGCOLOR=0ba122&amp;INFO_COLOR=FFFFFF&amp;HELP_BGCOLOR=409DE0&amp;HELP_COLOR=000000&amp;CHANNEL_BGCOLOR=CCCCCC&amp;CHANNEL_COLOR=000000&amp;UN_BG=FFFFFF&amp;UN=000000&amp;METHOD=js"></script>


    - - - Updated - - -

    Seems I'm blind... I found the php block, but code still not working.

  • #2
    Did you see the documentation on the PHP module here - You need to echo the output, not assign it to $content.

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


    • #3
      Thank you very much! I didn't even know the beta version had documentation. My apologies for not thinking of looking for it. I appreciate the link.

      - - - Updated - - -

      So I totally did it now! haha... I'm still trying to get this to work... for some reason the module now loads the entire site in the iframe with an error. It's stopping me from using any buttons on the page. What file can I edit on the server to manually edit the template or how can I find what page to edit to remove the item from the page.


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