?

Log in

[theme] - [opal] - [halffling's code - k1ified] - S2 Layers [entries|archive|friends|userinfo]
S2 Layers

[ website | advanced customization ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| how to post tags page ]
[affiliated communities| fblayers ]

[theme] - [opal] - [halffling's code - k1ified] [Dec. 20th, 2005|03:39 pm]
S2 Layers

s2layers

[kunzite1]
[Tags|, , , , , , , , , , , , ]
[mood |accomplished]

it ain't perfect. but hot damn it's a lot better.

layerinfo "type"          = "theme";
layerinfo "name"          = "Default Template (k1)";
layerinfo author_name     = "Halffling on LiveJournal.com/Kunzite1 on LiveJournal.com";
layerinfo author_email    = "halffling@livejournal.com";
layerinfo des             = "Based on the template offered by ignited, cleaned by kunzite1";
layerinfo lang            = "en";
layerinfo source_viewable = 1;

set color_bg                   = "#ffffff";
set color_bg_font              = "#737373";
set color_fg                   = "#dadada";
set color_fg_font              = "#818181";
set color_med                  = "#dadada";
set color_med_font             = "#818181";
set font_base                  = "Trebuchet MS";
set lang_fmt_date_short        = "%%day%%, %%month%% %%dayord%% %%yyyy%%";
set lang_fmt_time_short        = "%%h%%:%%min%%%%a%%m";
set links_header               = "Links";
set show_entry_userpic         = true;
set static_font_size           = "11";
set static_font_measurement    = "px";
set tags_aware                 = true;
set text_back                  = "Back";
set text_forward               = "Forward";
set text_meta_location         = "Location:";
set text_meta_mood             = "Mood:";
set text_meta_music            = "Music:";
set text_post_comment          = "Comment";
set text_post_comment_friends  = "Comment";
set text_read_comments         = "1 comment // # comments";
set text_read_comments_friends = "1 // #";

function Page::print_custom_head() {
"""
<style type="text/css" media="screen">
.entries {
  font-size:   $*static_font_size$*static_font_measurement;
  line-height:  9pt;
  text-align:  justify;
}
</style>
""";
}

function print_stylesheet() {
var string page_background_image = "";
var Color  color_one             = "#e6e6e6";
var Color  color_two             = "#c1c1c1";
var Color  color_three           = "#cdcdcd";
var Color  color_four            = "#b4b4b4";
var Color  color_five            = "#9a9a9a";
var Color  color_six             = "#4b4b4b";
var Color  color_seven           = "#595959";
var Color  color_eight           = "#000000";
var Color  color_nine            = "#3d3d3d";
var Color  color_ten             = "#d0d0d0";
var Color  color_eleven          = "#447369";
var Color  color_twelve          = "#a7a7a7";

var string static_font_size_plus1  = (int($*static_font_size) + 1) + "";
var string static_font_size_minus1 = (int($*static_font_size) - 1) + "";
var string static_font_size_minus2 = (int($*static_font_size) - 2) + "";

"""
/* Hello! This is the stylesheet of Halffling @ LJ. */
/* My comments are placed between things like this */
/* in order to help you along. */

body {
  background-color:      $*color_bg;
""";
if(clean_url($page_background_image) != "") {
$page_background_image = clean_url($page_background_image);
"""
  background-image:      url($page_background_image);
""";
}
"""
  font-family:           $*font_base;
  color:                 $*color_bg_font;
  font-size:             $*static_font_size$*static_font_measurement;
  line-height:            9pt;
  overflow-x:            hidden;
  margin:                 5px;
  margin-top:            10px;
}

html {
  scrollbar-face-color:       $*color_fg;
  scrollbar-arrow-color:      $*color_fg;
  scrollbar-highlight-color:  $color_one;
  scrollbar-3dlight-color:    $color_two;
  scrollbar-shadow-color:     $color_three;
  scrollbar-darkshadow-color: $color_two;
  scrollbar-track-color:      $*color_bg;
}

.pagealign {
  text-align: center;
}

.bodytable {
  width: 50%;
}

/* borders along the page. */
/* To disable a border, change to 0px */
.border4 {
  border: 1px solid $color_four;
}

.border3 {
  border: 2px solid $color_three;
}

.border2 {
  border: 1px solid $color_five;
}

/* links on page */
a, a b {
  color:           $color_six;
  font-weight:     bold;
  text-decoration: none;
}

/* links when cursor is hovering over it */
a:hover, a:hover b, a:hover .nosubject {
  color:           $*color_bg_font;
  font-weight:     bold;
  text-decoration: none;
}

/* italicized text. Remove if you don't want it a different color */
i {
  color: $color_seven;
}

/* bolded text. Remove if you don't want it a different color */
b {
  color: $color_seven;
}

/* change to 'float:right' if you want your posting icon on the right. */
.userpic2 {
  float:        left;
  text-align:   right;
  margin-top:   0px;
  margin-right: 0px;
}

/*if userpic in the sidebar is enabled. */
#userpic { 
  overflow:      visible; 
  text-align:    center;
  margin-bottom: 5px; 
  padding:       2px;
}

/* the next three deal with the navigation links at the top */
#nav {
  background-color: $color_four;
  font-size:        $static_font_size_minus1$*static_font_measurement;
  letter-spacing:    2px;
  text-transform:   uppercase;
  padding-top:      10px;
  white-space:      nowrap;
}

#nav a {
  font-size:        $static_font_size_minus1$*static_font_measurement;
  color:            $color_one;
  text-decoration:  none;
  padding-left:     12px;
  padding-right:    10px;
  padding-top:       1px;
  background-color: $color_four;
}

#nav a:hover {
  color:            $*color_bg_font;
  background-color: $color_three;
}

/* main area of text */
#content {
  background-color: $*color_fg;
  padding:          2px;
}

.sidetd {
  width: 175px;
}

/* the columns */
.columncontent {
  font-size:        $*static_font_size$*static_font_measurement;
  text-align:       center;
  background-color: $color_one;
  padding:           2px;
}

/* the header of each column */
.columncontent strong {
  font-size:      $static_font_size_minus1$*static_font_measurement;
  color:          $*color_bg_font;
  font-weight:    bold;
  text-transform: uppercase;
}

/* text area of the columns */
.columnitem {
  padding:          2px;
  margin-top:       4px;
  background-color: $*color_bg;
  border:           1px solid $color_five;
  overflow:         visible;
}

/* links in the side column */
#sidecolumn a {
  color:           $color_five;
  font-size:       $static_font_size_minus1$*static_font_measurement;
  text-decoration: none;
}

#sidecolumn a:hover {
  color:           $color_eight;
  font-size:       $static_font_size_minus1$*static_font_measurement;
  text-decoration: none;
}

/* the calendar on the side */
.calrow {
  clear:      both;
  width:      120px;
  text-align: center;
}

.calempty {
  width: 5px;
}

.calactitem {
  font-size:        $static_font_size_minus2$*static_font_measurement;
  text-align:       center;
  background-color: $color_three;
}

.calinitem {
  font-size:  $static_font_size_minus2$*static_font_measurement;
  text-align: center;
}

/* days on the calendar page */
.bigday {
  font-size:   $*static_font_size$*static_font_measurement;
  font-weight: bold;
}

/* the text area on the Reply to Post or Comment page */
input, textarea, select {
  color:            $*color_fg_font;
  font-family:      $*font_base;
  font-size:        $*static_font_size$*static_font_measurement;
  background-color: $*color_fg;
  border:           1px solid $color_two;
}

/* the subject of the post */
.subject {
  color:          $color_nine;
  font-size:      $static_font_size_plus1$*static_font_measurement;
  font-weight:    bold;
  text-transform: uppercase;
  padding-top:     1px;
  padding-bottom:  1px;
}

/* the following deal with entries themselves */
.entry {
  font-size:     $*static_font_size$*static_font_measurement;
  margin-bottom: 10px;
}

/* the following was causing issues in firefox */
/*
.entrytext {
  overflow-x:    hidden;
  text-overflow: clip;
  word-wrap:     break-word;
}
*/

.entrycontent {
  width: 50%;
}

/* mood & song */
.meta {
  text-transform: uppercase;
  font-size:      $static_font_size_minus1$*static_font_measurement;
  font-weight:    bold;
}

/* tags */
.tags {
  color:            $color_five;
  font-size:        $static_font_size_minus2$*static_font_measurement;
  background-color: $color_ten;
  text-transform:   uppercase;
  padding:          1px;
}

/* the next two are where it says "posted by" */
.entryinfo {
  color:            $color_five;
  font-size:        $static_font_size_minus1$*static_font_measurement;
  font-weight:      bold;
  text-transform:   uppercase;
  background-color: $color_one;
  padding-top:      2px;
  padding-bottom:   2px;
}

/* the next three deal with the links at the bottom of each entry */
.entrylinks {
  font-size:        $static_font_size_minus2$*static_font_measurement;
  padding-top:      2px;
  padding-bottom:   2px;
  background-color: $color_two;
  text-align:       center;
}
	
.entrylinks a {
  color:           $color_six;
  text-align:      center;
  text-transform:  uppercase;
  text-decoration: none;
  white-space:     nowrap;
}
	
.entrylinks a:hover {
  color:            $color_eight;
  background-color: $color_four;
  text-decoration:  none;
}

/* when a whole bunch of replies occurs and they turn to boxes */
.minicomment {
  font-size:        $*static_font_size$*static_font_measurement;
  padding:          4px;
  background-color: $color_one;
  border:           2px solid $*color_bg;
}
	
.minicommentholder {
  border: 1px solid $color_two;
}

.messageholder {
  border:        1px solid $color_two;
  margin-bottom: 5px;
  margin-top:    5px;
}

/* when viewing comments, where it says "comments" */
.notablemessage {
  padding: 4px;
}

/* year in calendar page */
.systemtext {
  color:          $color_eleven;
  font-weight:    bold;
  text-transform: uppercase;
}

/* back, forward links, etc. */
.systemmessage {
  font-size:        $*static_font_size$*static_font_measurement;
  background-color: $color_one;
  border:            2px solid $*color_bg;
}

.systemmessage a {
  padding-left:   10px;
  padding-right:  10px;
  padding-top:     2px;
  padding-bottom:  2px;
}

.systemmessage TD {
  font-size: $*static_font_size$*static_font_measurement;
  padding:    2px;
}

/* on the comments page, the username of the commenter */
.postedby {
  font-size:      $*static_font_size$*static_font_measurement;
  text-transform: uppercase;
}

/* if you enabled IP logging */
.ip {
  color: $color_eleven;
}

/* if logged in, this edits the "mass action on selected comments" option */
.multiform {
  font-weight: bold;
}

/* the links that say 'back to top' at the bottom of each entry */
.backtop {
  text-align: right;
}

.backtop a {
  color: $color_twelve;
}

/* I'm not sure if the next two really do anything */
.friendcolor {
  width:  10px;
  height: 10px;
}

.friendname {
  text-decoration: none;
}
""";
}

function Entry::print_metadata() {
  var string currents_open       = ""; # html for opening of currents container
  var string currents_close      = ""; # html for closing of currents container

  var bool   loc_after_mood      = false;               # set to true to print location after mood
  var bool   vanilla_loc         = false;               # set to true to delinkify location

  var string meta_label_open     = """<div class="meta"><b>""";   # html for opening of metadata label

  var string meta_label_close    = """</b> """; # html for closing of metadata label
  var string meta_val_open       = "";               # html for opening of metadata value
  var string meta_val_close      = """</div>""";     # html for closing of metadata value

  if (size $.metadata > 0){
    if($.metadata{"mood"} == "" and $loc_after_mood) {
      # if we're printing loc after mood but we have no mood, set loc_after_mood to false
      $loc_after_mood = false;
    }
    var string currents = "";             # make var for printing

    $currents           = $currents_open; # add opening of currents container

    foreach var string k ($.metadata){  # step thru metadata
      var string text = $k;             # set text to key
      var string val  = $.metadata{$k}; # get val

      if ($k == "mood"){                # if mood, set text to mood property
        $text = $*text_meta_mood;
        if (defined $.mood_icon){       # if we have a mood icon, add it
          var Image i = $.mood_icon;
          $val        = """<img src="$i.url" width="$i.width" height="$i.height" align="middle" alt="$val" title="$val" /> $val""";
        }
      } 
      elseif ($k == "music") {          # if music, set text to music property
        $text = $*text_meta_music;
      } elseif ($k == "location") {     # if location, set text to loc variable

        $text = $*text_meta_location;
        if($vanilla_loc) {              # if vanilla loc, striphtml() it
          $val = striphtml($val);
        }
      }
      if(not ($k == "location" and $loc_after_mood)) {
        # if we're doing loc right now and printing loc after mood, skip it
        # if we're doing loc right now and we're not printing loc after mood, print it now
        # if we're not doing loc right now, print this piece of meta

        # add the meta
        $currents = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";
      }

      if($k == "mood" and $loc_after_mood) {
        # if we just now did the mood and we're printing loc after mood, print the loc
        $k    = "location";           # set meta key to "location"
        $text = $*text_meta_location; # set text to loc variable
        $val  = $.metadata{$k};       # get val

        # if we have a loc, do stuff
        if($val != "") {

          # if vanilla loc, striphtml() it
          if($vanilla_loc) {
            $val = striphtml($val);
          }

          # add the meta
          $currents         = $currents + """$meta_label_open$text$meta_label_close$meta_val_open$val$meta_val_close""";
        }
      }
    }

    # close currents container

    $currents = $currents + $currents_close;

    # print currents
    println "$currents";
  }
}

function Entry::print_linkbar() {
  var string   link_seperator = ""; # seperator for links

  # initialize array/hashes
  var string[] link_keyseq    = [""];
  var string{} link_url       = {"" => ""};
  var string{} link_caption   = {"" => ""};
  var string{} link_image     = {"" => ""};

  var string print           = "";                                         # var for printing
  var Page   p               = get_page();                                 # page handle to determine interentry
  var bool   show_interentry = ($p.view == "entry" or $p.view == "reply"); # if entry/reply view, show interentry
  var int    keyseq_index    = 0;                                          # set index point for new link_keyseq array

  if($show_interentry) {
    # if show interentry, put previous entry link first
#    $link_keyseq[$keyseq_index++] = "nav_prev";

    # get previous entry link information
    var Link prev             = $this->get_link("nav_prev");
    $link_url{"nav_prev"}     = $prev.url;
    $link_caption{"nav_prev"} = $prev.caption;
    $link_image{"nav_prev"}   = $prev.icon.url;

    # get next entry link information
    var Link next             = $this->get_link("nav_next");
    $link_url{"nav_next"}     = $next.url;
    $link_caption{"nav_next"} = $next.caption;
    $link_image{"nav_next"}   = $next.icon.url;
  }

  # gather current linkbar
  foreach var string link_key ($.link_keyseq) {
    var Link  link            = $this->get_link($link_key);
    $link_url{$link_key}      = $link.url;
    $link_caption{$link_key}  = $link.caption;
    $link_image{$link_key}    = $link.icon.url;
    $link_keyseq[$keyseq_index++] = $link_key; # add this to new link_keyseq array
  }
  if($show_interentry) {
    # if show interentry, put next entry link last
#    $link_keyseq[$keyseq_index++] = "nav_next";
  }

  #################################################################################################################
  # by now, the above hashes should look something like:                                                          #
  #                                                                                                               #
  # If interentry:                                                                                                #
  #   Previous Entry:                                                                                             # 
  #    $link_url{"nav_prev"}     = http://www.livejournal.com/go.bml?journal=exampleusername&itemid=256&dir=prev  #
  #    $link_caption{"nav_prev"} = Previous Entry                                                                 #
  #    $link_image{"nav_prev"}   = http://stat.livejournal.com/img/btn_prev.gif                                   #
  #                                                                                                               #
  # Edit Entry:                                                                                                   # 
  #  $link_url{"edit_entry"}     = http://www.livejournal.com/editjournal.bml?journal=exampleusername&itemid=256  #
  #  $link_caption{"edit_entry"} = Edit Entry                                                                     #
  #  $link_image{"edit_entry"}   = http://stat.livejournal.com/img/btn_edit.gif                                   #
  #                                                                                                               #
  # Edit Tags:                                                                                                    # 
  #  $link_url{"edit_tags"}      = http://www.livejournal.com/edittags.bml?journal=exampleusername&itemid=256     #
  #  $link_caption{"edit_tags"}  = Edit Tags                                                                      #
  #  $link_image{"edit_tags"}    = http://stat.livejournal.com/img/btn_edittags.gif                               #
  #                                                                                                               #
  # Add to Memories:                                                                                              # 
  #  $link_url{"mem_add"}        = http://www.livejournal.com/tools/memadd.bml?journal=exampleusername&itemid=256 #
  #  $link_caption{"mem_add"}    = Add to Memories                                                                #
  #  $link_image{"mem_add"}      = http://stat.livejournal.com/img/btn_memories.gif                               #
  #                                                                                                               #
  # If interentry:                                                                                                #
  #   Next Entry:                                                                                                 #
  #    $link_url{"nav_next"}     = http://www.livejournal.com/go.bml?journal=exampleusername&itemid=256&dir=next  #
  #    $link_caption{"nav_next"} = Next Entry                                                                     #
  #    $link_image{"nav_next"}   = http://stat.livejournal.com/img/btn_next.gif                                   #
  #################################################################################################################

  # disable images
  $link_image{"mem_add"}     = "";
  $link_image{"edit_entry"}  = "";
  $link_image{"edit_tags"}   = "";
  $link_image{"tell_friend"} = "";

  # loop thru linkbar and add links to print var
  foreach var string link_key ($link_keyseq) {
    # if we can do performed action, url will be present
    if($link_url{$link_key} != "") {
      $print = $print + """<a href="$link_url{$link_key}"> &nbsp; """;
      # if image url available, use it
      if($link_image{$link_key} != "") {
        $print = $print + """<img src="$link_image{$link_key}" alt="$link_caption{$link_key}" title="$link_caption{$link_key}" align="middle" border="0" />""";
      } else {
        # else, just use text
        $print = $print + "$link_caption{$link_key}";
      }
      # add a seperator
      $print = $print + " &nbsp; </a>$link_seperator";
    }
  }

  # hack off last seperator
  $print = $print->substr(0, $print->length() - $link_seperator->length());

  # we're done! let's print it!
  print $print;
}

function CommentInfo::print() {
  var string text_comment_divider = "";

  if($.show_readlink) {
    $this->print_readlink();
    if($.show_postlink) {
      print $text_comment_divider;
    }
  }
  if($.show_postlink) {
    $this->print_postlink();
  }
}

function Page::lay_print_sidebar ()  {
var string header  = "";
var string content = "";

$header  = "Introduction";
$content = "Insert a welcome message here!";

print_box($header, box_item($content));

# $this->lay_print_summary();
$this->lay_print_calendar();
$this->print_linklist();
$this->lay_print_freetext();

$header  = "LiveJournal Navigation";
$content = "";
var string   nav_key   = "";
var string[] nav_order = [];
var string{} nav_url   = {"" => ""};
var string{} nav_text  = {"" => ""};

$nav_key                     = "recent";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = $.view_url{"recent"};
$nav_text{$nav_key}          = lang_viewname("recent");

$nav_key                     = "info";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = $.view_url{"userinfo"};
$nav_text{$nav_key}          = lang_viewname("userinfo");

$nav_key                     = "userpics";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = $.journal.userpic_listing_url;
$nav_text{$nav_key}          = "Userpics";

$nav_key                     = "filters";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = "$*SITEROOT/friends/filter.bml";
$nav_text{$nav_key}          = "Filters";

$nav_key                     = "mems";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = "$*SITEROOT/tools/memories.bml?user=$.journal.username";
$nav_text{$nav_key}          = "Memories";

$nav_key                     = "poll";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = "$*SITEROOT/poll/create.bml";
$nav_text{$nav_key}          = "Create Poll";

$nav_key                     = "adv";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = "$*SITEROOT/customize/advanced/";
$nav_text{$nav_key}          = "Advanced Customization";

$nav_key                     = "linklist";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = "$*SITEROOT/manage/links.bml";
$nav_text{$nav_key}          = "Manage Links";

$nav_key                     = "comms";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = "$*SITEROOT/community/manage.bml";
$nav_text{$nav_key}          = "Manage Communities";

$nav_key                     = "recentcomments";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = "$*SITEROOT/tools/recent_comments.bml";
$nav_text{$nav_key}          = "Recent Comments";

$nav_key                     = "bdays";
$nav_order[size($nav_order)] = $nav_key;
$nav_url{$nav_key}           = "$*SITEROOT/birthdays.bml?user=$.journal.username";
$nav_text{$nav_key}          = "Birthdays";

foreach var string n ($nav_order) {
  var string url  = $nav_url{$n};
  var string text = $nav_text{$n};
  $content = $content + box_item("""<a href="$url">$text</a>""");
}

print_box($header, $content);

$header  = "An additional column";
$content = "" +
box_item("Insert something here!") +
box_item("Insert something here!");

print_box($header, $content);

$header  = "Yet another column";
$content = "" +
box_item("Insert something here!") +
box_item("Insert something here!");

print_box($header, $content);

}

function Page::lay_print_header ()  {
# this is the order of the links
var string[] views_order = $.views_order;

"""
<div id="nav" align="center">""";

foreach var string v ($views_order) {
  var string url  = $.view_url{$v};
  var string text = lang_viewname($v);
  """<a href="$url">$text</a>""";
}

if($.journal.website_url != "") {
  var string url  = $.journal.website_url;
  var string text = $.journal.website_name != "" ? $.journal.website_name : $*text_website_default_name;
  """<a href="$url">$text</a>""";
}

var string[] text;
var string[] url;
var int      index = 0;

# copy sets as necessary

$text[$index] = "Update";
$url[$index]  = "$*SITEROOT/update.bml";
$index++;

$text[$index] = "Memories";
$url[$index]  = "$*SITEROOT/tools/memories.bml?user=$.journal.username";
$index++;

foreach var int i (0 .. (size($text) - 1)){
  """<a href="$url[$i]">$text[$i]</a>""";
}
"""
</div>""";
}

function Page::lay_make_username(Entry e) {
  """
  <div class="entryinfo">$e.poster</div>""";
}

function Page::print_entry (Entry e)  {

  print """<a name="item""" + $e.itemid + """\"></a>""";
  var string time = $e.time->time_format();
  var string date = $e.time->date_format();
  var string security;
  if ($e.security != "") {
    $security =  $e.security_icon->as_string();
  }

  var UserLite name;
  var string   pname;
  var bool     show_name = ($.view == "friends") or (not $e.poster->equals($e.journal));
  var bool     show_pic  = (defined $e.userpic and ((not $e.poster->equals($e.journal)) or ($*show_entry_userpic)));

  """	
  <div class="entry">""";
  if($show_pic) {
    """
    <div class="userpic2">
      <a href="$*SITEROOT/allpics.bml?user=$e.poster.username"><img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name [userpic]" title="$e.poster.name [userpic]" border="0" /></a>
    </div>""";
  }
  var string subject = $e.subject != "" ? $e.subject : """<i class="nosubject">$*text_nosubject</i>""";
  """
    <div class="subject">$subject</div>
    <div class="entryinfo">$security <b>posted on:</b> $date <b>@</b> $time</div>
  """;
  if($show_name) {
    $this->lay_make_username($e);
  }
  var int    count     = 0;
  var string tags      = "";
  var string tags_root = $.journal->base_url() + "/tag";
  foreach var Tag t ($e.tags) {
    $tags = $tags + """<a href="$tags_root/$t.name">$t.name</a>""";
    if(++$count < size($e.tags)) {
      $tags = $tags + ", ";
    }
  }
  if($tags != "" and $*tags_aware) {
    $tags = "<b>Tags:</b> " + $tags;
  }
  """
    <div class="tags">$tags</div>
    <div class="entrytext"><br />
    <div class="entry">"""; $e->print_text(); """</div>
  """;
  $e->print_metadata();
  """
    </div>
  </div>
  <div class="entrylinks">
  """;
  $e.comments->print();
  $e->print_linkbar();
  """
  </div>
  <div class="backtop"><a href="#top">back to top</a></div>
  <br />
  """;
}

function Page::lay_print_subnav() {
  var string prev_url  = "";
  var string prev_text = $*text_back;
  var string next_url  = "";
  var string next_text = $*text_forward;
  var string text      = "Viewing ";

  if($this isa RecentPage) {
    var RecentPage rp    = $this as RecentPage;
    var int        start = $rp.nav.skip;
    var int        end   = $rp.nav.skip + size $rp.entries;
    $text = $text + " $start - $end";

    $prev_url = $rp.nav.backward_url;
    $next_url = $rp.nav.forward_url;
  }
  if($this isa YearPage) {
    var YearPage yp = $this as YearPage;

#    $prev_url = $rp.nav.backward_url;
#    $next_url = $rp.nav.forward_url;
  }
  if($this isa MonthPage) {
    var MonthPage mp = $this as MonthPage;
    $text = $text + " " + $mp.date->date_format("%%month%% %%yyyy%%");

    $prev_url = $mp.prev_url;
    $next_url = $mp.next_url;
  }
  if($this isa DayPage) {
    var DayPage dp = $this as DayPage;
    $text = $text + " " + $dp.date->date_format();

    $prev_url = $dp.prev_url;
    $next_url = $dp.next_url;
  }
  if($this isa EntryPage) {
    var EntryPage ep = $this as EntryPage;
    $text = $text + " " + $ep.view;

    var Link prev = $ep.entry->get_link("nav_prev");
    var Link next = $ep.entry->get_link("nav_next");
    $prev_url = $prev.url;
    $next_url = $next.url;
  }
  if($this isa ReplyPage) {
    var ReplyPage rp = $this as ReplyPage;
    $text = $text + " " + $rp.view;

    var Link prev = $rp.entry->get_link("nav_prev");
    var Link next = $rp.entry->get_link("nav_next");
    $prev_url = $prev.url;
    $next_url = $next.url;
  }

  if($prev_url != "" or $next_url != "") {
    var string back    = $prev_url != "" ? """<a href="$prev_url">$prev_text</a>""" : "";
    var string forward = $next_url != "" ? """<a href="$next_url">$next_text</a>""" : "";
    """
    <div class="messageholder">
      <div class="systemmessage">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
          <tr>
            <td width="33%" align="left">$back</td>
            <td width="33%" align="center">$text</td>
            <td width="33%" align="right">$forward</td>
          </tr>
        </table>
      </div>
    </div>
    """;
  }
}

function FriendsPage::lay_make_username (Entry e) {
  var Friend f   = $.friends{$e.journal.username};
  var string url = $e.poster->base_url();
  """
  <div class="entryinfo"><a href="$url/" class="friendname">$e.poster.username</a>""";
  if(not $e.poster->equals($e.journal)) {
    """ $e.journal""";
  }
  """
  </div>""";
}

function EntryPage::print_comment(Comment c) {
  var string symb;
  if ($c.metadata{"picture_keyword"}!=""){
    $symb = ": ";
  }
  var string picword;
  if (defined $c.userpic and $*comment_userpic_style !="off") {
    $picword = $c.poster.name + $symb + $c.metadata{"picture_keyword"};
  }
  var string datetime;
  $datetime = $c.time->date_format()+", " + $c.time->time_format();

  var string parent;
  var string thread;
  if($c.parent_url != "") {
    $parent = """<a href="$c.parent_url"> &nbsp; $*text_comment_parent &nbsp; </a>""";
  }
  if($c.thread_url != "") {
    $thread = """<a href="$c.thread_url"> &nbsp; $*text_comment_thread &nbsp; </a>""";
  }

  var string subjecticon;
  if (defined $c.subject_icon) {
    $subjecticon = """<img src="$c.subject_icon.url" width="$c.subject_icon.width" height="$c.subject_icon.height" height="$c.userpic.height" title='$picword'/>""";
  }

  var string ip;
  if ($c.metadata{"poster_ip"}) { 
    $ip = """ &nbsp;  """ + $c.metadata{"poster_ip"}; 
  }

  var string poster = defined $c.poster ? $c.poster->as_string() : "<b>(Anonymous)</b>";

  var string pic;
  if (defined $c.userpic and $*comment_userpic_style != "off") {
    $pic = """<div class="userpic2"><img src="$c.userpic.url" width="$c.userpic.width" height="$c.userpic.height" height="$c.userpic.height" title='$picword'/></div>""";
  }

  var string indent = ($c.depth - 1) * 25 + "px";
  """
  <a name="$c.anchor"></a>
  <div class="entry" style="margin-left: $indent;">
  $pic
  <div class="entryinfo"><br />$subjecticon</div>
  <div class="postedby">$poster <span class="ip">$ip</span></div>
  <div class="entryinfo"><b>on</b> $datetime</div>
  <div class="entrylinks">
  """;
  if ($.multiform_on) {
    """<label for="ljcomsel_$c.talkid">$*text_multiform_check</label> """; 
    $c->print_multiform_check();
  }

  var string replyurl;
  if ($c.frozen) {
    $replyurl = """ &nbsp; $*text_comment_frozen &nbsp; """;
  } else {
    $replyurl = """<a href="$c.reply_url"> &nbsp; $*text_comment_reply &nbsp; </a>""";
  }
  print $replyurl;

  # some links for doing stuff to this comment
  foreach var string k ($c.link_keyseq) {
    var Link link = $c->get_link($k);
    if ($link) {
      """<a href="$link.url"> &nbsp; $link.caption &nbsp; </a>""";
    }
  }
  """
  <a href="$c.permalink_url"> &nbsp; $*text_permalink &nbsp; </a>$parent$thread
  </div>
  <div class="entrytext">
    <div class="subject">$c.subject</div>
    <p>"""; $c->print_text(); """</p>
  </div>
  """;
  if ((size $c.replies) > 0 and $c.replies[0].full == false) {
    """<div style="margin-top: 5px; margin-bottom: 5px; clear: both;">\n""";
    $this->print_comments($c.replies);
    "</div>\n";
  }
  """
  </div>
  """;
  if ((size $c.replies) > 0 and $c.replies[0].full == true) {
    $this->print_comments($c.replies);
  }
}

function ReplyPage::print_body() {
  var EntryLite e      = $.replyto;
  var string    poster = defined $e.poster ? $e.poster->as_string() : "<i>(Anonymous)</i>";
  var string    datetime;
  var string    time   = $e.time->time_format();
  var string    date   = $e.time->date_format();

  var UserLite name;
  if(defined $e.userpic and $*comment_userpic_style != "off") {
    $name = $e.poster;
    """
    <div class="userpic2">""";
      if (defined $e.userpic or (defined $e.userpic and $.view == "entry" and $*show_entry_userpic)) {
        """
      <img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="" />""";
      }
    """
    </div>""";
  }
  """	
    <div class="entry">
      <div class="entrydivider"></div>
      <div class="entryinfo">$name</div>
      <div class="entrydivider"></div>
      <div class="entryinfo">$time $date</div>
      <div class="entrydivider"></div>
      <div class="entrylinks">
        <a href="$.entry.comments.read_url" class="comments"> &nbsp; $*text_reply_back &nbsp; </a>""";
  $.entry->print_linkbar();
  var string subject = $e.subject != "" ? $e.subject : """<i class="nosubject">$*text_nosubject</i>""";
  """
    <a href="$e.permalink_url"> &nbsp; $*text_permalink &nbsp; </a>
      </div>
      <div class="entrytext">
        <div class="subject">$subject</div>
        <p>
  """;
  $e->print_text();
  """
        </p>
      </div>
      <div class="messageholder">
        <div class="systemmessage">
  """;
  $.form->print();
  """
        </div>
      </div>
  """;
}

function Page::print ()  {
var string header_url    = "";
var int    journal_width = 650;

var string title = $this->title();
"""
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>$title</title>
    <link rel="stylesheet" href="$.stylesheet_url" type="text/css"/>
""";
$this->print_head();
"""
  </head>
<body>
  <a name="top"></a>
""";
$this->print_control_strip();
"""
  <div align="center">
""";

if($header_url != "") {
"""
<img src="$header_url" />""";
}

"""
    <table cellspacing="0" cellpadding="0" border="0" width="$journal_width">
      <tr>
        <td>
          <div align="left" width="100%">
""";
# $this->lay_print_username();
$this->lay_print_header();
"""
            <div class="border2">
              <div class="border3">
                <div class="border4">
                  <div id="content" align="left">
                    <table cellspacing="10" cellpadding="0" border="0">
                      <tr>
                        <td valign="top" class="sidetd" width="120">
                          <div id="sidecolumn" width="140" align="center">
""";
# $this->lay_print_userpic();
$this->lay_print_sidebar();
"""
                          </div>
                        </td>
                        <td valign="top" width="100%">
""";
$this->print_body();
$this->lay_print_subnav();
"""
                        </td>
                      </tr>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </td>
      </tr>
    </table>
  </div>
</body>
</html>
""";
}
linkReply

Comments:
Page 1 of 4
<<[1] [2] [3] [4] >>
[User Picture]From: milasmith
2005-12-21 01:17 am (UTC)
*wolf whistles*

Thank you....
(Reply) (Thread)
[User Picture]From: kunzite1
2005-12-21 01:20 am (UTC)

you're welcome.
(Reply) (Parent) (Thread)
[User Picture]From: simons_flower
2005-12-21 04:49 am (UTC)
I have copied and when I get bored with my current layout *cough*in a couple weeks*cough* I'll try it out.

Thanks!
(Reply) (Thread)
[User Picture]From: captainarrg
2005-12-21 08:47 pm (UTC)
Nabbing! thanx! Will credit! *hands you cookies*

Cheers!
(Reply) (Thread)
[User Picture]From: balletholic
2005-12-21 10:33 pm (UTC)
I'm going to use this code in my new layout. Do you know how can I change the security icons for texts (like "friends only") or other icons? Thanks in advance!
(Reply) (Thread)
[User Picture]From: kunzite1
2005-12-21 10:46 pm (UTC)

pick one.
custom text or custom icons?
or custom icons with custom alt text?
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: halffling
2005-12-23 06:01 am (UTC)
You rock like no other. Thanks so much for doing this! (And apologies for being a pain with such messy coding XD)
(Reply) (Thread)
[User Picture]From: kunzite1
2005-12-23 06:12 am (UTC)

you're welcome.
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: dorkdance
2005-12-24 04:36 pm (UTC)
Random question: How do I get my userpics to show up completely in IE on recent/friends/entry pages? They show fine on the reply page, but... yeah. Here's my CSS [the div and surrounding code looks exactly as it does here]:

.userpic2 {
background: transparent;
border: #D0D0D0 solid 3px;
padding: 0px;
margin-top: 0px; margin-bottom: 3px; margin-right: 0px; margin-left: 3px;
* margin-top: -1px;
* height: 100px;
* width: 100px;
float: right;
* text-align: left;
}

As you can see, I've been attempting to use asterisks to override the Firefox CSS in IE, without screwing up the look of the layout in FF. So. ::pokes it::
(Reply) (Thread)
[User Picture]From: dorkdance
2005-12-24 04:41 pm (UTC)
Nevermind. Yay, padding!
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: beetwo
2005-12-28 03:29 am (UTC)
you.are.awesome.
(Reply) (Thread)
[User Picture]From: modelike
2005-12-30 08:25 am (UTC)
thank you so much.
i just have 1 question that i can not figure out.
on my current layout {from you're codes}
how do i make the gap between my header and navigation bar gone.
i want mine to look like inside's lj.
thank you.
(Reply) (Thread)
[User Picture]From: kunzite1
2005-12-30 08:54 am (UTC)

#nav {
  padding-top: 0px;
}
(Reply) (Parent) (Thread) (Expand)
From: letitia
2005-12-31 12:11 am (UTC)
how would you add a counter to the "additional column"? i tried putting the coding here:

$header = "An additional column";
$content = "" +
box_item("Insert something here!") +
box_item("Insert something here!");

in the first "Insert something here!" but it didn't work. help! thanks!
(Reply) (Thread)
[User Picture]From: kunzite1
2005-12-31 09:14 am (UTC)

please use this to post the code.
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: prettyscribbles
2006-01-02 07:05 pm (UTC)
Thank you very much! :) My only problem is changing the width of the navigation bar so it lines up with the width of the header and the width of the entries so it's all streamlined and such. Is there any way to do this?
(Reply) (Thread)
[User Picture]From: kunzite1
2006-01-02 09:05 pm (UTC)

you need to set the background color of the #nav <div> in your css.

since this is a recurring error, i shall fix it in the entry.
(Reply) (Parent) (Thread) (Expand)
(Deleted comment)
[User Picture]From: kunzite1
2006-01-05 03:40 am (UTC)

the properties in the wizard should change those.
(Reply) (Parent) (Thread)
(Deleted comment)
(Deleted comment)
(Deleted comment)
(Deleted comment)
(Deleted comment)
(Deleted comment)
(Deleted comment)
(Deleted comment)
(Deleted comment)
[User Picture]From: troublesrollby
2006-01-04 10:39 pm (UTC)
I have a couple questions concerning further customization of this layout and I was just wondering if you'd be willing to help me out?
(Reply) (Thread)
[User Picture]From: kunzite1
2006-01-05 03:34 am (UTC)

what kind of customizations?
(Reply) (Parent) (Thread)
[User Picture]From: penny_sieve
2006-01-05 03:26 am (UTC)

Header and background image

I'm sorry to bother you, but can you tell me where exactly in the code do I insert the header and background images? Thanks!
(Reply) (Thread)
[User Picture]From: kunzite1
2006-01-05 03:30 am (UTC)

Re: Header and background image

set page_background_image = "http://stat.livejournal.com/img/goat-normal.gif"; should set frank as the background.

var string header_url = "http://stat.livejournal.com/img/goat-normal.gif"; in Page::print() should set frank as the header.
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: whatsername_31
2006-01-08 08:30 am (UTC)

This is great, but a very simple question

I find this layout much easier than the one I was using before. I seem to be having a problem with what should be the simpliest thing in the layout, and feel like a real dunce.

The following code does not change any colors for me as it should. I know some of the colors are labeled by number, and those work properly for me. If I am reading the code right, however; the code below is to change the background color, fonts, and the like.

When I try to change the color, I simply insert a new hexadecimal number into the place where the original color was. It just does not seem to do anything. Is there a step I am missing?

Here is the code

****set color_bg = "#ffffff";
set color_bg_font = "#737373";
set color_fg = "#dadada";
set color_fg_font = "#818181";
set color_med = "#dadada";
set color_med_font = "#818181";****

I would for example chage #ffffff to #440044.

Please help, as I am almost ready to use the layount, and just need to complete the colors.
(Reply) (Thread)
[User Picture]From: kunzite1
2006-01-08 08:32 am (UTC)

Re: This is great, but a very simple question

check to see if you have a user layer attached to your style.
if those colors are set in the user layer, the values in the user layer will be used, regardless of the values in the theme layer.
(Reply) (Parent) (Thread) (Expand)
(Deleted comment)
[User Picture]From: kunzite1
2006-01-08 07:30 pm (UTC)

show me an example?
(Reply) (Parent) (Thread)
(Deleted comment)
(Deleted comment)
(Deleted comment)
(Deleted comment)
[User Picture]From: adidaschica2323
2006-01-10 05:08 am (UTC)
deleted my old comment. but i still have 2 questions. ive tried everything and still haven't been able to move my entries and nav links up to touch my header image. also i want to add back the permalink feature.

PLEASE HELP... layer id 5840060
(Reply) (Thread)
[User Picture]From: kunzite1
2006-01-10 05:17 am (UTC)

capital letters won't get you where you want to go any faster.

did you edit the stylesheet function at all?

if you use my code as-is, and then enter your header image, does it still have that problem with the navlinks?

permslink isn't difficult to add.
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: beckslfd
2006-01-15 03:36 am (UTC)
I found this through one of my wanderings in LJ-land. I'd love to try this layout out -- I've finally figured out how to do it, and my journal could use some spiffying up!

Thank you so much! :D
(Reply) (Thread)
[User Picture]From: pagan_poetess
2006-01-26 10:38 pm (UTC)
Hallo! First of all, thanks a bunch for uploading the layout, I'm definitely going to use it =) But I have a few problems and I was wondering if you could help me.

1) I've been trying for hours but I can't change the width of the navigation bar, see? :/ I'd like it to be the same width as the header.
2) I can't get rid of the scrollbars either.

