unique.wonders. ([info]uniquewonders) wrote in [info]component_help,
@ 2008-03-07 23:08:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Entry tags:!tutorial, *account level: paid/perm, admin: updates, class: commentinfo, function: print, function: print_entry, function: print_linkbar, function: print_metadata, function: print_postlink, function: print_readlink, user: uw

TUTORIAL: [Entries] Custom Entries

!!! Recently Updated !!!


Preview
» link


Difficulty Level4.5 stars

Related Tutorials


Instructions
» Copy and paste the code located in the box.
» If you already have some of these properties somewhere in your code, do not copy/paste them again.
» Read the code for further instructions on how to change settings and data. Instructions are in green. Settings and data you can change are in red.
» Spot the blue lines if you need to insert some related tutorials.
» Enjoy! :)


Known Issues
» If scrollbars are activated, random vertical scrollbars and extra space below metatada may appear. This issue is not fixable. An alternate solution it to cut off large content. Activate the scrollbars then, in the code, turn overflow: auto into overflow: hidden. People using Firefox or any other smart browser can also use the following CSS instead:

.entry img {
max-width: 500px;
}


Thanks & Credit
» Credit goes to [info]kunzite1 and [info]xtomxfallsx for writing the original version of this tutorial, and to [info]daimones for making scrollbars work.
» Heartfelt thanks to [info]hollywoodism, [info]leanasidhe, [info]sam42 and [info]bellemelange for beta-testing this and giving precious feedback.



####################################################
#  CUSTOM ENTRIES (V5) #
#  overrides: #
#  Entry::print_metadata() #
#  CommentInfo::print_readlink #
#  CommentInfo::print_postlink #
#  CommentInfo::print() #
#  Entry::lay_print_linkbar() #
#  print_entry() #
#  source: #
#  component_help/1196581.html #
####################################################

#===============================================
#
# PROPERTIES PERTAINING TO ENTRIES #
#
#===============================================

### SUBJECT PROPERTY ###

# Text to be used when there is no subject. You can't use HTML.
# See below if you want to activate it.
set text_nosubject = "(no subject)";

### SECURITY ICON PROPERTIES ###

# Alternative text for security icons. You can't use HTML.
# Can also be used to replace the icons. See below.
set text_icon_alt_protected = "[protected post]";
set text_icon_alt_private = "[private post]";
set text_icon_alt_groups = "[custom friends groups post]";

### USERPIC PROPERTIES ###

# Display userpics on the recent page: true or false?
# Display userpics on the reply page and entry page: true or false?
# See below for other pages.

set show_entry_userpic = true;
set show_entrypage_userpic = true;

### METADATA PROPERTIES ###

# Text for metadata labels. You can't use HTML.
# See below to edit the label for Current Tags.
# See below if you want to use images instead of text.

set text_meta_location = "Current Location:";
set text_meta_mood = "Current Mood:";
set text_meta_music = "Current Music:";
set text_meta_groups = "Custom Friends Groups:";

### COMMENT LINKS PROPERTIES ###

# You can't use HTML.
# See below if you want to use images instead.

set text_post_comment = "Leave a comment";
set text_post_comment_friends = "Leave a comment";
set text_max_comments = "Maximum comments reached";
set text_read_comments = "1 comment // # comments";
set text_read_comments_friends = "1 comment // # comments";
set text_month_screened_comments = "w/ Screened";
set comment_divider = "or";

### PERMALINK PROPERTY ###

# Text for the permalink. You can't use HTML.
# See below if you want to deactivate it.
set text_permalink = "Link";

### LINKBAR PROPERTIES ###

# Alternative text for the linkbar icons. You can't use HTML.
# If you want to hide a link, delete what's between the quotes.
# You also have to delete the image URL (see further down).
# See further down if you want text to replace images.

set text_edit_entry = "Edit Entry";
set text_edit_tags = "Edit Tags";
set text_tell_friend = "Tell a Friend";
set text_mem_add = "Add to Memories";
set text_watch_comments = "Track This";
set text_unwatch_comments = "Untrack This";
set text_flag = "Flag";
set text_entry_prev = "Previous Entry";
set text_entry_next = "Next Entry";

#===============================================
#
# METADATA #
#
#===============================================


# Activate tags. Do not change this.
set tags_aware = true;

