No announcement yet.

Can you enter PHP code....

  • Filter
  • Time
  • Show
Clear All
new posts

  • Can you enter PHP code....

    into where you are editing a template?

    For example my FORUMHOME template, I have a service that gives me live status of my Unreal Tournament server, and they are offering an XML feed of it. They said that I can easily parse the information using PHP, and so CAN PHP be inserted into the templates?

    I'm kinda familiar witht he FORUMHOME template. I've allready been able to stick in a small stat window in my location of choice.

    It can be seen here:

    The code I used there was:
    <!--Server Status Box-->
    <div style="margin: -24px 0px 0px 0px" align="center"><iframe src=" body=" allowtransparency="true" background-color="transparent" width="190" height="150" frameborder="1" scrolling="no"></iframe></div>
    <!--End Server Status Box-->

    But honestly, I don't know if this stuff is HTML or PHP or what. I just know you guys and Google are my best friends in doing stuff The only reason I want to complicate my life with the XML feed is because I'd like to add the actual players that are on the server.

  • #2
    So what you're saying is the code you posted above is what you're currently using, but you want to change it so that you're using an XML feed instead?

    Do you know PHP? It would take a bit of coding work to get the XML feed, process it and format it the way you want it to appear.

    But to answer your question, no, php cannot be used in templates, however it can be used in hooks (which requires vBulletin 3.5 or higher), but since your forum is still only 3.0.9, youll have to use the phpinclude_start template.


    • #3
      I have NO clue about PHP, but I found a neat little tutorial on how to do a quick php program to parse information from an XML feed.

      We'll be upgrading to 3.5 this week or so. We started testing our skin and a copy of our forum with 3.5, and everything seems to be find and dandy. So yes, we will have 3.5 soon.

      So how does a hook work?


      • #4
        You can find a lot of information on using PHP and the plugin system at our coding community at I suggest you have a read there and ask if something is not clear.
        Want to take your board beyond the standard vBulletin features?
        Visit the official Member to Member support site for vBulletin Modifications:


        • #5
          Ok thanks!

          As soon as we have 3.5, I'll ask questions on it then. I'd hate to post something now and have people referencing stuff I don't even have.