Is there any way I can solve that?. Thanks in advance =)
(Reply) (Thread)
[User Picture]From: kunzite1
2006-01-26 10:47 pm (UTC)

width of navbar is hard-coded into Page::print(). i should make a var for that.

scrollies: are they on every entry? or just a couple?
(Reply) (Parent) (Thread) (Expand)
From: fluttersbye
2006-01-27 05:12 am (UTC)
Wonderful layout!!! It is such a breeze! Thank you, thank you! *bows down*

I have just one silly question if you don't mind me asking for help. How do you change the width of the page? Maybe I am over tired but I can't seem to find it in the coding anywhere. My width seems really wide until I view my friends page and then it shrinks again. I think I am missing something somewhere but I am not sure where. Any help would be greatly appreciated.
(Reply) (Thread)
[User Picture]From: kunzite1
2006-01-28 09:38 am (UTC)

if the width is wider on your recent view than it is on your friends view, it seems that you've got an image in an entry that is stretching the width of the layout.
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: crunknwj
2006-01-27 06:38 pm (UTC)
ignore that comment i just posted...i figured it out (i forgot to do one thing)

thanks again for the codes!
(Reply) (Thread)
[User Picture]From: ohkaye
2006-01-28 11:29 pm (UTC)
This is amazing, and thank you so much for doing it. I'm having one tiny problem setting it up, though - I can't seem to change the overall width. I'm assuming you have to work with

