Results 1 to 7 of 7

Thread: Making a new template!

  1. #1
    Experienced vBulletin User Half Pint's Avatar
    Join Date
    Apr 2007
    Location
    The UK
    Posts
    334
    i've made a new template and want to include it into the FORUMHOME template without having to copy the code into the right place everytime, how can i do this. If you know what i mean

    come on peeps realy need to know this lol!
    hehe sorry had to say it lol
    Soz
    Half Pint

  2. #2
    Intermediate vBulletin User Gadabout's Avatar
    Join Date
    Jan 2005
    Posts
    62
    your custom template will not be cached with this method

    Make a new vbulletin plugin under forumhome_start call it whatever you like

    in Plugin PHP Code, box enter

    Code:
    eval('$yourtemplatevariable.= "' . fetch_template('yourtemplatename') . '";');
    Replace yourtemplatevariable with whatever name you'd like to call the template with
    Replace yourtemplatename with the name of your custom template.

    save and activate the plugin

    Edit your forumhome template and simply enter the name that you gave to the $yourtemplatevariable where you'd like your template inserted.

  3. #3
    Experienced vBulletin User Half Pint's Avatar
    Join Date
    Apr 2007
    Location
    The UK
    Posts
    334
    EDIT: Don't worry sorted it! thanks
    Dude your a ledgend! thanks

    Half Pint

  4. #4
    Experienced vBulletin User Hell³'s Avatar
    Join Date
    Jun 2006
    Posts
    1,264
    Actually, by looking at how the big guys (meaning, real coders, unlike me )cache their templates nowadays, you better create your plugin at the cache_templates hook and add this code or something equivalent:

    PHP Code:
    $globaltemplates array_merge($globaltemplates, array('your_templatename')); 
    This is the only method that has worked for me and my custom templates for ad codes/banners.

    Edit, your code looks more like the code to parsing it, which also could be better located at the parse_templates hook.

  5. #5
    Intermediate vBulletin User Gadabout's Avatar
    Join Date
    Jan 2005
    Posts
    62
    Quote Originally Posted by Hell³ View Post
    Actually, by looking at how the big guys (meaning, real coders, unlike me )cache their templates nowadays, you better create your plugin at the cache_templates hook and add this code or something equivalent:

    PHP Code:
    $globaltemplates array_merge($globaltemplates, array('your_templatename')); 
    This is the only method that has worked for me and my custom templates for ad codes/banners.

    Edit, your code looks more like the code to parsing it, which also could be better located at the parse_templates hook.
    Well hot damn... that's needed to know information! Thanks

  6. #6
    Experienced vBulletin User Hell³'s Avatar
    Join Date
    Jun 2006
    Posts
    1,264
    No biggie, I found about this after using a hack that gave me some quick ministats at the bottom of my forum and kept telling me about uncached templates after trying to add my adsense via templates.

  7. #7
    kotq8
    Guest
    Good i

Similar Threads

  1. Making skin with photoshop?
    By ColoChris in forum Setting up and Customizing your Forum
    Replies: 9
    Last Post: 02-08-2008, 01:37 AM
  2. vB Mod Making...
    By Half Pint in forum Setting up and Customizing your Forum
    Replies: 2
    Last Post: 08-23-2007, 07:35 PM
  3. How to I go abouts making this?
    By RC Attacker in forum vBulletin Discussion and Questions
    Replies: 17
    Last Post: 09-29-2006, 04:05 PM
  4. Anybody making any money?
    By TSM in forum Show us your vBulletin Forum
    Replies: 16
    Last Post: 06-25-2006, 01:24 AM
  5. Making My First Skin.......
    By Mindstate in forum vBulletin Graphics Discussions and Requests
    Replies: 4
    Last Post: 05-26-2006, 05:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •