Announcement

Collapse
No announcement yet.

How do I call a new template?

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

  • Prince
    replied
    Oh, well I could not figure out how to make it work with a template, so I just added the code to the php script.

    Here is what I was trying to do --> http://www.ironmagazine.com/forum/top10posters.php

    I probably ended up doing it the hard way, but it works!

    Leave a comment:


  • tubedogg
    replied
    Originally posted by samtha25
    I suppose I don't need to say that adding templates that can't be used isn't exactly useful.
    No, but a large percentage of users hack their boards and this helps provide an easy way to insert templates.

    I did all of this, but the $varToUse does not create a hyperlink when I add it to my forum home template.
    It won't create a link, it will insert the contents of the referenced template at the point you insert $varToUse.

    Leave a comment:


  • Prince
    replied
    Originally posted by FireFly
    Actually you can use new templates without editing the PHP code.
    In the PHP Parsed (aka phpinclude) template, add the following:
    Code:
    eval("\$varToUse = \"".gettemplate("templateName")."\";");
    where $varToUse is what you will later use in your other templates, and templateName is the name of the template you have added.
    I did all of this, but the $varToUse does not create a hyperlink when I add it to my forum home template.

    Leave a comment:


  • Chen
    replied
    Actually you can use new templates without editing the PHP code.
    In the PHP Parsed (aka phpinclude) template, add the following:
    Code:
    eval("\$varToUse = \"".gettemplate("templateName")."\";");
    where $varToUse is what you will later use in your other templates, and templateName is the name of the template you have added.

    Leave a comment:


  • samtha25
    replied
    I suppose I don't need to say that adding templates that can't be used isn't exactly useful.

    So, the only supported use of that feature, then, is for adding FAQ pages.

    Leave a comment:


  • tubedogg
    replied
    You can add all the templates you want in the Admin CP however in order to actually use them you have to edit the PHP code which is what we don't support. The only exception is the FAQ templates, in which you can add templates named
    faqX
    where X is a number starting with 4 and they will automatically work because of the way the FAQ system is setup.

    Leave a comment:


  • samtha25
    replied
    Since the ability to add a template is provided for in the admin panel, why is this considered hacking and something not supported by Jelsoft?

    Leave a comment:


  • tubedogg
    replied
    You need to edit the actual PHP code to call a template. Since that is hacking you'll need to ask over at www.vbulletin.org .

    Leave a comment:


  • Prince
    started a topic How do I call a new template?

    How do I call a new template?

    I want to add a link on my main forum page that calls a template and displays some stats in it.

    I want the link to work the way that the "Forum Leaders" link works. The only difference would be that I would display my own info in the middle.

    I do not need the code for the stats, I just need to know how to create the template and how to call it with a link.

Related Topics

Collapse

Working...
X