kunzite (kunzite1) wrote in component_help,
kunzite
kunzite1
component_help

for sssexygirl

both of these will be accomplished by playing with print_entry

1. change
print_entry_header(***a bunch of junk***);
to
  var string entryHeaderString = "<table border='0' width='100%' cellpadding='0' cellspacing='0'>" +
  "<tr><td class='entryDate' align='left' valign='center'>"+(defined $e.security_icon?"$e.security_icon ":"");
  if($e.new_day){
    $entryHeaderString = $entryHeaderString + "<strong>";
  }
  $entryHeaderString = $entryHeaderString + $e.time->date_format("long");
  if($e.new_day){
    $entryHeaderString = $entryHeaderString + "</strong>";
  }
  $entryHeaderString = $entryHeaderString + "</td><td align='right' valign='center'>" + $e.time->time_format() +
  "</td></tr></table>";
  print_entry_header($entryHeaderString);
2. youll have to add a couple variables and change the metadata section...
add these variables to the top of your print_free_text() function:
  var Color  header        = $*header_bgcolor;
  var Color  headerMinus5  = $header->darker(50);
  var Color  headerPlus3   = $header->lighter(30);
  var Color  ltLineColor   = $*header_bgcolor->lighter(30);
  var Color  dkLineColor   = $*header_bgcolor->darker(50);
  var string ltLineString  = $ltLineColor.as_string;
  var string medLineString = $*header_bgcolor.as_string;
  var string dkLineString  = $dkLineColor.as_string;
  var string corner_color  = "/p0"+$headerPlus3->substr(1,6)+"1"+$headerMinus5->substr(1,6)+"2"+$header->substr(1,6);

  var string flatbox_open  = """<tr><td colspan=7><table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td valign="top" rowspan="3" colspan="3" width="5"><img src="$*PALIMGROOT/component/curve-top-left.gif$corner_color" width="5" height="5" alt="" border="0" /></td><td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td valign="top" rowspan="3" colspan="3" width="5"><img src="$*PALIMGROOT/component/curve-top-right.gif$corner_color" width="5" height="5" alt="" border="0" /></td></tr><tr><td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td></tr><tr><td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="ltLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td><td class="tabBg" width="100%"><div align="center" class="compFont">""";
  var string flatbox_close = """</div><td class="tabBg" width="3"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td><td class="ltLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td><td class="dkLine" width="1"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td valign="top" rowspan="3" colspan="3" width="5"><img src="$*PALIMGROOT/component/curve-bottom-left.gif$corner_color" width="5" height="5" alt="" border="0" /></td><td class="tabBg"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td><td valign="top" rowspan="3" colspan="3" width="5"><img src="$*PALIMGROOT/component/curve-bottom-right.gif$corner_color" width="5" height="5" alt="" border="0" /></td></tr><tr><td class="ltLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" border="0" /></td></tr></table></td></tr><tr><td colspan=5><img src="$*PALIMGROOT/component/clear.gif" width="1" height="3" alt="" border="0" /></td></tr>""";
now we play with the metadata... add the green:
  # Print Mood and/or Music Fields:
  # If we have a mood to print
  if ($e.metadata{"mood"}!="") { 
    # first we need a spacer after the entry text
    """<br/><br/>""";
    # and then we print the mood label, followed by a mood icon if one exists, followed by the mood text.
    # If you want the mood icon to be after the mood text, then you need to change the order of the two lines in red.

if($e.metadata{"mood"} or $e.metadata{"music"}) {
"""<table>$flatbox_open""";

    """<b> $*text_meta_mood : </b>"""; 
    if (defined $e.mood_icon) { """ $e.mood_icon """; }
    print $e.metadata{"mood"}; 
    """<br/>""";
    # if ($e.metadata{"music"}=="") { """<br/>"""; }
  }
  # If we have music to print
  if ($e.metadata{"music"}!="") { 
    # If we didn't print a spacer because the mood was empty, then print one
    if ($e.metadata{"mood"}=="") { """<br/><br/>"""; }
    # then print the actual music label and the music
    """<b> $*text_meta_music : </b>"""; print $e.metadata{"music"};
    # """<br/><br/>""";
  }

"""$flatbox_close</table>""";
}
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 30 comments