function Entry::print_metadata()
{
  var string[] metadata = [];
  var string{} meta_images = {};
  var string{} meta_labels = {};

##### START CONFIGURATION. THIS IS WHERE YOU SET YOUR OPTIONS. #####

  ### PRESENTATION OPTION ###

  # Order of the metadata. Move the names to change the order. Do not change the syntax (quotes and commas).

  $metadata =
                [
		        "location",
		        "mood",
		        "music",
		        "tags",
		        "groups"
                ];

  # Mood icon on the left of all the metadata: true or false?
  var bool wrap_metadata = false;

  ### LABEL OPTIONS ###

  # Text used as labels. Edit the one for tags. Include punctuation if you want some.
  # If you decide you'd rather have an image (see below), it will serve as a caption.
  # The other labels must be edited in properties (see above).

  $meta_labels =
                {
                          "tags" => "Current Tags:",
                          "location" => $*text_meta_location,
                          "mood" => $*text_meta_mood,
                          "music" => $*text_meta_music,
                          "groups" => $*text_meta_groups,
                };

  # If you'd rather use images, enter their URLs between the quotes on the right. Leave blank if you prefer text.

  $meta_images =
                {
                          "tags" => "",
                          "location" => "",
                          "mood" => "",
                          "music" => "",
                          "groups" => "",
                };

  ### TAG OPTIONS ###

  # Set this to true if you want the tags header to link to Edit Entry Tags.
  var bool show_edit_tags_link = false;

  # Character used as a separator between tags. Include punctuation and space.
  var string tags_separator = ", ";

  ### LOCATION OPTIONS ###

  # Set this to true to delinkify location.
  var bool vanilla_location = true;

  ### GROUPS OPTIONS ###

  # Set this to true to delinkify groups.
  var bool vanilla_groups= true;

  ### STYLING OPTIONS FOR METADATA LABELS ###

  # Opening. You can use HTML of course.
  var string meta_label_open = """<strong>""";

  # Closing. You can use HTML of course.
  var string meta_label_close = """</strong> """;

  ### STYLING OPTIONS FOR METADATA VALUES ###

  # Opening. You can use HTML.
  var string meta_val_open= "";

  # Closing. You can use HTML.
  var string meta_val_close = """<br />""";

##### END CONFIGURATION. #####

##### DO NOT EDIT ANY OF THE FOLLOWING CODE UNLESS YOU KNOW WHAT YOU'RE DOING! #####

  var string currents_open = """<div class="entryMetadata">""";
  var string currents_close= """</div>""";

  var bool have_meta = (size($.metadata) > 0); # do we have meta?
  var bool have_tags = ((size($.tags) > 0) and $*tags_aware); # do we have tags?

  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"); # helper var to see if remote user can edit tags

  ### Metadata in a Box ###
  ### Insert all the variables here. ###

  ### Print metadata if we should.

  if ($have_meta or $have_tags) 
  {
	### Metadata in a Box ###
	### Replace this line with $currents = $currents_open + $meta_box_open + $currents; ###

	$currents = $currents_open + $currents;

	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>""";
	}

	# Step through metadata.
	foreach $k ($metadata)
	{
		$label = $meta_labels{$k} != "" ? $meta_labels{$k} : lang_metadata_title($k); # get label
		$image = $meta_images{$k} != "" ? $meta_images{$k} : ""; # get image
		$val = $.metadata{$k}; # get value

		# If we have an image, get it.
		if ($image != "") {
			$label = """<img src="$image" alt="$label" title="$label" border="0" />""";
		}



                # Delinkify location if user said so.
		if (($k=="location") and $vanilla_location) {              
			$val = striphtml($val);
		}

                # Delinkify groups if user said so.
		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 tags.
                if (($k=="tags") and ($have_tags==true)) {

 			# If remote user can edit tags and users wants a link, give them a link.
 			if($edit_tags.url != "" and $show_edit_tags_link) { 
                              $label = """<a href="$edit_tags.url">$label</a>""";
 			}

 			# Build the tags list.
 			foreach $t ($.tags) {
                              $tag = """<a href="$t.url">$t.name</a>""";
                              $val = $val + $tag;
                              $tcount++;

                              # If we haven't hit the last tag, add a separator.
                              if ($tcount < size($.tags)) {
                                    $val = $val + "$tags_separator";
                              }
 			}
                } # End of tags.

    
                # If we have a val, build meta.
                if ($val != "") {
 			$meta = $meta_label_open + $label + $meta_label_close + $meta_val_open + $val + $meta_val_close;
                } else {
                        $meta = "";
                }

                # add meta to currents
                $currents = $currents + $meta;

	} # End of metadata.

	# Print metadata.

        if ($wrap_metadata and defined $.mood_icon) {        
                $currents = $currents + """</td></tr></table>""";
        }

	### Metadata in a Box ###
	### Replace this line with $currents = $currents + $meta_box_close + $currents_close; ###
        
        $currents = $currents + $currents_close;
        println "$currents";
  }
}

#===============================================
#
# READ COMMENTS LINK #
#
#===============================================

function CommentInfo::print_readlink()
{
##### START CONFIGURATION. THIS IS WHERE YOU SET YOUR OPTIONS. #####

  ### Enter your image URL if you want to replace the text link by an image link.

  var string img_url = "";

  ### Enter the width and height of your image URL if you want to replace the text link by an image link.

  var int img_width = 0;
  var int img_height = 0;

  ### Set to true if you want to print the number of comments in front of your image.

  var bool img_count = false;

##### END CONFIGURATION. #####

##### DO NOT EDIT ANY OF THE FOLLOWING CODE UNLESS YOU KNOW WHAT YOU'RE DOING! #####

  if ($.show_readlink) {
        var Page p = get_page();
        var string url = $.read_url;
        var string text = get_plural_phrase($.count, "text_read_comments" + ($p.view == "friends" ? "_friends" : ""));

        if ($.screened) {
                $text = $text + " " + $*text_month_screened_comments;
        }

        if ($url != "") {
                """<a href="$url">""";
        }

        if ($img_url != "") {
                if($img_count) {
                        print $.count;
                }
                """<img src="$img_url" width="$img_width" height="$img_height" alt="$text" title="$text" border="0" />""";
                } else {
                        print $text;
                }
        if ($url != "") {
                """</a>""";
        }
  }
}

#===============================================
#
# POST COMMENT LINK #
#
#===============================================

function CommentInfo::print_postlink()
{
##### START CONFIGURATION. THIS IS WHERE YOU SET YOUR OPTIONS. #####

  ### Enter your image URL if you want to replace the text link by an image link.

  var string img_url = "";

  ### Enter the width and height of your image URL if you want to replace the text link by an image link.

  var int img_width = 0;

  var int img_height = 0;

##### END CONFIGURATION. #####

##### DO NOT EDIT ANY OF THE FOLLOWING CODE UNLESS YOU KNOW WHAT YOU'RE DOING! #####

  if($.show_postlink) {
        var Page p = get_page();
        var string url = $.post_url;
        var string text = get_plural_phrase(0, "text_post_comment" + ($p.view == "friends" ? "_friends" : ""));

    	if ($.maxcomments) {
		print safe "$*text_max_comments";
    	}
    	else
	{
    		if ($img_url != "") {

        		if ($p.view == "entry") {
          			$p->print_reply_link({"target" => "topcomment", "img_url" =>$img_url, "alt" => $*text_post_comment,  "title" => $*text_post_comment});
			}
			else
			{
				"""<a href="$url"><img src="$img_url" width="$img_width" height="$img_height" alt="$text" title="$text" border="0" /></a>""";
			}
      
    		} else {

        		if ($p.view == "entry") {
          			$p->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment});
			}
			else
			{
	     			"""<a href="$url">$text</a>""";
			}
    		}
	}
  }

}

#===============================================
#
# PRINT COMMENT LINKS #
#
#===============================================

function CommentInfo::print()
{
##### START CONFIGURATION. THIS IS WHERE YOU SET YOUR OPTIONS. #####

  ### Enter your image URL if you want to replace the text divider by an image.

  var string img_url = "";

  ### Enter the width and height of your image URL if you want to replace the text divider by an image.

  var int img_width = 0;
  var int img_height = 0;

##### END CONFIGURATION. #####

##### DO NOT EDIT ANY OF THE FOLLOWING CODE UNLESS YOU KNOW WHAT YOU'RE DOING! #####

  if ($.show_readlink) {
        $this->print_readlink();

        if ($.show_postlink) {

                if ($img_url != "") {
                        """ <img src="$img_url" width="$img_width" height="$img_height" alt="$*comment_divider" title="$*comment_divider" border="0" /> """;
                } else {
                        """ $*comment_divider """;
                }
        }
  }

  if ($.show_postlink) {
        $this->print_postlink();
  }
}

#===============================================
#
# PRINT ENTRY LINKBAR #
#
#===============================================

function Entry::lay_print_linkbar() : bool
{
  var Page p = get_page();
  if (($*show_entrynav_icons and $p.view == "entry") or ($*show_recentnav_icons and ($p.view == "recent" or $p.view == "friends")))
  {

##### START CONFIGURATION. THIS IS WHERE YOU SET YOUR OPTIONS. #####

  # Position of the linkbar (edit, edit tags, etc.): in its usual place on the side (side) or at the bottom (bottom)?
  # !!! THIS OPTION MUST MATCH WHAT YOU'LL CHOOSE IN PRINT ENTRY !!!

  var string linkbar_position = "bottom";

  ### Separator between links in the linkbar. You can edit this. HTML is allowed.
  ### Note: if you've chosen to have the linkbar in its usual position, this will automatically be set to line-break (<br>) so do not need add it.

  var string linkbar_separator = """ """;

  ### Images used as links. If you'd rather use your own, replace $*edit_img, etc. with your URLs.
  ### If you want to use text delete what's between the quotes on the right side of the arrows.
  ### If you want to hide a link, also delete what's between the quotes.
  ### Make sure you delete the text in Linkbar Properties too (see above).

  var string{} linkbar_images = 
                                { 
                                       "edit_entry" => "$*edit_img",
                                       "edit_tags" => "$*tags_img",
                                       "mem_add" => "$*mem_img",
                                       "tell_friend" => "$*tellfriend_img",
                                       "flag" => "$*flag_img",
                                       "watch_comments" => "$*track_img",
                                       "unwatch_comments" => "$*untrack_img",
                                       "nav_prev" => "$*backarrow2",
                                       "nav_next" => "$*forwardarrow2",
                                };

##### END CONFIGURATION. #####

##### DO NOT EDIT ANY OF THE FOLLOWING CODE UNLESS YOU KNOW WHAT YOU'RE DOING! #####

  var string{} linkbar_captions =
                                {
                                       "edit_entry"=> $*text_edit_entry,
                                       "edit_tags"=> $*text_edit_tags,
                                       "mem_add"=> $*text_mem_add,
                                       "tell_friend"=> $*text_tell_friend,
                                       "flag" => $*text_flag,
                                       "watch_comments"=> $*text_watch_comments,
                                       "unwatch_comments" => $*text_unwatch_comments,
                                       "nav_prev"=> $*text_entry_prev,
                                       "nav_next"=> $*text_entry_next,
                                };

  # Set separator to br if linkbar is in its usual position.
  $linkbar_separator = ($linkbar_position == "side") ? "<br/>" : $linkbar_separator;

  # Get Page handle.
  var Page p = get_page();

  # Initialize array/hashes.
  var string[] link_keyseq = [""];
  var string{} link_url = {"" => ""};

  var string url = "";
  var string text = "";
  var string icon = "";

  var string linkbar = "";
  var bool show_interentry = ($p.view == "entry" or $p.view == "reply");
  var int keyseq_index = 0;

  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;

        # Get next entry link information
        var Link next = $this->get_link("nav_next");
        $link_url{"nav_next"} = $next.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_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";
  }

  foreach var string link_key ($link_keyseq) {
        $url = $link_url{$link_key};
        $text = $linkbar_captions{$link_key};
        $icon = $linkbar_images{$link_key};

        if ($url != "") {
              $linkbar = $linkbar + """<a href="$url">""";

              if ($icon != "") {
                $linkbar = $linkbar + """<img src="$icon" alt="$text" title="$text" border="0" class="linkbar-img" />""";

              } elseif ($text != "") {
                    $linkbar = $linkbar + "$text";
              }

          $linkbar = $linkbar + "</a>$linkbar_separator";
        }
  }

  # Hack off last separator.
  $linkbar = $linkbar->substr(0, $linkbar->length() - $linkbar_separator->length());

  print $linkbar;

  return true;
  } else {
  return false;
  }

}

#===============================================
#
# PRINT ENTRIES #
#
#===============================================

function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text)
{
##### START CONFIGURATION. THIS IS WHERE YOU SET YOUR OPTIONS. #####

  ### SECURITY ICONS ###

  # Show an icon on public entries: true or false?
  var bool show_public_icon = false;

  # Image URLs for security icons. Replace with your own URLs if you want to.
  # If you want to use text, delete what's between the quotes on the right side of the arrows.

  var string{} sec_urls =
                        {
                                "public" => "http://pics.livejournal.com/kunzite1/pic/000f5p4c",
                                "protected"=> "$*IMGDIR/icon_protected.gif",
                                "custom" => "$*IMGDIR/icon_groups.gif",
                                "private" => "$*IMGDIR/icon_private.gif",
                        };

  # Text used as captions for the images or as text if you don't use images. Edit the one for public entries.
  # The rest must be edited in properties.

  var string{} sec_alts =
                        {
                                "public"    => "[public post]",
                                "protected" => $*text_icon_alt_protected,
                                "custom" => $*text_icon_alt_groups,
                                "private"   => $*text_icon_alt_private,
                        };

  ### USERPIC OPTIONS ###

  # Position of userpics: inside or outside?
  var string icon_position = "outside";

  # Position of userpics: right or left?
  var string icon_side = "left";

  # User friends colors: true or false?
  var bool use_friends_colors = false;

  # If userpics are inside, have a border: true or false?
  var bool show_border = false;

  # Show userpic on friends page/day page: true or false?
  # Options for other pages must be edited in properties.

  var bool show_friends_userpic = true;
  var bool show_day_userpic = false;

  ### SUBJECT OPTION ###
  
  # When there is no subject display (no subject) text: true or false?

  var bool use_nosubject = false;

  ### METADATA OPTIONS ###

  # Position of the metadata: top or bottom?
  var string meta_position = "bottom";

  # When the userpic's inside and the entry's very short, force the metadata to print below the icon rather next to it: true or false?
  var bool meta_wrap = false;

  ### LINKBAR OPTIONS ###

  # Position of the linkbar (edit, edit tags, etc.): in its usual place on the side (side) or at the bottom (bottom)?
  # !!! THIS OPTION MUST MATCH WHAT YOU'VE CHOSEN IN PRINT LINKBAR !!!

  var string linkbar_position = "bottom";

  ### PERMALINK OPTION ###

  # Display a permalink: true or false? 
  var bool show_permalink = true;

  ### SCROLLBAR OPTIONS ###

  # Implement horizontal scrollbars: true or false?
  # These will make sure your layout doesn't stretch horizontally when large content is posted.
  var bool show_hscroll = false;

##### END CONFIGURATION. #####

##### DO NOT EDIT ANY OF THE FOLLOWING CODE UNLESS YOU KNOW WHAT YOU'RE DOING! #####

  ### Build anchor for the page summary.
  var string id = ($p.view == "friends" ? $e.journal.username : "item") + $e.itemid;
  $id = """<a name="$id" id="$id"></a>""";

  ### Build the entry header.
  var string entry_header = "";
  
  # Only show public icon if user wants to.
  var string show_public = $show_public_icon ? "public" : "";
  var string security = ($e.security != "") ? $e.security : $show_public;

  ### Spiffy Date ###
  ### Replace these lines with the ones from the tutorial. ###

  # Add security icon/text to the entry header.
  if ($sec_urls{$security} != "") {
        $entry_header = $entry_header + """<img src="$sec_urls{$security}" alt="$sec_alts{$security}" title="$sec_alts{$security}" style="vertical-align: middle;" /> """;
  } else {
        $entry_header = $entry_header + """$sec_alts{$security} """;
  }

  # Add date and time to the entry header.
  $entry_header = $entry_header + $e.time->time_format();
  $entry_header = $entry_header + " ";
  $entry_header = $entry_header + ($e.new_day ? "<b>" : "");
  $entry_header = $entry_header + $e.time->date_format("long");
  $entry_header = $entry_header + ($e.new_day ? "</b>" : "");

  ### End entry header.

  ### Spiffy Date ###
  ### End of code replacement. ###

  ### Variables for userpics and usernames.

  var bool show_poster = ($p.view == "friends" or $p.journal.journal_type == "C");
  var bool show_userpic = false;
  var bool have_meta = false;
  var string padding_pos = "";
  var string iconborder = "";
  var string icon_data = "";
  $padding_pos = (($icon_side == "left") or ($icon_side == "right")) ? (($icon_side == "left") ? "right" : "left") : "";
  $icon_data = "";

  var bool show_recent_userpic = $*show_entry_userpic; # show userpic on recent page?
  var bool show_entry_userpic = $*show_entrypage_userpic; # show userpic on entry page?
  var bool show_reply_userpic = $*show_entrypage_userpic; # show userpic on reply page?

  $show_userpic = (defined $e.userpic and
                                     (
                                      (($p.view == "recent") and $show_recent_userpic ) or
                                      (($p.view == "friends") and $show_friends_userpic ) or
                                      (($p.view == "day") and $show_day_userpic ) or
                                      (($p.view == "entry") and $show_entry_userpic ) or
                                      (($p.view == "reply") and $show_reply_userpic )
                                     )
                  );

  $have_meta = (( size($e.metadata) > 0) or ((size($e.tags) > 0) and $*tags_aware));

  var string friends_background = ($use_friends_colors) ? " background-color: $bgcolor; border: 1px solid $fgcolor;" : "";

  ### Variable for linkbar.

  var string linkbar_side = $icon_side;

  ### Variable for scrollbar.

  var string scrolling = $show_hscroll ? "style='table-layout: fixed;'" : "";

  ### Print the anchor for the page summary.
  print $id;
  
  ### Print the entry header.
  print_entry_header($entry_header);

  ### Start the table holding the rest of the entries.
  """
  <table cellspacing="0" cellpadding="0" width="100%">
    <tr>
      <td width="1" class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
      <td class="entryHolderBg" width="100%">
        <table cellspacing="0" cellpadding="0" width="100%">
          <tr>
  """;

  ## Build the userpic and username if they exist/should be shown.
  if ($show_poster or $show_userpic) {

        # Start inside userpic section.
        if ($icon_position == "inside") {

                if ($show_border) {
                        $iconborder = " border: thin solid $*entry_fgcolor;";  

                }

                $icon_data = $icon_data + """<div style="text-align: center; padding: 2px; float: $icon_side; margin-$padding_pos: 4px; margin-bottom: 4px;$iconborder">""";

                if ($show_userpic) {

                        if ($show_poster and $show_userpic) {
                                $icon_data = $icon_data + """<div style="padding: 3px;$friends_background"><a href="$*SITEROOT/allpics.bml?user=$e.poster.username"><img border="0" src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name" /></a></div>""";
                        } else {
                                $icon_data = $icon_data + """<div style="padding: 3px;"><img border="0" src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="" /></div>""";
                        }
                }

                if ($show_poster) {
                        $icon_data = $icon_data + """<div class="ljuser">$e.journal""";

                        if ($e.journal.username != $e.poster.username) {
                                $icon_data = $icon_data + "<br />$e.poster";
                        }
                        $icon_data = $icon_data + """</div>""";
                }
                $icon_data = $icon_data + """</div>""";

        } # End userpic inside section.

        else {

        # Start outside userpic section.
        $icon_data = $icon_data + """
        <td valign="top" style="padding-$padding_pos: 8px;">
          <table cellspacing="0" cellpadding="0" align="center">""";

                if ($show_userpic) {
                        $icon_data = $icon_data + """<tr>""";

                        if ($show_poster and $show_userpic) { 
                                $icon_data = $icon_data + """<td><div style="padding-top: 3px; padding-left: 3px; padding-right: 3px; padding-bottom: 3px;$friends_background;" align="center"><a href="$*SITEROOT/allpics.bml?user=$e.poster.username"><img border="0" src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name" /></a></div></td>""";
                        } else {
                                $icon_data = $icon_data + """<td align="center" class="userpic"><img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="" /></td>""";
                        }
                                $icon_data = $icon_data + """</tr>""";
                }

                if ($show_poster) {
                        $icon_data = $icon_data + """<tr><td align="center" class="ljuser">$e.journal""";

                        if ($e.journal.username!=$e.poster.username) {
                                $icon_data = $icon_data + """<div align="center" class="ljuser">$e.poster</div>""";
                        }
                        $icon_data = $icon_data + """</td></tr>""";
                }
                $icon_data = $icon_data + """
                </table>
                </td>""";
        }
            # End userpic outside section.
  }

  ## End userpic and username section.   

  ## Print the userpic/username section if outside and left.
  if ($icon_position == "outside" and $icon_side == "left") {
        print $icon_data;
  }

  ### Prints linkbar now if outside right.
  if ($linkbar_position == "side" and $linkbar_side == "left") {
        """<td valign="top" style="padding-right: 8px;">"""; $e->lay_print_linkbar(); """</td>""";
  }

  ## Start the entry text area.
  """<td width="100%" valign="top">""";
    """
    <table cellspacing="0" cellpadding="0" width="100%">
      <tr>
        <td width="100%">
          <table cellspacing="0" cellpadding="0" width="100%"$scrolling>
            <tr>
              <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
              <td class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
              <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
            </tr><tr>
              <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
              <td class="entry">
    """;

  # Print the subject.

  var string subject ="";
  var string nosubject = $use_nosubject ? $*text_nosubject : "";
  $subject = $e.subject!="" ? $e.subject : $nosubject;

 if ($subject !="") {
		"""<div class="entryHeader">""";
		if ($p.view != "entry") { """<a href="$e.permalink_url">$subject</a>"""; } else { print $subject; }
		"""</div>
              <div class="entryDash"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></div>
            </td>
            <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
          </tr>
          <tr>
            <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
            <td class="entry">""";
 }

  # Add <div> around entry text and metadata to implement scrollbars.

  if ($show_hscroll) {
        """<div style="width: 100%; overflow: auto;">""";
  } else {
        """<div>""";
  }

  # Print the userpic/username section if inside.
  if ($icon_position == "inside") {
        print $icon_data;   
  }

  # Print the metadata section if it's at the top.
  if ($have_meta) {
        if($meta_position == "top") {
                $e->print_metadata();
                print "<div><br /></div>";
        }
  }

  # Print the entry text.
  $e->print_text();

  # Print the metadata section if it's at the bottom.
  if ($have_meta) {
        if($meta_position == "bottom") {
                if ($meta_wrap) {
                        print """<div style="clear: both;"><br /></div>""";  
                } else {
                        print "<div><br /></div>";
                }
                $e->print_metadata();
        }
  }

  # Close <div> around entry text and metadata.
  """</div>""";
  
  ## End of the entry text area
  print_content_bottom();

  ## Print the comments links and the Quick Reply container.
  """
  <table width="100%" cellpadding="0" cellspacing="0">
    <tr>
      <td width="50%" align="left" valign="center"><div class="entryComments">"""; $e.comments->print(); """</div></td>
  """;

  ### Var for permalink. If we have a linkbar, set the alignment to center, otherwise set it to right.

  var string permalink_align;

  if ($linkbar_position == "bottom") {
        $permalink_align = "center";
  } else {
        $permalink_align = "right";
  }

  ## Print a permanent link to the entry if the user wants to.

  if ($show_permalink) {
  """
        <td align="$permalink_align" valign="center">
          <div class="entryComments"><span style="white-space:nowrap;"><b>(&nbsp;<a href="$e.permalink_url" class="commentLinks">$*text_permalink</a>&nbsp;)<b></span></div>
        </td>
  """;
  }

  ### Print the linkbar if bottom position.
  if ($linkbar_position == "bottom") {
        """<td width="50%" align="right" valign="center"><div class="entryComments">"""; $e->lay_print_linkbar(); """</div></td>""";
  }

 ### Close the comments area.

      """</tr>
    </table>
    """;

  ### Quick Reply container.

  $p->print_reply_container({"target" => "topcomment"});

  ### Prints linkbar now if outside right.
  if ($linkbar_position == "side" and $linkbar_side == "right") {
        """<td valign="top" style="padding-left: 8px;">"""; $e->lay_print_linkbar(); """</td>""";
  }

  ### Prints icon now if outside right.
  if ($icon_position == "outside" and $icon_side == "right") {
        print $icon_data;
  }

  ### End the entry component and put a spacer after it so that entry components are separated.

  """
    </tr>
  </table>""";

  ### Round Layout ###
  ### Replace the following code with the one from the Round Entries tutorial. ###

  var int cs;
  $cs = 5;
  if (($linkbar_position == "bottom") or ($icon_position == "inside")) { $cs = 4; }

                        """</td>
                        <td width="1" class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
                    </tr><tr>
                        <td width="1" colspan="$cs" class="dkLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
                    </tr>
                </table>""";

  """ <div><img src="$*PALIMGROOT/component/clear.gif" width="3" height="3" alt="" /></div> """;

  ### Round Layout ###
  ### End of the replacement. ###

}


