Please don't snicker...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shwing
    New Member
    • Jun 2004
    • 22
    • 3.5.x

    Please don't snicker...

    I'm not a coder, so please don't laugh at my question. Here goes...
    On PHP pages, I'm able to include a sitewide header containing all absolute links like so:
    PHP Code:
    <?php
                
    include("http://www.domain.com/header.php");
                
    ?>
    Umm.. so I did this in VB's header section and it didn't work. Why not?

    PHP Code:
    <!-- header -->
    <a name="top"></a>
     
    <?php
                
    include("http://www.domain.com/forum_header.php");
                
    ?>
     
    <!-- /header -->
    <!-- content table -->
    $spacer_open
    $_phpinclude_output

    *cowering*

    thanks.
  • conqsoft
    Senior Member
    • Jul 2003
    • 3803
    • 3.6.x

    #2
    You can't use PHP in templates.

    You can add PHP code in a plugin at the global_start hook that executes on every page. In that plugin code, pull your include file into a variable, and you can use that variable to display your output in a template.
    vBulletin v3.8.0's Implementation of Google Adsense Should Be Avoided At All Costs - Do Your Own Adsense Implementation

    Comment

    • shwing
      New Member
      • Jun 2004
      • 22
      • 3.5.x

      #3
      Thank you much for the response and most of all for not laughing.

      Comment

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