PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2013-06-07 08:09:07

doki
Member
Registered: 2007-04-30
Posts: 225

Punbb Compatible Styles

Hi,

I got it working on my local server. after i'ved transfer to the live server its loading the default style. not loading the specified style. I do clear the regenerate the cache files.
Do you have idea of what went wrong?

Offline

 

#2 2013-06-08 00:49:40

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Punbb Compatible Styles

here's my workaround, on header.php i've made some changes to make it work. "doki" is the theme name.

instead of

Code:

else
        $tpl_main = file_get_contents(PUN_ROOT.'include/template/index.tpl');

i change it to:

Code:

else
        $tpl_main = file_get_contents(PUN_ROOT.'include/template/doki/index.tpl');

Looks like this part is not working

Code:

if (file_exists(PUN_ROOT.'include/template/'.$pun_user['style'].'/index.tpl'))
        $tpl_main = file_get_contents(PUN_ROOT.'include/template/'.$pun_user['style'].'/index.tpl');

Offline

 

#3 2013-06-09 13:44:29

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Re: Punbb Compatible Styles

The template file index.tpl is not part of the PunBB 1.2 core, so it looks like you modified your forum to make use of this template. Just remember to include a default index.tpl file in the include/template directory also.

Offline

 

#4 2013-06-11 08:48:13

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Punbb Compatible Styles

Actually koos on the else part i have it this way (refer below) so that if it cannot find the custom theme i've made it will be redirected to the default "main.tpl"

Code:

else
        $tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl');

does it mean that every custom .tpl i have should have the same name on the /template/ directory?

for example i have a page called reviews, i create a custom template named reviews.tpl so fall back should be the same? /template/reviews.tpl (renamed default main.tpl)?

Last edited by doki (2013-06-11 08:52:06)

Offline

 

#5 2013-06-12 22:34:10

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Re: Punbb Compatible Styles

Yes, all templates go in the include/template folder. It is just when you want a particular style to use a custom template that you include it in the style's template directory, e.g. include/template/[style name]/main.tpl.

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.