(Post a new comment)


[info]bexatious
2008-03-07 10:42 pm UTC (link)
Thank you so much! I am going to futz about with it and integrate the other codes from here that I like using. And then probably come back and beg for help because I've gone wrong.

But this is much appreciated!

(Reply to this) (Thread)


[info]uniquewonders
2008-03-07 10:52 pm UTC (link)
Icon love!

No problem. It'd be very helpful to know how easy/difficult it is to integrate other tutorials into this one. It will help me fine-tune the code and/or the instructions.

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]bexatious, 2008-03-07 11:35 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-07 11:45 pm UTC (Expand)
(no subject) - [info]bexatious, 2008-03-08 01:31 am UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-08 02:05 am UTC (Expand)
(no subject) - [info]bexatious, 2008-03-08 02:29 am UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-08 02:28 am UTC (Expand)

(Deleted post)
(no subject) - [info]uniquewonders, 2008-03-08 02:34 am UTC (Expand)
(no subject) - [info]bexatious, 2008-03-08 02:41 am UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-08 02:52 am UTC (Expand)
(no subject) - [info]bexatious, 2008-03-08 03:04 am UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-08 03:11 am UTC (Expand)
(no subject) - [info]bexatious, 2008-03-08 03:23 am UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-08 03:34 am UTC (Expand)
(no subject) - [info]bexatious, 2008-03-08 03:52 am UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-08 11:24 am UTC (Expand)
(no subject) - [info]bexatious, 2008-03-09 08:03 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-09 10:33 pm UTC (Expand)
Q: CTE5 and Metadata in a Box
[info]elfwench
2008-03-07 11:50 pm UTC (link)
Thanks! Before I futz around with this, though, what of Metadata in a box, I know it goes in Metadata Container options, but I'm not sure what to put where in there, how much of that tutorial applies?

