[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
User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: Removal of imagesets

Post by brunoais » Thu Feb 02, 2012 11:03 am

Arty wrote: Currently <img> tags are used in code for last post and newest post icons, like this:

Code: Select all

<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
If imageset wouldn't exist anymore, that code could be changed to something like this:

Code: Select all

<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="icon-newest">{L_NEWEST_POST}</a> <!-- ENDIF -->
and would require adding something like this to css:

Code: Select all

.icon-newest { 
    display: inline-block;
    background: url(newest.png) 0 50% no-repeat;
    width: 0; /* padding is used for width */
    height: 10px; /* image height */
    padding-left: 11px; /* offset text to hide it, equal to image width */
    overflow: hidden; /* hide text */
}
That would get rid of <img> tag and put meaningful text instead of it. After applying that css it would look the same as it used to.
Just one detail. Instead of using classes like @class="icon-newest", I believe we should use classes like @class="icon newest". Reason?
We, for any reason, may want to apply some specific style to all icons no matter which they are. Instead of repeating the styling for each style or use a huge list of ',,,,,' for each icon, we can just use the selector ".icon".
I don't know if this applies but imagine that you want all icons to be inline-blocks with overflow hidden. You may do something like this:

Code: Select all

.icon { 
    display: inline-block;
    overflow: hidden; /* hide text */
}
Or you could apply these two lines of code to every single icon. How may icons are there? Some, right? That's how many. Also, if we want to change this to all icons how do we do it? I think you got the picture. Please note that you can, however, create exceptions (by following the CSS hierarchy rules)

Code: Select all

.icon { 
    display: inline-block;
    overflow: hidden; /* hide text */
}
.icon.newest { 
    display: block;
}
This will make all icons inline-blocks with overflow hidden except the icon newest which is a block and not an inline-block.

Extra: With this we may be able to save some chunks of CSS code and bandwith :D

Here I'm talking about icons but this applies to anything we create with this way of thinking but that is away from the purpose of this RFC.

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC|Merged] Removal of imagesets

Post by Arty » Thu Feb 02, 2012 11:10 am

That is a good idea.

However, current version of class names is direct port from imageset and class names in this RFC should match old imageset names, so class names should not be changed. I think your idea should be added to [RFC] Clean up of prosilver code
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
nextgen
Registered User
Posts: 128
Joined: Sat Jul 24, 2010 4:59 am
Location: Guatemala
Contact:

Re: [RFC|Merged] Removal of imagesets

Post by nextgen » Sun Feb 05, 2012 3:39 am

Still the possibility is working to make it bearable for other languages?

Example --> viewtopic.php?f=84&t=41543&start=40#p232955

Or trying to be handled differently? :)
*Imagine a signature super spectacular.*

User avatar
oddfish
Registered User
Posts: 110
Joined: Tue Mar 27, 2007 5:53 am
Location: on my way home
Contact:

Re: [RFC|Merged] Removal of imagesets

Post by oddfish » Sat Feb 18, 2012 8:27 pm

Nice work on these changes Arty.

Noticing the merge of #10378, should not all ./en buttons be changed over to ./ in colours.css and imageset.css to complete it?
Last edited by oddfish on Sat Feb 18, 2012 8:34 pm, edited 1 time in total.

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC|Merged] Removal of imagesets

Post by Arty » Sat Feb 18, 2012 8:34 pm

No, those css entries are for global stylesheet.css, not en/stylesheet.css, so it should link to directory en/, not ./
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
oddfish
Registered User
Posts: 110
Joined: Tue Mar 27, 2007 5:53 am
Location: on my way home
Contact:

Re: [RFC|Merged] Removal of imagesets

Post by oddfish » Sat Feb 18, 2012 8:39 pm

Ok thanks.

I would have thought to allow for whatever a user selects as their default language, would have set the image globally by default to the image language path ( ./theme/../*.img ) so no changes were required in any css?

User avatar
oddfish
Registered User
Posts: 110
Joined: Tue Mar 27, 2007 5:53 am
Location: on my way home
Contact:

Re: [RFC|Merged] Removal of imagesets

Post by oddfish » Sat Feb 18, 2012 9:55 pm

That too does not make logic.

A default board language may not be en so why would globally, en be set at all?

User avatar
nextgen
Registered User
Posts: 128
Joined: Sat Jul 24, 2010 4:59 am
Location: Guatemala
Contact:

Re: [RFC|Merged] Removal of imagesets

Post by nextgen » Sat Feb 18, 2012 10:13 pm

Honestly I'm not convinced this change. :roll:
Has errors in other languages.
*Imagine a signature super spectacular.*

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC|Merged] Removal of imagesets

Post by Arty » Sat Feb 18, 2012 10:16 pm

Take a look at very common situation: user has installed his language pack, but style does not have imageset for it.

In 3.0: edit, quote and other language specific images disappear
In 3.1: edit, quote and other language specific images fall back to English

That's why that change is there.
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
nextgen
Registered User
Posts: 128
Joined: Sat Jul 24, 2010 4:59 am
Location: Guatemala
Contact:

Re: [RFC|Merged] Removal of imagesets

Post by nextgen » Sat Feb 18, 2012 10:20 pm

happens to other languages?
as is the change to run the imageset?
*Imagine a signature super spectacular.*

Post Reply