Hack the Gallery p .description
Andy
Registered Users Posts: 50,016 Major grins
You know, the thing that says "XX Galleries with XXX Photos"
Well, I wanted it to say "XX Themes" (for our new thmes page). But it could easily be used for other applications: Real Estate, say, and you have categories by town- and the p .description says "XX Homes for Sale"
Devbobo to the rescue!
Updated 2006-08-01 to use yui api
and this in the javascript section:
:clapThanks Dev!
Well, I wanted it to say "XX Themes" (for our new thmes page). But it could easily be used for other applications: Real Estate, say, and you have categories by town- and the p .description says "XX Homes for Sale"
Devbobo to the rescue!
Updated 2006-08-01 to use yui api
<*script*> if (YAHOO.util.Dom.hasClass(document.body, "homepage")) hackMiniBoxDescription(); <!--*script*--><*/script*>
and this in the javascript section:
function hackMiniBoxDescription() { re = /([0-9]+) galler(?:y|ie(s)) with [0-9]+ photos/; oMiniBox = YAHOO.util.Dom.getElementsByClassName("miniBox", "div"); for (var i=0; i < oMiniBox.length ; i++) { oDescription = YAHOO.util.Dom.getElementsByClassName("description", "p", oMiniBox[i]); for (var j=0; j < oDescription.length ; j++) { if (re.test(oDescription[j].innerHTML)) oDescription[j].innerHTML = oDescription[j].innerHTML.replace(re, "$1 Theme$2"); } } }
:clapThanks Dev!
0
Comments
Portfolio • Workshops • Facebook • Twitter
Sebastian
SmugMug Support Hero
Portfolio • Workshops • Facebook • Twitter
Portfolio • Workshops • Facebook • Twitter
Also why is the font size or even the font style different IE6 vs. FF?
Don't waste too much time on it though - I know it's tough to keep both IE and FF in sync.
Sebastian
SmugMug Support Hero
Anyhow, I'll see about the spacing. The font, I specified Trebuchet for IE, since Verdana looks sucky in IE...
Portfolio • Workshops • Facebook • Twitter