(Reply to this) (Thread)

Re: Q: CTE5 and Metadata in a Box
[info]uniquewonders
2008-03-08 12:08 am UTC (link)
Nothing has changed about this so the instructions are the same (and no, it doesn't go into Metadata Container options).

You need to:
1. Add the code specified in the tutorial exactly where Mike tells you do do it.
2. Add the green part to $currents = $currents + $currents_open; as indicated in the tutorial.
3. Add the green part to $currents = $currents + $currents_close; as indicated in the tutorial.

Edited at 2008-03-08 12:09 am UTC

(Reply to this) (Parent)(Thread)(Expand)

Re: Q: CTE5 and Metadata in a Box - [info]elfwench, 2008-03-08 01:12 am UTC (Expand)
Re: Q: CTE5 and Metadata in a Box - [info]uniquewonders, 2008-03-08 01:26 am UTC (Expand)

[info]hollywoodism
2008-03-08 12:52 am UTC (link)
ILY BB :D I'm going to go fiddle even though I've beta tested to see what's been changed. Not a lot though, right? *glomps*

By the way, reading over the code, how do you set the max comments? I've noticed the maximum comments thing in the comments section of the code, but I have no idea how to set it. :P

Edited at 2008-03-08 12:53 am UTC

(Reply to this) (Thread)


[info]uniquewonders
2008-03-08 01:03 am UTC (link)
*thud* :) Nope, not a lot. Stuff with friends colors, I think.

