Piwigo.org

You are not logged in. (Register / Login)

Announcement

#1 2011-03-03 15:12:57

flop25
Piwigo Team
Registered: 1970-01-01
Posts: 3395
Website

2.2.0RC3 : sprite css for icon and retro-compatibility

Hello

The new way to display icons by a sprite and some css will break all the current theme which use their own icons. Could we make in tpl files something like :

{if $themeconf.icon_dir!="themes/default/icon"}old code with img {elseif} new one{/if}

I just tried and it works but we need to think more about what means now the var $themeconf.icon_dir. I think we should create a new theme var : $themeconf.sprite_dir or s26_dir (why s26?) and do an !isset($themeconf.sprite_dir)

What's your point of view ?

Last edited by flop25 (2011-03-03 15:13:25)


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

#2 2011-03-03 15:16:20

rvelices
Piwigo Team
Registered: 2005-12-29
Posts: 1557
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

you could very well override what is done in iconset.css and add a link to your image.

Offline

#3 2011-03-03 16:07:10

flop25
Piwigo Team
Registered: 1970-01-01
Posts: 3395
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

rvelices wrote:

you could very well override what is done in iconset.css and add a link to your image.

Of course the designers can but it's again work for them (more than 30 icons to do, overriding the positions parameters and the link): we should think more of the retro-compatibility otherwise we are going to discourage our community... We have already done many changes for themes.
Also why keep the icons integrated in the sprites ? it's a question of retro-compatibility for themes depending on Sylvia or others
So either we delete all the useless icons, or we make a full retro-compatibility

ps : I sent you 2 mails. Can you check your mails please ? thx

Last edited by flop25 (2011-03-03 16:07:43)


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

#4 2011-03-03 21:50:23

rvelices
Piwigo Team
Registered: 2005-12-29
Posts: 1557
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

I had in mind to use a different backround-url rule for each icon if you dont want to have a sprite

As for the sprite, it was manual in gimp/ps. I just used an image magik script to generate color variations (easy beacause the proved sprites are monochromatic)

Offline

#5 2011-03-04 13:27:40

flop25
Piwigo Team
Registered: 1970-01-01
Posts: 3395
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

rvelices wrote:

I had in mind to use a different backround-url rule for each icon if you dont want to have a sprite

yep me too

rvelices wrote:

As for the sprite, it was manual in gimp/ps. I just used an image magik script to generate color variations (easy beacause the proved sprites are monochromatic)

Thx it's a bit out of subject but I found that http://www.alsacreations.com/actu/lire/ … eator.html which will be very usefull ^^


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

#6 2011-03-10 12:04:06

flop25
Piwigo Team
Registered: 1970-01-01
Posts: 3395
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

Thx rvelices to give your opinion
I think the others thinks like you and that's why they don't intervene...
Well... so we should add that change on http://piwigo.org/doc/doku.php?id=en:dev:changes_in_2.2 because many designers will be surprised


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

#7 2011-03-10 13:58:33

Gotcha
Piwigo Team
Location: Pourrières (83) [FR]
Registered: 2007-03-14
Posts: 604
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

flop25 wrote:

Thx rvelices to give your opinion
I think the others thinks like you and that's why they don't intervene...
Well... so we should add that change on http://piwigo.org/doc/doku.php?id=en:dev:changes_in_2.2 because many designers will be surprised

+1 !

Offline

#8 2011-03-10 14:42:57

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11721
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

I am migrating Kardon to Piwigo 2.2 (and I am creating the sprite which is the difficult piece of work). I will add details in the documentation.


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#9 2011-03-10 15:22:53

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11721
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

OK, I've finished my "icons_sprite.png" for Kardon. Easy work but a bit painful to get the right alignment.

Now that I can very easily have different icons for "hover", I have duplicated the icons_sprite.png as icons_sprite_hover.png and in the "colorize" options of Gimp, I have set Hue/Saturation to 0 : the default icons_sprites.png are gray while icons_sprites_hover.png have colors : very easy to do!


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#10 2011-03-10 15:24:28

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11721
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

Here comes the 2 sprites.

http://piwigo.org/forum/showimage.php?pid=119958&filename=icons_sprite.png http://piwigo.org/forum/showimage.php?pid=119958&filename=icons_sprite_hover.png


Uploaded Images


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#11 2011-03-10 21:32:02

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11721
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#12 2011-03-12 13:57:45

flop25
Piwigo Team
Registered: 1970-01-01
Posts: 3395
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

just a comment: the hover sprite will be loaded only "onmouseover", so the user will not see the hover icon until the hover sprite is loaded (which is longer than just an icon). The best way is to have one sprite with all icons, in order to avoid a loading of hover icons after the page loading, or to put a preload in js.


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

#13 2011-03-12 14:04:33

plg
Piwigo Team
Location: Paris, France, Europe
Registered: 2002-04-05
Posts: 11721
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility


Latest blog post on Piwigo.com: Piwigo 2.5 on Piwigo.com (March 7th, 2013)

Offline

#14 2011-03-12 14:42:58

flop25
Piwigo Team
Registered: 1970-01-01
Posts: 3395
Website

Re: 2.2.0RC3 : sprite css for icon and retro-compatibility

Well I agree with Zaphod about changing the icons and the hover sprite
But the subject has been already discuss and maybe we will do a better sprite "one day", as said on the [Forum, post 117627 by rvelices in topic 16767] CSS sprites by default - proposition


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

Board footer

Powered by FluxBB

About this website · Donate · Contact Piwigo project © 2002-2013