Announcement

Collapse
No announcement yet.

Possible to use php scripts in templates?

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

  • Possible to use php scripts in templates?

    Why isnt it possible to use php scripts in the templates?

    I need to get two strings like :


    PHP Code:
    require "adrotator/ad.php";

    echo 
    show_ad(); 
    showing up in headers and footers section, but for what I have found sofar its not possible? Why?

    Tom Christensen
    SexUSA Board

  • #2
    So many online and noone that can answer this?

    Comment


    • #3
      The only template that takes php code is phpinclude. This is due to the way the templates are parsed -- allowing php code in all templates would make the user need to understand PHP to edit them.

      Comment


      • #4
        I don't know if this would work but perhaps you can set your code into a variable in the phpinclude then use the variable in the template:

        $variable="[the code you posted above";

        then use $variable in the header and footer...

        Comment

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