Do you mean changing what it says? Because the text will be automatically displayed once you've reached the maximum number of comments (5,000 I believe).

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]hollywoodism, 2008-03-08 01:09 am UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-08 01:34 am UTC (Expand)
(no subject) - [info]hollywoodism, 2008-03-08 01:42 am UTC (Expand)
(no subject) - [info]uniquewonders, 2008-03-08 02:07 am UTC (Expand)
I promise; one day I will stop asking questions ;)
[info]bellemelange
2008-03-23 03:59 am UTC (link)
So it's possible to delinkify location when using this nifty tut, but can you also delinkify custom groups?

And is it possible to make the metas without the line break so that it'll be one line?

Edited at 2008-03-23 04:42 am UTC

(Reply to this) (Thread)

Re: I promise; one day I will stop asking questions ;)
[info]uniquewonders
2008-03-23 11:14 am UTC (link)
Questions are good. Questions make us think of stuff we wouldn't have thought of. :)

#1 Sure!

In the configuration section, add:

### GROUPS OPTIONS ###

# Set this to true to delinkify groups.
var bool vanilla_groups = true;

Then below:

# Delinkify location if user said so.
if (($k=="location") and $vanilla_location) {
$val = striphtml($val);
}

Add:
# Delinkify groups.
if (($k=="groups") and $vanilla_groups) {
$val = striphtml($val);
}

