PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2005-02-27 18:10:38

CodeXP
Member
Registered: 2005-02-27
Posts: 17

Dynamic template mod 1.0

Code:

##
##
##        Mod title:  Dynamic Template tweak
##
##      Mod version:  1.0
##   Works on PunBB:  1.2, 1.2.1, 1.2.2
##     Release date:  2005-02-27
##           Author:  CodeXP (codexp@tasarinan.com)
##
##      Description:  This mod will allow you to use different templates for
##                    your CSS style sheets. The template system will now 
##                    look for *.tpl files prefixed with '<stylename>_'
##                    instead of the deault ones (main.tpl, admin.tpl etc.).
##                    If it can't find any prefixed templates, it will load
##                    the default ones instead.
##                    
##   Affected files:  header.php
##                    include/functions.php
##
##       Affects DB:  No
##
##
##            Notes:  This mod should work with any version of PunBB, but I've
##                    only tested it with the 1.2.x release.
##                    
##                    Example on use: 
##                    - Let's say that you're using Oxygen.css as your default
##                    style with your PunBB forum. Then you make a new style
##                    called "mycoolstyle" that requires you to change something
##                    in one, or all, of the *.tpl files. Doing that would
##                    usually break the layout of the rest of your *.css styles.
##
##                    With this mod, you can just save your new *.tpl files as
##                    'mycoolstyle_main.tpl' (same format for all your *.tpl's).
##                    What now happens is that all your other *.tpl's will use
##                    the ordinary templates, but your 'mycoolstyle' one will
##                    use the new template filenames instead.
##                    If for some reason you're missing one of the new files,
##                    the mod will load the default PunBB one's instead :)
##
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download here

Offline

 

#2 2005-03-14 16:36:28

vortex
Guest

Re: Dynamic template mod 1.0

any example?

 

#3 2005-03-15 12:21:19

CodeXP
Member
Registered: 2005-02-27
Posts: 17

Re: Dynamic template mod 1.0

vortex wrote:

any example?

Well, it's kinda hard to give a good example, but you could head over to my PunBB test forum and log in with the username/password: test / test.

The default template makes use of several changes to the template files, so if you then change the style to e.g. Oxygen you'll see that none of the tpl modifications affects it :)

Offline

 

#4 2005-03-15 19:04:56

erissiva
Member
Registered: 2005-02-25
Posts: 154

Re: Dynamic template mod 1.0

CodeXP wrote:

vortex wrote:

any example?

Well, it's kinda hard to give a good example, but you could head over to my PunBB test forum and log in with the username/password: test / test.

The default template makes use of several changes to the template files, so if you then change the style to e.g. Oxygen you'll see that none of the tpl modifications affects it :)

It seems that the "test / test" account has been disabled. ;-)

Wrong username and/or password. Forgotten your password?

Offline

 

#5 2005-03-15 20:47:45

CodeXP
Member
Registered: 2005-02-27
Posts: 17

Re: Dynamic template mod 1.0

erissiva wrote:

CodeXP wrote:

vortex wrote:

any example?

Well, it's kinda hard to give a good example, but you could head over to my PunBB test forum and log in with the username/password: test / test.

The default template makes use of several changes to the template files, so if you then change the style to e.g. Oxygen you'll see that none of the tpl modifications affects it :)

It seems that the "test / test" account has been disabled. ;-)

Wrong username and/or password. Forgotten your password?

Oops ;) Just fixed it..

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.