phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC|Merged] Removal of imagesets

These requests for comments 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.

Re: Removal of imagesets

Postby ecwpa » Mon Aug 29, 2011 3:07 pm

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.
Sorry for my bad english, still improving.
ecwpa
Registered User
 
Posts: 169
Joined: Mon Jan 24, 2005 2:10 am

Re: Removal of imagesets

Postby Arty » Mon Aug 29, 2011 3:22 pm

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 -->
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 796
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Re: [RFC] Removal of imagesets

Postby Oleg » Tue Aug 30, 2011 5:04 am

Moved to RFC forum.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Removal of imagesets

Postby Arty » Sat Sep 03, 2011 8:54 pm

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 191 times
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 796
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Re: [RFC] Removal of imagesets

Postby Arty » Sat Sep 03, 2011 10:26 pm

Updated commits to fix white space issues and added that convertor script to phpBB/develop/
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 796
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Re: [RFC|Accepted] Removal of imagesets

Postby Oleg » Tue Sep 06, 2011 12:21 am

I marked this RFC accepted, and I consider it ready for merging as I haven't seen any (unaddressed) objections in this topic.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC|Accepted] Removal of imagesets

Postby Maël Soucaze » Thu Sep 08, 2011 3:45 am

I agree completely with this idea.
MAËL SOUCAZE • STYLES TEAM MEMBER • TRANSLATIONS & INTERNATIONAL SUPPORT TEAMS MANAGER
STOP ACTA! HTTP://WWW.STOPACTA.INFO/
Maël Soucaze
Registered User
 
Posts: 17
Joined: Thu Jul 07, 2005 7:45 am
Location: France

Re: [RFC|Accepted] Removal of imagesets

Postby naderman » Thu Sep 08, 2011 3:53 am

Arty: Can you create a wiki article on how to port a 3.0 Theme/Imageset to 3.1?
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC|Accepted] Removal of imagesets

Postby Arty » Thu Sep 08, 2011 3:32 pm

Sure
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 796
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Re: [RFC|Accepted] Removal of imagesets

Postby naderman » Tue Sep 20, 2011 7:19 pm

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.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Previous Next

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: Arty, KnocksX and 14 guests