I'll update the tutorial to include this. The tutorial has been updated!

#2
Change:

var string meta_val_close = """
""";

Into:

var string meta_val_close = "";

I guess.

Edited at 2008-03-23 11:19 am UTC

(Reply to this) (Parent)(Thread)(Expand)

Re: I promise; one day I will stop asking questions ;) - [info]bellemelange, 2008-03-24 02:58 am UTC (Expand)

[info]ainabarad
2008-05-01 02:15 pm UTC (link)
Is there an easy way to have an image and text for the metadata labels?

(Reply to this) (Thread)


[info]uniquewonders
2008-05-01 04:54 pm UTC (link)
Sure! Before or after the image?

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]ainabarad, 2008-05-01 05:12 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-05-01 05:23 pm UTC (Expand)
(no subject) - [info]ainabarad, 2008-05-01 05:37 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-05-01 05:51 pm UTC (Expand)

[info]ainabarad
2008-05-14 01:55 am UTC (link)
Sorry to bother you, but... Is there a way to add something like $.entry.comments.count to get the comment count before where it says "Comments" with this tutorial? I'm making myself a square component layout and having trouble figuring out how to add the comment count to that. *hugs*

Edit: Just in case, my layer is #11569073.

Edited at 2008-05-14 02:26 am UTC

(Reply to this) (Thread)


[info]uniquewonders
2008-05-14 06:54 am UTC (link)
You're not using an image, are you?

