PHP in Templates?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benny92000
    Member
    • Feb 2009
    • 46

    PHP in Templates?

    I want to add some PHP code to vB templates. Say for instance the navbar, can i add PHP code straight into it?
  • GraViTY
    Senior Member
    • May 2009
    • 194
    • 3.8.x

    #2
    it is kind of like php, but not exactly.

    ex:
    in php, you would type
    if ($show['example'])
    but in vB templates, you type:
    <if condition="$show['example']">
    you can type the <if> right into it. and at the end: </if>

    EDIT: also I am not sure if all php things work with vBulletin....
    http://www.exngaming.com
    AIM- eXn GraViTY
    Skype- smartkidbk5
    Email- [email protected]

    Comment

    • Ronald0
      Member
      • Jan 2009
      • 80
      • 3.8.x

      #3
      Originally posted by GraViTY
      it is kind of like php, but not exactly.

      ex:
      in php, you would type
      but in vB templates, you type:
      you can type the <if> right into it. and at the end: </if>

      EDIT: also I am not sure if all php things work with vBulletin....

      Yes thats HTML.

      Comment

      • GraViTY
        Senior Member
        • May 2009
        • 194
        • 3.8.x

        #4
        Originally posted by Ronald0
        Yes thats HTML.
        if/else is php

        If he was talking about html, yes you can put html into your vB templates...
        http://www.exngaming.com
        AIM- eXn GraViTY
        Skype- smartkidbk5
        Email- [email protected]

        Comment

        • cellarius
          Senior Member
          • Aug 2005
          • 4586
          • 3.8.x

          #5
          The <if>-syntax in vB templates is not php, although they work the same way. It's a meta language for PHP of sorts. And of course they are not html. Anyway, it is not possible to use php in templates. That's what plugins are for.
          The better place to ask questions like this would probably be vbulletin.org.

          Comment

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