Announcement

Collapse
No announcement yet.

What is a template exactly?

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

  • Floris
    replied
    What you want requires custom PHP code and custom templates. We unfortunt. can't give support for that. You could try on vBulletin.org - our official sister site, which is a resource site for customizations.

    Leave a comment:


  • CrimsonGT
    replied
    I mostly understood what you are talking about, which makes it seem that a template is not exactly what I need for what I am doing. I was basically wondering if I could design one template called like Members_Page and then use that one template to display all of the members pages?

    So say my members named Bobby, Jim30ZT and CuriousGeorge all have an account. I want them each to have their own member page, the same layout to it, but different content for each member. What will I need for this? Can I have 1 template or do I need to have a different one for each member page?

    Leave a comment:


  • Floris
    replied
    You could look at vBulletin doing it like this:

    The user browses to a file.php and the PHP programming code gets the request from the user, runs the functions to get the data, which is stored in a database, and pulls a template (or multiple ones) to get a design in which it will put the data from the database. This will result in a visual page in the browser.

    The function could be:
    Get the stored amount of users who are online from a table called session.

    The result could be put in the form of a variable:
    $users_online = 12

    The template could be the html code, and in the right spot the variable:
    <div>Total online users: $users_online</div>

    This means if a user goes to a web site it will see:
    Total online users: 12

    Now, the benefit of a template is that you can customize it, for example, make the result appear in bold:
    <div>Total online users: <strong>$users_online</strong></div>

    This means if a user goes to a web site it will see:
    Total online users: 12

    You make 1 template, seperate PHP programming code, and seperate data storage.
    This benefits you as a site admin, you can make multiple styles (like various colors) and the content of your pages can be dynamic. Without having to touch the source code, risking your forums to render useless. And without having to touch your site content, risking your forums to render with incorrect info .. you can have a dynamic web site, which is flexible.

    Basicly, for vBulletin, the template stores the html code that makes the page up visually, having space holders for the dynamic content, like phrases and variables.

    Leave a comment:


  • CrimsonGT
    started a topic What is a template exactly?

    What is a template exactly?

    Alright, I am trying to learn to customize vBulletin and what not, and have an idea for a script I want to make but I need to figure some stuff out first.

    1)What is a template exactly? From my limited experience it appears to be a single page that can be loaded over and over again with different information displayed on it (in the set areas of the page) from the database.

    If I am correct, then I also have a more specific question. I am trying to make it so paying members can have a personals page to display their automobile pictures and modifications to the car. Could I just create a template and load each members data onto the template from the database?

Related Topics

Collapse

Working...
X