Because set text_read_comments = "1 comment // # comments"; should give you the comment count. Have you modified it?

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]ainabarad, 2008-05-14 02:35 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-05-14 03:04 pm UTC (Expand)
(no subject) - [info]ainabarad, 2008-05-14 03:46 pm UTC (Expand)
(no subject) - [info]london_fan, 2008-09-30 05:43 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-09-30 07:37 pm UTC (Expand)
(no subject) - [info]london_fan, 2008-09-30 08:14 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-09-30 08:17 pm UTC (Expand)
(no subject) - [info]london_fan, 2008-09-30 08:21 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-09-30 08:22 pm UTC (Expand)
(no subject) - [info]london_fan, 2008-09-30 08:18 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-09-30 07:51 pm UTC (Expand)
(no subject) - [info]london_fan, 2008-09-30 08:25 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-09-30 08:30 pm UTC (Expand)

[info]nefernat
2008-06-22 08:02 am UTC (link)
Hiya - I've successfully changed my older coding to this and today, I notice that on some entries the old 'tell a friend' bit is back. With the previous version of Customizing the Entries I'd managed to not have that show up again, but I've forgotten what that was.

Any help on removing that bit from this? Just deleting the bit from the coding
("tell_friend" => "",) just results in the text showing up...

Thanks so much!

(Reply to this) (Thread)


[info]uniquewonders
2008-06-22 08:14 am UTC (link)
You have to have set text_tell_friend = "Tell a Friend"; blank too. I'm going to edit the code to make this much clearer.

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]nefernat, 2008-06-22 08:27 am UTC (Expand)
(no subject) - [info]uniquewonders, 2008-06-22 08:29 am UTC (Expand)

[info]countdrunkula
2008-07-22 08:29 pm UTC (link)
Thank you!!

(Reply to this)

Switching Date/Time and Subject
[info]uniquewonders
2008-09-03 12:18 am UTC (link)
Turn:
  # Add date and time to the entry header.
  $entry_header = $entry_header + $e.time->time_format();
  $entry_header = $entry_header + " ";
  $entry_header = $entry_header + ($e.new_day ? "<b>" : "");
  $entry_header = $entry_header + $e.time->date_format("long");
  $entry_header = $entry_header + ($e.new_day ? "</b>" : "");
into:

  # Print the subject.

  var string subject = "";
  var string nosubject = $use_nosubject ? $*text_nosubject : "";
  $subject = $e.subject!="" ? $e.subject : $nosubject;

 if ($subject !="") { $entry_header = $entry_header + $subject; }

Then turn:
  # Print the subject.

  var string subject ="";
  var string nosubject = $use_nosubject ? $*text_nosubject : "";
  $subject = $e.subject!="" ? $e.subject : $nosubject;

 if ($subject !="") {
                """<div class="entryHeader">$subject</div>
              <div class="entryDash"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></div>
            </td>
            <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
          </tr>
          <tr>
            <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
            <td class="entry">""";
 }
into:

  var string timestamp = $e.time->time_format()+ " " + ($e.new_day ? "<b>" : "") + $e.time->date_format("long") + ($e.new_day ? "</b>" : "");

                """<div class="entryHeader">$timestamp</div>
              <div class="entryDash"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></div>
            </td>
            <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
          </tr>
          <tr>
            <td width="1" class="medLine"><img src="$*PALIMGROOT/component/clear.gif" width="1" height="1" alt="" /></td>
            <td class="entry">""";

(Reply to this)


[info]toboe_lonewolf
2008-10-05 03:11 am UTC (link)
Does this entire tutorial have to be used, or can we just pick one/two functions if that's all we want to change?

For instance, I'd like to change the images in the linkbar and put the metadata in a box. So can I just copy/paste/edit the relevant sections, and leave out the
function CommentInfo::print_readlink()
, etc. stuff?

I've already done some customization with LJ's GUI and used some custom CSS to modify my tagslist, and have no layers/themes other than my user theme that LJ creates with the auto-customization. I tried making a new theme as described in the beginner's guide and c/p'ing a tutorial (not this one; I think it was the custom comment/reply one), but it wiped out all of my previously chosen colors, so I deleted it.

Edited at 2008-10-05 03:12 am UTC

(Reply to this) (Thread)


[info]uniquewonders
2008-10-05 08:28 am UTC (link)
You can leave out the CommentInfo functions if you don't want to replace 'read comments' and 'post comment' with icons. You definitely need function Entry::print_metadata() and all of function print_entry to put your metadata in a box.

Were these custom colors or a pre-made color theme?

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]toboe_lonewolf, 2008-10-05 03:13 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-10-05 04:35 pm UTC (Expand)
(no subject) - [info]toboe_lonewolf, 2008-10-05 05:28 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-10-05 06:07 pm UTC (Expand)
(no subject) - [info]toboe_lonewolf, 2008-10-05 06:37 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2008-10-05 07:23 pm UTC (Expand)

[info]leeweilin
2008-11-19 03:36 pm UTC (link)
thank you so much for this tutorial :D

and i'd really appreciate it if you could help answer this question that's been bugging me for a while now - can this be edited to work on non-component layouts? (such as flexible squares, smooth sailing etc)

function CommentInfo::print_postlink()
{
##### START CONFIGURATION. THIS IS WHERE YOU SET YOUR OPTIONS. #####

### Enter your image URL if you want to replace the text link by an image link.

var string img_url = "";

### Enter the width and height of your image URL if you want to replace the text link by an image link.

var int img_width = 0;

var int img_height = 0;

##### END CONFIGURATION. #####

thank you in advance ♥ and sorry if this was answered elsewhere :)

(Reply to this) (Thread)


[info]uniquewonders
2008-11-19 04:30 pm UTC (link)
As this community is only for help with Component you may want to ask communities for the layouts you mention (see our profile for a list of active S2 help communities) if they have a similar tutorial or how it is to possible to achieve what this tutorial or part of this tutorial does.

Edited at 2008-11-19 04:31 pm UTC

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]leeweilin, 2008-11-19 04:38 pm UTC (Expand)

[info]moobabe986
2008-11-23 04:13 pm UTC (link)
Is there any way to change the permalink to an image? I think I've seen it done but I can't figure it out.

(Reply to this) (Thread)

