Becky ("You're a Virgin Who Can't Drive.") (starcrossed) wrote in component_help,
Becky ("You're a Virgin Who Can't Drive.")
starcrossed
component_help

Making mood theme viewable in IE

I'm planning to use a custom metadata for my next component layout and want my mood theme to show up in IE. What exactly do I need to edit to make it viewable?



#===============================================
# METADATA #
#===============================================
set tags_aware = true; function Entry::print_metadata() {var string[] metadata = []; var string{} meta_images = {}; var string{} meta_labels = {}; $metadata = ["location", "mood", "music", "tags", "groups"]; var bool wrap_metadata = true; $meta_labels = {"tags" => "Tags:", "location" => $*text_meta_location, "mood" => $*text_meta_mood, "music" => $*text_meta_music, "groups" => $*text_meta_groups,}; $meta_images = { "tags" => "http://i33.tinypic.com/24nk084.gif",
"location" => "http://i37.tinypic.com/2d6tvrp.gif",
"mood" => "http://i33.tinypic.com/34srrq0.gif",
"music" => "http://i38.tinypic.com/34hdtgg.gif",
"groups" => "http://i35.tinypic.com/2h6r1c6.gif",};

var bool show_edit_tags_link = false; var string tags_separator = ", "; var bool vanilla_location = true; var bool vanilla_groups= true; var string meta_label_open = """"""; var string meta_label_close = """ """; var string meta_val_open= ""; var string meta_val_close = """
"""; var string currents_open = """
"""; var string currents_close= """
"""; var bool have_meta = (size($.metadata) > 0); var bool have_tags = ((size($.tags) > 0) and $*tags_aware); var int tcount = 0; var string currents = ""; var string image = ""; var string k = ""; var string label = ""; var string meta = ""; var string tag = ""; var string val = ""; var Tag t = new Tag; var Link edit_tags = $this->get_link("edit_tags"); if ($have_meta or $have_tags) {$currents = $currents + $currents_open; if ($wrap_metadata and defined $.mood_icon) {var Image i = $.mood_icon; $currents = $currents + """
[Error: Irreparable invalid markup ('<img [...] mood"}">') in entry. Owner must fix manually. Raw contents below.]

I'm planning to use a custom metadata for my next component layout and want my mood theme to show up in IE. What exactly do I need to edit to make it viewable?

<lj-cut text="code under here">

<i>#===============================================
# METADATA #
#===============================================
set tags_aware = true; function Entry::print_metadata() {var string[] metadata = []; var string{} meta_images = {}; var string{} meta_labels = {}; $metadata = ["location", "mood", "music", "tags", "groups"]; var bool wrap_metadata = true; $meta_labels = {"tags" => "Tags:", "location" => $*text_meta_location, "mood" => $*text_meta_mood, "music" => $*text_meta_music, "groups" => $*text_meta_groups,}; $meta_images = { "tags" => "http://i33.tinypic.com/24nk084.gif",
"location" => "http://i37.tinypic.com/2d6tvrp.gif",
"mood" => "http://i33.tinypic.com/34srrq0.gif",
"music" => "http://i38.tinypic.com/34hdtgg.gif",
"groups" => "http://i35.tinypic.com/2h6r1c6.gif",};

var bool show_edit_tags_link = false; var string tags_separator = ", "; var bool vanilla_location = true; var bool vanilla_groups= true; var string meta_label_open = """<b>"""; var string meta_label_close = """</b> """; var string meta_val_open= ""; var string meta_val_close = """<br />"""; var string currents_open = """<div class="entryMetadata">"""; var string currents_close= """</div>"""; var bool have_meta = (size($.metadata) > 0); var bool have_tags = ((size($.tags) > 0) and $*tags_aware); var int tcount = 0; var string currents = ""; var string image = ""; var string k = ""; var string label = ""; var string meta = ""; var string tag = ""; var string val = ""; var Tag t = new Tag; var Link edit_tags = $this->get_link("edit_tags"); if ($have_meta or $have_tags) {$currents = $currents + $currents_open; if ($wrap_metadata and defined $.mood_icon) {var Image i = $.mood_icon; $currents = $currents + """<table><tr><td><img src="$i.url" width="$i.width" height="$i.height" alt="$*text_meta_mood $.metadata{"mood"}" title="$*text_meta_mood $.metadata{"mood"}" /></td><td>""";} foreach $k ($metadata) {$label = $meta_labels{$k} != "" ? $meta_labels{$k} : lang_metadata_title($k); $image = $meta_images{$k} != "" ? $meta_images{$k} : ""; $val = $.metadata{$k}; if ($image != "") {$label = """<img src="$image" alt="$label" title="$label" border="0" />""";}if (($k=="location") and $vanilla_location) {$val = striphtml($val);} if (($k=="groups ") and $vanilla_groups ) {$val = striphtml($val);} if ($k=="mood") { if (defined $.mood_icon) {var Image i = $.mood_icon; if (not $wrap_metadata) {$val = """<img src="$i.url" width="$i.width" height="$i.height" alt="$*text_meta_mood $.metadata{"mood"}" title="$*text_meta_mood $.metadata{"mood"}" /> $val""";}}}
if (($k=="tags") and ($have_tags==true)) {if($edit_tags.url != "" and $show_edit_tags_link) {$label = """<a href="$edit_tags.url">$label</a>""";}
foreach $t ($.tags) {$tag = """<a href="$t.url">$t.name</a>"""; $val = $val + $tag; $tcount++; if ($tcount < size($.tags)) {$val = $val + "$tags_separator";}}}
if ($val != "") { $meta = $meta_label_open + $label + $meta_label_close + $meta_val_open + $val + $meta_val_close;} else {$meta = "";}$currents = $currents + $meta;}if ($wrap_metadata and defined $.mood_icon) {$currents = $currents + """</td></tr></table>""";}
### Metadata in a Box ###
### Replace this line with $currents = $currents + $currents_close + $meta_box_close; ###
$currents = $currents + $currents_close;println "$currents";}}</i> </lj-cut>

Many thanks in advance xx
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic
  • 1 comment