carriep63 (carriep63) wrote in s2bloggish, @ 2007-08-30 14:52:00 |
|
|||
Entry tags: | entries, metadata, paid, tutorial |
[paid] Changing "mood", "music" and "location" to images.
This is in response to a post in another community. You can change your mood, music and location words into images if you want to.
In the example pic, I've also moved the mood icon over to the left. That is reflected in the code as well.
function Entry::print_metadata() {
if (size $.metadata) {
"""<div class="metadata">""";
####### mood icon here. delete if you don't want this.######
"""<div style="float:left; padding-right:10px;">""";
if(($.mood_icon)) {
print "$.mood_icon";
}
"</div>";
########################################
foreach var string m ($.metadata) {
var string val = $.metadata{$m};
var string moodimg = "<img src='http://pics.livejournal.com/carriep
var string musicimg = "<img src='http://pics.livejournal.com/carriep
var string locimg = "<img src='http://pics.livejournal.com/carriep
if ($m == "mood") {
print """<div>${moodimg} $val</div>""";
}
if ($m == "music") {
print """<div>${musicimg} $val</div>""";
}
if ($m == "location") {
print """<div>${locimg} $val</div>""";
}
}
"""<div style="clear:both;"></div></div>""";
}
}