Turning the permalink into an image
[info]uniquewonders
2008-11-23 05:46 pm UTC (link)
Sure. In function print_entry, turn this part of the code:
<div class="entryComments"><span style="white-space:nowrap;"><b>(&nbsp;<a href="$e.permalink_url" class="commentLinks">$*text_permalink</a>&nbsp;)<b></span></div>
into
<div class="entryComments"><span style="white-space:nowrap;">(&nbsp;<a href="$e.permalink_url" class="commentLinks"><img src="http://permalinkiconurl" alt="$*text_permalink" title="$*text_permalink" border="0" /></a>&nbsp;)</span></div>


If you want to get rid of the parentheses, remove:
(&nbsp;

and:
&nbsp;)

Edited at 2008-11-23 05:51 pm UTC

(Reply to this) (Parent)(Thread)(Expand)

Re: Turning the permalink into an image - [info]moobabe986, 2008-11-23 06:02 pm UTC (Expand)
Re: Turning the permalink into an image - [info]uniquewonders, 2008-11-23 06:12 pm UTC (Expand)
Re: Turning the permalink into an image - [info]moobabe986, 2008-11-23 06:35 pm UTC (Expand)
Re: Turning the permalink into an image - [info]uniquewonders, 2008-11-23 08:16 pm UTC (Expand)
Re: Turning the permalink into an image - [info]london_fan, 2008-11-30 06:02 pm UTC (Expand)
Re: Turning the permalink into an image - [info]uniquewonders, 2008-12-01 05:14 am UTC (Expand)
Re: Turning the permalink into an image - [info]london_fan, 2008-12-01 10:14 pm UTC (Expand)
Re: Turning the permalink into an image - [info]uniquewonders, 2008-12-02 09:24 pm UTC (Expand)
Re: Turning the permalink into an image - [info]london_fan, 2008-12-02 10:03 pm UTC (Expand)
id=6546974
[info]eyja
2008-11-28 02:08 am UTC (link)
Ok, I'm not sure what I've done wrong. When I try to compile, I get this:



Compile error: line 1391, column 1: Didn't find closing brace in statement block
S2::NodeStmtBlock, S2/NodeStmtBlock.pm, 51
S2::NodeFunction, S2/NodeFunction.pm, 104
S2::Layer, S2/Layer.pm, 58
S2::Compiler, S2/Compiler.pm, 27


Context

1387:
1388: }
1389:
1390: function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text)
1391: {
1392:
1393:
1394: var bool show_public_icon = false;
1395:



I'm not how to fix it 'cause everything looks right around the text function print_entry -- I don't think I deleted something I wasn't supposed to. Help?

Edited at 2008-11-28 02:09 am UTC

(Reply to this) (Thread)

Re: id=6546974
[info]uniquewonders
2008-11-28 05:26 am UTC (link)
As explained in our beginners' guide, this error message indicates that a } is missing or that you have an extra one. Make sure you have selected the whole tutorial and try again. If it still doesn't work, create a new layer and paste the tutorial. If it compiles fine, it'll mean that the problem comes from other parts of your layer.

(Reply to this) (Parent)(Thread)(Expand)

Re: id=6546974 - [info]eyja, 2008-12-13 07:40 pm UTC (Expand)

(Deleted post)

[info]uniquewonders
2009-03-02 06:19 pm UTC (link)
This tutorial is meant to let you change the place of some elements of entries (mainly userpic, linkbar, metadata) as well as add options which have been frequently asked for (an icon for public entries, the possibility to reorder the metadata, to hide some links in the linkbar, etc.). You can see in the preview linked in the entry how this differs from default entries. Note that some options are not activated by default so some changes are not visible on the preview.

Additionally, userpics are not shown on recent pages by default in Component. So, according to your definition of the word, they're "private" by default with this layout.

Edited at 2009-03-02 06:23 pm UTC

(Reply to this) (Parent)(Thread)

(Deleted post)
(no subject) - [info]uniquewonders, 2009-03-05 05:40 am UTC (Expand)

[info]gflady2
2009-06-10 12:32 am UTC (link)
I am having issues with this right here... see below, my protected and my private icons are NOT showing up, I guess because Kunzite1 is no longer on live journal? but I cannot find where to change it too. I tried the IMGDIR one to this...http://l-stat.livejournal.com/img/icon_protected.gif but that doesnt work either. :( its been awhile since I updated, so Im not sure where else to look to replace these images so they show up.

var string{} sec_urls = { # security images
"public" => "http://pics.livejournal.com/kunzite1/pic/000f5p4c",
"protected" => "$*IMGDIR/icon_protected.gif",
"private" => "$*IMGDIR/icon_private.gif",
};

var string{} sec_alts = { # security captions
"public" => "[public post]",
"protected" => "$*text_icon_alt_protected",
"private" => "$*text_icon_alt_private",

(Reply to this) (Thread)


[info]uniquewonders
2009-06-10 04:44 am UTC (link)
The only icon which is kunzite1's is the public one and it's showing up on your journal (kunzite1's account is permanent and hasn't been deleted). The other icons are from LiveJournal servers. If you want to customize them, replace $*IMGDIR/icon_protected.gif and $*IMGDIR/icon_private.gif with custom URLs. Is this what's not working for you? Because it's working for me.

(Reply to this) (Parent)(Thread)(Expand)

(no subject) - [info]gflady2, 2009-06-10 12:34 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2009-06-10 12:46 pm UTC (Expand)
(no subject) - [info]gflady2, 2009-06-10 12:52 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2009-06-10 02:04 pm UTC (Expand)
(no subject) - [info]gflady2, 2009-06-10 09:14 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2009-06-10 09:35 pm UTC (Expand)
(no subject) - [info]gflady2, 2009-06-10 09:41 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2009-06-10 09:47 pm UTC (Expand)
(no subject) - [info]gflady2, 2009-06-10 09:50 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2009-06-10 10:12 pm UTC (Expand)
(no subject) - [info]gflady2, 2009-06-10 10:15 pm UTC (Expand)
(no subject) - [info]uniquewonders, 2009-06-11 04:45 am UTC (Expand)
(no subject) - [info]gflady2, 2009-06-11 11:42 pm UTC (Expand)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…