Templating ... a simple guide

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
Post Reply
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Templating ... a simple guide

Post by EXreaction »

svennson wrote: thx it worked ;) :mrgreen:
nice feature but probably dangeroes?


It's not really that dangerous unless someone who made the template made it to get data on your board. ;)

Graham
Registered User
Posts: 1304
Joined: Tue Mar 19, 2002 7:11 pm
Location: UK

Re: Templating ... a simple guide

Post by Graham »

The setting is off by default and as it stands at the minute, we will not be distributing any templates from our website which require it to be on. It is there if you need it, and the assumption is that if you turn it on, you know what you're doing
"So Long, and Thanks for All the Fish"

Graham
Eeek, a blog!

Jojoponn139
Posts: 3
Joined: Mon Aug 07, 2006 12:18 pm

Re: Templating ... a simple guide

Post by Jojoponn139 »

Hi
(I'm german -- my english is not so good!)
I'm creating a style for my PHPBB3 but there is a little problem.
I've taken sub-silver as model that I know the variables.
So during I was in data index_body.html from the templates
I noticed that the part to style the forums that's a bit different to the templates for PHPBB2.

There are these Codes: <!-- IF forumrow.S_IS_CAT -->;; <!-- ELSEIF forumrow.S_IS_LINK --> and <!-- ELSE -->

OK- Now I don't know what does it mean! What codes do i've to write e.g. in the first section?

PLEASE HELP...

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Templating ... a simple guide

Post by EXreaction »

It tells you what those codes mean on the first page.

They are simple template IF statements. To find out more you will need to look at the php code in the file that calls that page.

Jojoponn139
Posts: 3
Joined: Mon Aug 07, 2006 12:18 pm

Re: Templating ... a simple guide

Post by Jojoponn139 »

Yes but I haven't found anythink; so I thought I can get help in this forum.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Templating ... a simple guide

Post by EXreaction »

Check out the display_forums() function in includes/function_display.php for more info.

But those ones are easy enough it you just look at the name...

If
forumrow(the forum that is displayed)
is a catagory do this:
else if forumrow is a link do this:
else do this:

Jojoponn139
Posts: 3
Joined: Mon Aug 07, 2006 12:18 pm

Re: Templating ... a simple guide

Post by Jojoponn139 »

OH pretty much thanks that was what i was looking for.

zenpig
Registered User
Posts: 4
Joined: Thu Jul 17, 2003 7:36 am

Re: Templating ... a simple guide

Post by zenpig »

Have a question concerning basic changes to css. In the current 2.0.x phpBB's it is fairly easy to have multiple style sheets using the same template.....for example, if I just wanted to give users the ability to choose a "large font" version of subSilver it was just a matter of editing the styles data which would insert the new values in the db and give it a name such as "subSilver-LgFont" which users would be able to select as a board style. Though the template was the same quite different looks through color, images, and font sizes could be achieved off just one template.

I don't see a way to do that now unless I am missing something....things sit in front of my nose often :) It appears that I could create a new theme for, say, a large font version of subSilver but would need to create a new directory within the styles directory. I understand that I can have the theme still use the template and or images for and within the subSilver directory but for something as basic as just font changes is it now required to have/create something like style/subSilverLgFont/theme/stylesheet.css coupled with the theme.cfg? Just looking for a way to create multiple themes off of the same template without having to resort to all of the directory creation and more to the point management ;)

thanks

[edit]so I guess no replies either means I didn't explain well, some consider it so obvious it isn't worth replying to, or there is no way to take the same template and simply make available a minor alteration like a large font version without having to create another full style directory for just a couple css changes. Still leaning towards the latter since I haven't run across any other way to do it.[/edit]

User avatar
Dog Cow
Registered User
Posts: 271
Joined: Wed May 25, 2005 2:14 pm

Re: Templating ... a simple guide

Post by Dog Cow »

zenpig wrote: Have a question concerning basic changes to css. In the current 2.0.x phpBB's it is fairly easy to have multiple style sheets using the same template.....for example, if I just wanted to give users the ability to choose a "large font" version of subSilver it was just a matter of editing the styles data which would insert the new values in the db and give it a name such as "subSilver-LgFont" which users would be able to select as a board style. Though the template was the same quite different looks through color, images, and font sizes could be achieved off just one template.

I don't see a way to do that now unless I am missing something....things sit in front of my nose often :)


I think that's still possible in 3.0.x

Domos
Posts: 5
Joined: Sat Jul 22, 2006 1:29 pm
Location: Nantes (France)

Re: Templating ... a simple guide

Post by Domos »

There isn't Xor :(

Post Reply