table cellspacing="0" cellpadding="0" border="0" width="434"

and change the width to whatever you want it to be. However, no matter what the I change the width to, the page doesn't change. Am I working with the wrong part of the code?
(Reply) (Thread)
[User Picture]From: kunzite1
2006-01-28 11:33 pm (UTC)

434 pixels isn't really practical for a livejournal layout.
and your header is longer than that. due to the additional links that are added. so. you might want to remove the ones that are additional.
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: peaceolgy
2006-01-29 02:21 am (UTC)
This is so sweet of you :-)
Definitly using!
(Reply) (Thread)
From: aurora_north
2006-02-05 12:15 am (UTC)
Beautiful, beautiful code. Thank you
(Reply) (Thread)
[User Picture]From: kunzite1
2006-02-05 12:16 am (UTC)

good to know that it's appreciated.
(Reply) (Parent) (Thread)
[User Picture]From: hello_lisa
2006-02-06 01:20 am (UTC)
This is brilliant, thanks a lot for posting it!
One question, is there a way to not have my icons on every entry?
Thanks!
(Reply) (Thread)
[User Picture]From: kunzite1
2006-02-06 03:24 am (UTC)

try:
set show_entry_userpic = false;
(Reply) (Parent) (Thread) (Expand)
[User Picture]From: foolish
2006-02-07 02:39 am (UTC)
Wow, thanks so much!!! ^_^
(Reply) (Thread)
Page 1 of 4
<<[1] [2] [3] [4] >>