[RFC|Merged] Removal of imagesets

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
ecwpa
Registered User
Posts: 181
Joined: Mon Jan 24, 2005 2:10 am
Contact:

Re: Removal of imagesets

Post by ecwpa »

I like this proposal. Making themes for mobile devices would be easier too, I think.


Now, I have a question. Could another language's css beside English be the default if other languages css fail to load? For example, Spanish being default if Italian fails to load.
Slightly better English than it was in 2005, still improving :D

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

Re: Removal of imagesets

Post by Arty »

Sure, just replace entries in global css files. Language fallback works like this:

First in overall_header.html global stylesheet.css is included. That stylesheet.css imports several css files, including colours.css
Code in theme/colours.css points to default icons:

Code: Select all

/* Big button images */
.reply-icon span	{ background-image: url("./en/button_topic_reply.gif"); }
.post-icon span		{ background-image: url("./en/button_topic_new.gif"); }
.locked-icon span	{ background-image: url("./en/button_topic_locked.gif"); }
.pmreply-icon span	{ background-image: url("./en/button_pm_reply.gif") ;}
.newpm-icon span 	{ background-image: url("./en/button_pm_new.gif") ;}
.forwardpm-icon span	{ background-image: url("./en/button_pm_forward.gif") ;}
Then in overall_header.html localized stylesheet.css (theme/whatever/{lang}/stylesheet.css) is included. It contains localized versions of those buttons:

Code: Select all

.reply-icon span	{ background-image: url("./button_topic_reply.gif"); }
.post-icon span		{ background-image: url("./button_topic_new.gif"); }
.locked-icon span	{ background-image: url("./button_topic_locked.gif"); }
.pmreply-icon span	{ background-image: url("./button_pm_reply.gif") ;}
.newpm-icon span 	{ background-image: url("./button_pm_new.gif") ;}
.forwardpm-icon span	{ background-image: url("./button_pm_forward.gif") ;}
If it doesn't exist, code in colours.css makes sure that images are displayed.

To change default fallback images just replace entries in colours.css to point them to whatever default images you want.

Exact code from prosilver's overall_header.html that shows how css files are included:

Code: Select all

<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_THEME_PATH}/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="{T_THEME_LANG_PATH}/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />

<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
	<link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Removal of imagesets

Post by Oleg »

Moved to RFC forum.

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

Re: [RFC] Removal of imagesets

Post by Arty »

Another patch, this version has backwards compatibility.
Patch: https://github.com/cyberalien/phpbb3/tr ... -imagesets

Styles could use some code cleanup, but I didn't do it because its not part of RFC. If this RFC is accepted, I'll write few more RFC's that improve styles that require implementation of this RFC.

I've also written simple script that converts imageset into css code to make transition easier, its in attachment. Upload to your forum, point it to style (see first lines of script), open in browser. CSS might require some manual adjustments after replacing everything.
Attachments
imageset_to_css.zip
(2.45 KiB) Downloaded 1063 times

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

Re: [RFC] Removal of imagesets

Post by Arty »

Updated commits to fix white space issues and added that convertor script to phpBB/develop/

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Accepted] Removal of imagesets

Post by Oleg »

I marked this RFC accepted, and I consider it ready for merging as I haven't seen any (unaddressed) objections in this topic.

User avatar
Qiaeru
Registered User
Posts: 32
Joined: Thu Jul 07, 2005 7:45 am
Location: Paris, France
Contact:

Re: [RFC|Accepted] Removal of imagesets

Post by Qiaeru »

I agree completely with this idea.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC|Accepted] Removal of imagesets

Post by naderman »

Arty: Can you create a wiki article on how to port a 3.0 Theme/Imageset to 3.1?

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

Re: [RFC|Accepted] Removal of imagesets

Post by Arty »

Sure

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC|Accepted] Removal of imagesets

Post by naderman »

Please update this RFC with a link to wiki docs when they're available. I'm going ahead and merging this, so Chris can get rid of db stored stuff.

Post Reply