2010-12-28, 07:44 PM
So it seems $lightbulb defines the on/off.gif image
I'm trying to sprite all of my images and this little one is hard to find.
Essentially I want to turn the on.gif and off.gif into a sprited background image, but I will need to change somthing so that if:
{$theme['imgdir']}/{$lightbulb['folder']}.gif = off.gif, then instead of dispaying the off.gif image, I will point to a span with background-position:-1px -175px;
and if:
{$theme['imgdir']}/{$lightbulb['folder']}.gif = on.gif, then I will point to a span with background-position:-1px -155px;
One place that I think I need to update is here:
Template Sets » Default TemplatesEdit Template» forumbit_depth2_cat
Is there anyway I can put a bit of logic in this template to achive this, any adivice at where I should be looking (I know its also defined to ajax replace this in the javascript, but I'll turn that off)
I'm trying to sprite all of my images and this little one is hard to find.
Essentially I want to turn the on.gif and off.gif into a sprited background image, but I will need to change somthing so that if:
{$theme['imgdir']}/{$lightbulb['folder']}.gif = off.gif, then instead of dispaying the off.gif image, I will point to a span with background-position:-1px -175px;
and if:
{$theme['imgdir']}/{$lightbulb['folder']}.gif = on.gif, then I will point to a span with background-position:-1px -155px;
One place that I think I need to update is here:
Template Sets » Default TemplatesEdit Template» forumbit_depth2_cat
Is there anyway I can put a bit of logic in this template to achive this, any adivice at where I should be looking (I know its also defined to ajax replace this in the javascript, but I'll turn that off)