[theme] - [change info icons via css]

May 02, 2006 14:54

in response to troublesrollby's s2flexisquares post.

this works in browsers that support attribute selectors.
browsers that don't support attribute selectors will use the new image that you set for personal journals.


function Page::print_custom_head() {

# create an order of account types
var string[] types_order = ["personal", "community", "syndicated", "news", "identity", "sponcomm"];

# original URLs used by livejournal
var string{} old_urls = {
"personal" => "http://p-stat.livejournal.com/img/userinfo.gif",
"community" => "http://p-stat.livejournal.com/img/community.gif",
"syndicated" => "http://stat.livejournal.com/img/syndicated.gif",
"news" => "http://p-stat.livejournal.com/img/newsinfo.gif",
"identity" => "http://p-stat.livejournal.com/img/openid-profile.gif",
"sponcomm" => "http://p-stat.livejournal.com/img/sponcomm.gif",
};

# original widths used by livejournal
var string{} old_widths = {
"personal" => "17",
"community" => "16",
"syndicated" => "16",
"news" => "16",
"identity" => "16",
"sponcomm" => "16",
};

# original heights used by livejournal
var string{} old_heights = {
"personal" => "17",
"community" => "16",
"syndicated" => "16",
"news" => "16",
"identity" => "16",
"sponcomm" => "16",
};

# new URLs to your images
# if you don't have an image for a specific type, leave it blank to use the original
var string{} new_urls = {
"personal" => "http://pics.livejournal.com/kunzite1/pic/000x8y5d.gif",
"community" => "http://pics.livejournal.com/kunzite1/pic/000x7th0.gif",
"syndicated" => "http://pics.livejournal.com/kunzite1/pic/000x6cww.gif",
"news" => "http://pics.livejournal.com/kunzite1/pic/000x5pdc.gif",
"identity" => "http://pics.livejournal.com/kunzite1/pic/0026r895.gif",
"sponcomm" => "http://pics.livejournal.com/kunzite1/pic/002asx0e.gif",
};

# new widths for your images
# if you don't have an image for a specific type, leave it blank to use the original
var string{} new_widths = {
"personal" => "17",
"community" => "16",
"syndicated" => "15",
"news" => "17",
"identity" => "16",
"sponcomm" => "16",
};

# new heights for your images
# if you don't have an image for a specific type, leave it blank to use the original
var string{} new_heights = {
"personal" => "17",
"community" => "16",
"syndicated" => "18",
"news" => "16",
"identity" => "16",
"sponcomm" => "16",
};

var string ie_url = $new_urls{"personal"};
var string ie_width = $new_widths{"personal"};
var string ie_height = $new_heights{"personal"};
"""

""";

}

class page, function print_custom_head

Previous post Next post
Up