Announcement

Collapse
No announcement yet.

Creating a new template that can be parse php

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

  • Creating a new template that can be parse php

    Hello. How do I do this in vB2?

    Ive created a template named "banner". I would like to put ad code in this template. I'm calling this template from practically all my pages in the forum. However, I tried adding $banner to the templates and it did not work. How do I show this banner template and enable it to parse php code?

  • #2
    The phpinclude template is included in every page, and allows php code to be executed.

    Comment


    • #3
      Ok thank you! I'll look for it.

      Comment


      • #4
        HELP!!

        I put $phpinclude in my forumhome template

        The $phpinclude had the following in it:

        require("/home/zanwar/web/html/phpads/config.inc.php");
        require("/home/zanwar/web/html/phpads/view.inc.php");
        require("/home/zanwar/web/html/phpads/acl.inc.php");
        view("chickclick");

        And now when i access my forums at http://adolescentadulthood.com/jack , I get an error message with only $phpinclude showing.

        Comment


        • #5
          First of all, turn off all Header output (including gzip) for the forums using the control panel and see if that makes a difference... once you've done that, report back.

          Comment


          • #6
            I get a parse erro whenever the phpinclude template has something in it. WHy?

            Comment


            • #7
              okay, let's try something really simple.

              empty your phpinclude template, then insert this code into it (exactly as it is entered here):
              PHP Code:
              for ($i 0$i 10$i++)
                {
                
              $spaces .= " ";
                
              $testOutput .= $spaces."Hello, I am working<br>\n";
                } 
              Then, at the start of your header template, insert this:
              Code:
              $testOutput
              Try that and report back.

              Comment


              • #8
                I've also been having trouble with my phpinclude and phpAds - I will post here if I manage to work it out.

                Comment

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