Announcement

Collapse
No announcement yet.

PHP Include in Template

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

  • PHP Include in Template

    I have to add the line

    <?php include "randomimage.php"; ?>

    in my forumhome template... But it doesn't seem to work, can somebody please give me a way out?


    Thanks!

  • #2
    You cannot use php inside of templates, well you can but only 2. phpinclude_Start and _end

    try putting this in the phpinclude_Start template

    $randomimg = "randomimage.php";

    and then place $randomimg in your forumhome template

    Comment


    • #3
      Originally posted by Zachery
      You cannot use php inside of templates, well you can but only 2. phpinclude_Start and _end

      try putting this in the phpinclude_Start template

      $randomimg = "randomimage.php";

      and then place $randomimg in your forumhome template
      Thank you so much, you are a great help!

      Comment


      • #4
        I can run this anywhere else? Can I put it in another template rather than forum home?

        Comment


        • #5
          Yes, that will work in any template in vBulletin as long as the php statment stays in the phpinclude

          Comment

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