How Random Babbling Becomes Corporate Policy (t3knomanser) wrote,
How Random Babbling Becomes Corporate Policy

Border around Entry Area

This tutorial uses the flatbox tutorial, and also is descended from the Customize Entries tutorial (and since it's ripped out of my style, the Scrolling Entries tutorial as well).

This took some experimenting, but alot of people are curious, and I'll warn you- it doesn't always display the best in non-IE browsers (which annoys me, because I _never_ use IE). It looks good, just not _perfect_.

I've highlited the two really important lines, but I remember having to tweak things, so pay some attention to the code above the first flatbox_header call. You may have to experiment a bit to get this code to work.

# Start the main entry text area
  #   The first line is needed because I did not use print_system_box_top() as stated above
  """<td class="entryHolderBg" width="100%" valign="top"><table cellspacing="0" cellpadding="0" border="0">""";
  """<div style="border: solid 1px #707070; width: 545px;" align="left">""";
  # If the subject is not empty, then print it followed by the line to seperate it from the entry text
  if ($e.subject!="") { """
        <div class="entryHeader">$e.subject</div>
        <div class="entryDash"><img src="" width="1" height="1" alt="" border="0" /></div>
      <td width="1" class="medLine"><img src="" width="1" height="1" alt="" border="0" /></td>
      <td width="1" class="medLine"><img src="" width="1" height="1" alt="" border="0" /></td>
      <td class="entry">
  """; }
  ####### This determines wether or not this should be a scrolling entry ########
  if ($p.view != "entry") {
    if ($e.text->length() > $maxLength) {
       """<div style="height: 250px; width: 535px; overflow: auto;">""";
    } else {
       """<div style="width: 535px; overflow: auto;">""";
  } else { """<div>"""; }

  # Print the entry text.
  # If you want the entry text to be after the mood and music, then you need to do two things:
  #  - decomment the pink lines by removing the #'s from in front of them
  #  - comment out the blue lines by putting a # in front of them
  """ $e.text """;

  # 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
    # and then we print the mood label and the mood
    """<b> $*text_meta_mood : </b>"""; print $e.metadata{"mood"}; 
    # followed by the mood icon if one exists. If you don't want the mood icons to show, remove the line below
    if (defined $e.mood_icon) { """ $e.mood_icon """; }
    # 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/>""";

  # """ $e.text """;
  # Close off the entry text area

  • Strange Things People Say About Me (to my face)

    Recently, I've been at the center of a trend. That trend is complete strangers asking me "Are you ____?" A quick summary. For example: Are you…

  • Writer's Block: If I could find my way

    -10,000 years, at minimum. Tomorrow is always better than today, especially when you can't fact-check.

  • Bob Morlang

    When I was working at Tri-Mount, we had these camp trucks. They were army surplus, and while they could take a beating, they only sort of worked. And…

  • Post a new comment


    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded