The style [ template, theme, imageset ] topic

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Adam Atlas
Registered User
Posts: 66
Joined: Fri May 09, 2003 4:31 pm
Contact:

Re: The style [ template, theme, imageset ] topic

Post by Adam Atlas » Fri May 09, 2003 11:16 pm

mlimburg wrote:Firstly, the use of user/group as a core feature within the template. For example <if !group['admin']> would show content to those not of the admin group.
This would be redundant, and implementing this in the core template system would limit future outside-phpBB use (yes, outside-phpBB use- I find that the phpBB template system is the best one available for PHP, and I use it in many of my GPLed PHP projects). The functionality, using the <!-- IF ... --> syntax and related statements, is already there, i.e.

<!-- IF group eq 'admin' -->
You are an admin!
<!-- ELSEIF group eq 'supermod' -->
You are a supermod!
<!-- ELSEIF group eq 'moderator' -->
You are a moderator!
<!-- ELSEIF group eq 'user' -->
You are a normal user!
<!-- ELSE -->
You're something else? Huh?
<!-- ENDIF -->

This specific chunk of code would probably just show "You're something else? Huh?" no matter what, because the phpBB core doesn't register the 'group' variable in the template system, but the point is: The base functionality for this already exists; and: If anything, this should be implemented in the phpBB core, not the template system.
fun, sigs work!!!

Yo.
Registered User
Posts: 3
Joined: Sat May 10, 2003 5:54 am

Re: The style [ template, theme, imageset ] topic

Post by Yo. » Sat May 10, 2003 6:00 am

Most of the program logic should be moved to templates. You should be able to customize as many things as possible without having to hack the code.

As for the style, perhaps it should be treated as its own "template," with the parsed version stored in the cache directory and editable via the admin cp.

User avatar
haravikk
Registered User
Posts: 292
Joined: Sun Apr 20, 2003 5:05 pm
Contact:

Re: The style [ template, theme, imageset ] topic

Post by haravikk » Sat May 10, 2003 1:01 pm

One question, are smiles and icons still entirely seperate from themes? It looks that way in the admin panel.

Seems like it would make more sense to have smilies and icons handled as part of an image set. Or keep it the way it is but allow you to create "Smile Sets" and "Icon Sets", these can be chosen from a pop-up at the bottom of an image set (thereby connecting your smilies or icons to that image set.

It's just that some smilies you can get are intended for dark themes, but if you retain subSilver on your board then they look bad. I know, I know people should make smilies that work on anything, but they don't, mainly because you can have nice fake transparency effects if your smilies are designed for a specific theme
Images in sigs! please.

dkklein
Registered User
Posts: 21
Joined: Sat Apr 26, 2003 11:44 am

Re: The style [ template, theme, imageset ] topic

Post by dkklein » Wed May 14, 2003 1:42 pm

I agree with what most are saying. I am not sure if this is possible already or will be but a thing I would like see in the final templating is the ability to both include another template (think that one is in) but also include a php file that is excuted. This would enable easier integration of mods such as "At a glance". Today to integrate this mod it requires editing the index.php file, very little but still.

Yo.
Registered User
Posts: 3
Joined: Sat May 10, 2003 5:54 am

Re: The style [ template, theme, imageset ] topic

Post by Yo. » Wed May 14, 2003 7:27 pm

haravikk wrote:One question, are smiles and icons still entirely seperate from themes? It looks that way in the admin panel.

Seems like it would make more sense to have smilies and icons handled as part of an image set. Or keep it the way it is but allow you to create "Smile Sets" and "Icon Sets", these can be chosen from a pop-up at the bottom of an image set (thereby connecting your smilies or icons to that image set.

It's just that some smilies you can get are intended for dark themes, but if you retain subSilver on your board then they look bad. I know, I know people should make smilies that work on anything, but they don't, mainly because you can have nice fake transparency effects if your smilies are designed for a specific theme
This is a good idea. A full "skin" would be made up of a template set, a style set, an image set, a smilie set, and a posticon set, and you could of course reuse specific sets in other skins.

User avatar
haravikk
Registered User
Posts: 292
Joined: Sun Apr 20, 2003 5:05 pm
Contact:

Re: The style [ template, theme, imageset ] topic

Post by haravikk » Wed May 14, 2003 8:04 pm

Yo. wrote:This is a good idea. A full "skin" would be made up of a template set, a style set, an image set, a smilie set, and a posticon set, and you could of course reuse specific sets in other skins.
You forgot rank set :P
Okay, so I did as well, but rank sets would nice too.
Images in sigs! please.

Adam Atlas
Registered User
Posts: 66
Joined: Fri May 09, 2003 4:31 pm
Contact:

Re: The style [ template, theme, imageset ] topic

Post by Adam Atlas » Wed May 14, 2003 10:39 pm

Here's a feature request (and they're actually allowed in this topic!).

Currently we have blocks, which (as far as I know) repeat for every entry in the corresponding block variable array. I'd like there to be a way to specify a range, i.e.

Code: Select all

<!-- BEGIN foobar(3) -->
Hello: {foobar.BAZ}
<!-- END foobar(6) -->
The 3 in the BEGIN statement, and the 6 in the END statement, would specify a range. So, the elements of the foobar block from index 3 to 6 would be displayed.

And it wouldn't be required for both of them, so you could do:

Code: Select all

<!-- BEGIN indeed -->
Indeed!
<!-- END indeed(10) -->
to show the first 10 entries in the indeed block. They would be indexed starting at 1, not 0: because 0 would be the same as not specifying a range at all, and a negative number would mean "from the end," i.e.

<!-- BEGIN hooray(-10) -->
H00rJ!
<!-- END hooray -->

This would show the last 10 elements of the hooray block. Or you could do:

<!-- BEGIN quux -->
Foobar.
<!-- END quux(-10) -->

which would loop from the beginning of the quux block up to the 10th-to-
last element.

I'd find this very useful, and it would help to abstract the template system even further from the core.
fun, sigs work!!!

Yo.
Registered User
Posts: 3
Joined: Sat May 10, 2003 5:54 am

Re: The style [ template, theme, imageset ] topic

Post by Yo. » Sat May 17, 2003 1:14 am

Also, it would be great to have template sets with parent/child relationships, so templates can be inherited. This way, if you have a specific skin based on a default skin, you can make small template changes in the child skin without affecting the parent set or having to create an entirely new template set. Any unchanged templates in child skins would be inherited from the parent skin. Ideally, these template sets could be nested several levels deep.

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: The style [ template, theme, imageset ] topic

Post by Arty » Sat May 17, 2003 8:12 am

Yo. wrote:Most of the program logic should be moved to templates. You should be able to customize as many things as possible without having to hack the code.
Completely agree with that.

User avatar
haravikk
Registered User
Posts: 292
Joined: Sun Apr 20, 2003 5:05 pm
Contact:

Re: The style [ template, theme, imageset ] topic

Post by haravikk » Sun May 18, 2003 10:13 am

Just a though, but I'm currently working hard on a theme for my 2.0.4 forum, will there be a converter to make 2.0.x themes work with 2.2? I don't really mind if I have to do it again, I can understand that what with all the new features and such it is perhaps a bit difficult, just wondering.

Similarly, with the new caching system, will the cached files contain unused {} expressions? For example if I had a mod on my board, but then removed it without changing the template files, would the cache keep extra uneeded items in?
Images in sigs! please.

Post Reply