<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.insanejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>urn:lj:insanejournal.com:atom1:scotchbonnet</id>
  <title>ScotchBonnet</title>
  <subtitle>Scotchsour's Place for Layouts, Codes, Icons, Mood Themes...</subtitle>
  <author>
    <name>scotchbonnet</name>
  </author>
  <link rel="alternate" type="text/html" href="http://asylums.insanejournal.com/scotchbonnet/"/>
  <link rel="self" type="text/xml" href="http://asylums.insanejournal.com/scotchbonnet/data/atom"/>
  <updated>2009-05-30T22:27:16Z</updated>
  <link rel="service.feed" type="application/x.atom+xml" href="http://asylums.insanejournal.com/scotchbonnet/data/atom" title="ScotchBonnet"/>
  <entry>
    <id>urn:lj:insanejournal.com:atom1:scotchbonnet:7619</id>
    <link rel="alternate" type="text/html" href="http://asylums.insanejournal.com/scotchbonnet/7619.html"/>
    <title>For Paid/Permanant Users using a Theme Layer</title>
    <published>2008-02-02T02:01:42Z</published>
    <updated>2008-02-02T18:52:08Z</updated>
    <category term="journals: code"/>
    <content type="html">This is for Blue Shoes &lt;strong&gt;(Traquility II)&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Create Theme Layer &lt;br /&gt;Tutorial by &lt;span class='ljuser' lj:user='carriep63' style='white-space: nowrap;'&gt;&lt;a href='http://carriep63.insanejournal.com/profile'&gt;&lt;img src='http://www.insanejournal.com/img/userinfo.gif' alt='[info]' width='17' height='17' style='vertical-align: bottom; border: 0;' /&gt;&lt;/a&gt;&lt;a href='http://carriep63.insanejournal.com/'&gt;&lt;b&gt;carriep63&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;:&lt;br&gt;&lt;a href="http://community.livejournal.com/s2_bloggish/4514.html"&gt;Creating a theme layer&lt;/a&gt; (using Livejournal new customize journal area)&lt;br /&gt;Tutorials by &lt;span class='ljuser' lj:user='scotchosur' style='white-space: nowrap;'&gt;&lt;a href='http://www.insanejournal.com/userinfo.bml?user=scotchosur'&gt;&lt;img src='http://www.insanejournal.com/img/userinfo.gif' alt='[info]' width='17' height='17' style='vertical-align: bottom; border: 0;' /&gt;&lt;/a&gt;&lt;a href='http://www.insanejournal.com/userinfo.bml?user=scotchosur'&gt;&lt;b&gt;scotchosur&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;:&lt;br&gt;&lt;a href="http://asylums.insanejournal.com/scotchbonnet/7330.html"&gt;Creating a Theme Layer&lt;/a&gt; (for InsaneJournal users)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note: &lt;/strong&gt; This is here for my benefit and bad memory but I didn't add everything under the sun for the blue shoes layer but if you want more extras, try these:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Add these into theme layer&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Link to: &lt;a href="http://community.livejournal.com/s2layers/68607.html"&gt;Original Source&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Adding Usericons in the Recent Entries view&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Taken from: &lt;a href="http://www.livejournal.com/customize/advanced/layersource.bml?id=4472743"&gt;Original Source&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Adding Additional Links&lt;/strong&gt;&lt;br /&gt;&lt;table border="1" bordercolor="" width="400" bgcolor="" cellspacing="10"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;textarea rows="15" cols="70" style="font-family: Tahoma; font-size:11px;"&gt;
# -------------------------------
# prints the LJ specific links (recent, friends, etc)
# -------------------------------
function print_lj_links ( Page p )
{
    var string links;
$links = $links + ($p.view == "recent" ? "&amp;lt;li class=\"active\"&amp;gt;$*text_view_recent&amp;lt;/li&amp;gt;" : "&amp;lt;li&amp;gt;&amp;lt;a href=\"$p.base_url/\" title=\"$*text_view_recent\"&amp;gt;$*text_view_recent&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;");
    if ( $p.journal_type == "C" ) {

$links = $links + ($p.view == "friends" ? "&amp;lt;li class=\"active\"&amp;gt;$*text_view_friends_comm&amp;lt;/li&amp;gt;" : "&amp;lt;li&amp;gt;&amp;lt;a href=\"$p.base_url/friends\" title=\"$*text_view_friends_comm\"&amp;gt;$*text_view_friends_comm&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;");
    } else {

$links = $links + ($p.view == "friends" ? "&amp;lt;li class=\"active\"&amp;gt;$*text_view_friends&amp;lt;/li&amp;gt;" : "&amp;lt;li&amp;gt;&amp;lt;a href=\"$p.base_url/friends\" title=\"$*text_view_friends\"&amp;gt;$*text_view_friends&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;");
    }

$links = $links + ($p.view == "archive" ? "&amp;lt;li class=\"active\"&amp;gt;$*text_view_archive&amp;lt;/li&amp;gt;" : "&amp;lt;li&amp;gt;&amp;lt;a href=\"$p.base_url/calendar\" title=\"$*text_view_archive\"&amp;gt;$*text_view_archive&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;");

$links = $links + "&amp;lt;li&amp;gt;&amp;lt;a href=\"$p.view_url{"userinfo"}\" title=\"$*text_view_userinfo\"&amp;gt;$*text_view_userinfo&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;";

$links = $links + ($p.journal.website_url != "" ? "&amp;lt;li&amp;gt;&amp;lt;a href=\"$p.journal.website_url\" title=\"" + $p.journal.website_name-&amp;gt;lower() + "\"&amp;gt;" + $p.journal.website_name-&amp;gt;lower() + "&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;" : "");

    print "&amp;lt;ul id=\"lj-links\"&amp;gt;";
    print safe $links;
    print "&amp;lt;/ul&amp;gt;";
}&lt;/textarea&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Look inside and find this line of code to add links to your navigation menu: &lt;br /&gt;&lt;b&gt;&lt;em&gt;&lt;pre&gt;&lt;code&gt;$links = $links + "&amp;lt;li&amp;gt;&amp;lt;a href=\"urladdhere\"&amp;gt;nameoflink&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;";&lt;/code&gt;&lt;/pre&gt;&lt;/em&gt;&lt;/b&gt;&lt;br /&gt;*replace &lt;b&gt;"urladdhere"&lt;/b&gt; with your own your url and &lt;b&gt;"nameoflink"&lt;/b&gt; with the link's name. &lt;br /&gt;&lt;br /&gt;To add a new link, simply repeat it.</content>
  </entry>
  <entry>
    <id>urn:lj:insanejournal.com:atom1:scotchbonnet:5650</id>
    <link rel="alternate" type="text/html" href="http://asylums.insanejournal.com/scotchbonnet/5650.html"/>
    <title>(Paid) Randomized User Pictures (SS/RR)</title>
    <published>2007-12-23T02:25:33Z</published>
    <updated>2007-12-23T02:34:21Z</updated>
    <category term="journals: code"/>
    <content type="html">This is for my own purpose but it might be useful to somebody else.&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This tutorial explains how to randomize user picture which displays in the profile box in the sidebar. The code to do this will override the Page::lay_print_sidebar_profile(). You will need to place the coding in a theme layer. If you already have a theme layer for the Smooth Sailing style, you can edit it to include this code. Otherwise, you need to create one as explained in the Theme Layer tutorial.&lt;br /&gt;&lt;br /&gt;You will need to copy the following code into your theme layer, making sure to include everything:&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #95876A; padding:10px 0 0 30px;"&gt;function Page::lay_print_sidebar_profile() {&lt;br /&gt;&lt;br /&gt;   var string[] pic;&lt;br /&gt;&lt;br /&gt;   $pic[size($pic)]="&lt;a href="http://www.insanejournal.com/userpic/######/"&gt;http://www.insanejournal.com/userpic/######/&lt;/a&gt;######";&lt;br /&gt;   $pic[size($pic)]="&lt;a href="http://www.insanejournal.com/userpic/######/"&gt;http://www.insanejournal.com/userpic/######/&lt;/a&gt;######";&lt;br /&gt;   $pic[size($pic)]="&lt;a href="http://www.insanejournal.com/userpic/######/"&gt;http://www.insanejournal.com/userpic/######/&lt;/a&gt;######";&lt;br /&gt;   $pic[size($pic)]="&lt;a href="http://www.insanejournal.com/userpic/######/"&gt;http://www.insanejournal.com/userpic/######/&lt;/a&gt;######";&lt;br /&gt;   $pic[size($pic)]="&lt;a href="http://www.insanejournal.com/userpic/######/"&gt;http://www.insanejournal.com/userpic/######/&lt;/a&gt;######";&lt;br /&gt;   $pic[size($pic)]="&lt;a href="http://www.insanejournal.com/userpic/######/"&gt;http://www.insanejournal.com/userpic/######/&lt;/a&gt;######";&lt;br /&gt;&lt;br /&gt;   var int randpic;&lt;br /&gt;   $randpic = rand(0, ((size $pic) - 1));&lt;br /&gt;&lt;br /&gt;    $this-&amp;gt;lay_print_sidebox_top($*text_sidebox_profile_title);&lt;br /&gt;    """&lt;br /&gt;      &lt;div class="sideboxContent"&gt;&lt;br /&gt;        &lt;div&gt;&lt;a href="$*SITEROOT/allpics.bml?user=$.journal.username"&gt;&lt;img src="$pic[$randpic]" alt="" border="0" class="profile-userpic" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;        &lt;div&gt;&lt;span class="profile-label"&gt;$*text_sidebox_profile_userlabel&lt;/span&gt;&lt;span class="profile-content"&gt;$.journal&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;        &lt;div&gt;&lt;span class="profile-label"&gt;$*text_sidebox_profile_namelabel&lt;/span&gt;&lt;span class="profile-content"&gt;$.journal.name&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;        """; &lt;br /&gt;        if ($*text_sidebox_profile_info!="") { """&lt;div&gt;"""; print $*text_sidebox_profile_info; """&lt;/div&gt;"""; }&lt;br /&gt;        """&lt;br /&gt;       &lt;/div&gt; &lt;br /&gt;    """;&lt;br /&gt;    $this-&amp;gt;lay_print_sidebox_bottom();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In the above code, you need to replace &lt;a href="http://www.insanejournal.com/userpic/######/"&gt;http://www.insanejournal.com/userpic/######/&lt;/a&gt;###### (for each) with the user pictures that you'd like to be randomized. Please notice that, though six user pictures are used here, there is no maximum or minimum to the number of user pictures that you can use.&lt;br /&gt;&lt;br /&gt;Once you have finished adding the code above, you can save your theme layer by clicking on the "Save &amp; Compile" button at the top of the screen. Your changes will not take effect until you apply your theme layer by selecting it on the Customize Journal page.&lt;br /&gt;&lt;br /&gt;Originally posted: &lt;a href="http://community.livejournal.com/s2howto/46128.html"&gt;Here&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:insanejournal.com:atom1:scotchbonnet:573</id>
    <link rel="alternate" type="text/html" href="http://asylums.insanejournal.com/scotchbonnet/573.html"/>
    <title>For Paid/Permanant Users using a Theme Layer</title>
    <published>2007-12-06T01:29:19Z</published>
    <updated>2009-05-30T22:27:16Z</updated>
    <category term="journals: code"/>
    <content type="html">This is for &lt;strong&gt;(A Dear Diary Layout)&lt;/strong&gt; codes &lt;br /&gt;Layouts: [Baroque - Pink and Grey - Green and White]&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Create Theme Layer &lt;br /&gt;Tutorial by &lt;span class='ljuser' lj:user='carriep63' style='white-space: nowrap;'&gt;&lt;a href='http://carriep63.insanejournal.com/profile'&gt;&lt;img src='http://www.insanejournal.com/img/userinfo.gif' alt='[info]' width='17' height='17' style='vertical-align: bottom; border: 0;' /&gt;&lt;/a&gt;&lt;a href='http://carriep63.insanejournal.com/'&gt;&lt;b&gt;carriep63&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;:&lt;br&gt;&lt;a href="http://community.livejournal.com/s2_bloggish/4514.html"&gt;Creating a theme layer&lt;/a&gt; (using Livejournal new customize journal area)&lt;br /&gt;Tutorials by &lt;span class='ljuser' lj:user='scotchosur' style='white-space: nowrap;'&gt;&lt;a href='http://www.insanejournal.com/userinfo.bml?user=scotchosur'&gt;&lt;img src='http://www.insanejournal.com/img/userinfo.gif' alt='[info]' width='17' height='17' style='vertical-align: bottom; border: 0;' /&gt;&lt;/a&gt;&lt;a href='http://www.insanejournal.com/userinfo.bml?user=scotchosur'&gt;&lt;b&gt;scotchosur&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;:&lt;br&gt;&lt;a href="http://asylums.insanejournal.com/scotchbonnet/7330.html"&gt;Creating a Theme Layer&lt;/a&gt; (for InsaneJournal users)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note: &lt;/strong&gt;&lt;br /&gt;You will have also created a user layer automatically because of the css. In editing theme and user layer place on top instead:&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Under Theme&lt;/u&gt;&lt;br /&gt;Replace&lt;br /&gt;layerinfo "type" = "theme";&lt;br /&gt;layerinfo "name" = "";&lt;br /&gt;&lt;br /&gt;With This&lt;br /&gt;layerinfo "type" = "theme";&lt;br /&gt;layerinfo "name" = "Baroque";&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Under User&lt;/u&gt;&lt;br /&gt;Replace&lt;br /&gt;layerinfo "type" = "user";&lt;br /&gt;layerinfo "name" = "Auto-generated Customizations";&lt;br /&gt;&lt;br /&gt;With This&lt;br /&gt;layerinfo "type" = "user";&lt;br /&gt;layerinfo "name" = "Baroque";&lt;br /&gt;&lt;br /&gt;Believe me, this is a simple way if you redesign your journal a lot with custom layers.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Add these into theme layer&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Taken from: &lt;a href="http://community.livejournal.com/s2layers/67889.html"&gt;Original Source&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Mood Icon to Left of Metadata&lt;/strong&gt;&lt;br /&gt;&lt;table border="1" bordercolor="" width="400" bgcolor="" cellspacing="10"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;textarea rows="15" cols="70" style="font-family: Tahoma; font-size:11px;"&gt;
function Entry::lay_print_metadata() {
var string tags_header         = "Tags"; # text for tags header,    "Current Tags"
var string tags_joiner         = "";            # text for tags joiner,    ":"
var string tags_sep            = ", ";           # text for tags separator, ", "
var bool   show_edit_tags_link = false;          # set to true if you want edit tags link as tags header
var string currents_open       = """&amp;lt;div class="metadata"&amp;gt;"""; # html for opening of currents container
var string currents_close      = """&amp;lt;/div&amp;gt;"""; # 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
# if you need data specific to the meta to be in these strings you'll have to set those individually down further
# one example is provided with meta_label_open
var string meta_label_open     = """&amp;lt;strong&amp;gt;""";   # html for opening of metadata label
var string meta_label_close    = """&amp;lt;/strong&amp;gt;: """; # html for closing of metadata label
var string meta_val_open       = "";               # html for opening of metadata value
var string meta_val_close      = """&amp;lt;br /&amp;gt;""";     # html for closing of metadata value
var Link   edit_tags           = $this-&amp;gt;get_link("edit_tags"); # helper var to see if remote user can edit tags
if ((size $.metadata &amp;gt; 0) or ((size $.tags &amp;gt; 0) and ($*tags_aware))){
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
if(defined $.mood_icon) {
var Image i = $.mood_icon;
$currents = $currents + """&amp;lt;table border="0"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;img src="$i.url" _fcksavedurl="$i.url" width="$i.width" height="$i.height" alt="$.metadata{"mood"}" title="$.metadata{"mood"}" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;""";
}
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;
}
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""";
}
}
}
if ((size $.tags &amp;gt; 0) and $*tags_aware) {
var string k      = "tags"; # set key to "tags"
var int tcount = 0; # set counter for tags
if($edit_tags.url != "" and $show_edit_tags_link) { # if remote user can edit tags, let's give them a link
$tags_header = """&amp;lt;a href="$edit_tags.url" _fcksavedurl="$edit_tags.url"&amp;gt;$tags_header&amp;lt;/a&amp;gt;""";
}
# add text, open val container
$currents = $currents + """$meta_label_open$tags_header$tags_joiner$meta_label_close$meta_val_open""";
# build tag list
foreach var Tag t ($.tags) {
$currents = $currents + """&amp;lt;a rel="tag" href="$t.url" _fcksavedurl="$t.url"&amp;gt;$t.name&amp;lt;/a&amp;gt;""";
$tcount++;
# if we haven't hit the last tag, add a separator
if ($tcount != size $.tags) { $currents = $currents + $tags_sep; }
}
# close val container
$currents = $currents + $meta_val_close;
}
if(defined $.mood_icon) {
$currents = $currents + """&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;""";
}
# close currents container
$currents = $currents + $currents_close;
# print currents
println "$currents";
}
}
&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Taken from: &lt;a href="http://community.livejournal.com/s2layers/68607.html"&gt;Original Source&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Multi-Layer Tags&lt;/strong&gt;&lt;br /&gt;&lt;table border="1" bordercolor="" width="400" bgcolor="" cellspacing="10"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;textarea rows="15" cols="70" style="font-family: Tahoma; font-size:11px;"&gt;function Page::lay_print_custom_paraphernalia() {
    var string id      = "";
    var string header  = "";
    var string content = "";
    
    # tagslist

    #####   Config   #####

    # Specify your delimiter!  One char only -- extra chars get truncated.
    # Making the delimiter an empty string will result in an un-tiered list, 
    # which may be what you prefer, but this code is serious overkill for 
    # that purpose.
    var string delimiter = ":";

    # Specify the title of your tag box!
    var string tag_title = "Tags";

    ##### End Config #####

    var Page p = get_page();
    var string list = "";
    
    # mt:20050627
    # Replaced erroneous return code with if statement (otherwise
    # entire sidebar not printed at all if no visible tags!).
    if (size $this-&amp;gt;visible_tag_list() &amp;gt; 0) { 
        # mt:20050624
        # Can't use delimiter longer than one char, so truncate if necessary.
        if ($delimiter-&amp;gt;length() &amp;gt; 1) {
            $delimiter = $delimiter-&amp;gt;substr(0, 1);
        }

        var bool list_started = false;
        var string list_item = "";
        var string[] prev_tags = ["", ""];

        # mt:20050624: Start the list.
        $list = """&amp;lt;ul class="tagList"&amp;gt;"""; 
        
        foreach var TagDetail t ($this-&amp;gt;visible_tag_list()) {        
            var string[] tags;
             
            if ($t.name) {  
                # mt:20050624
                # Split tags into a 1- or 2-element array on delimiter. Oh god, my
                # kingdom for a function.  Adapted from lj-user rane500's explode 
                # function to only care about first instance of the delimiter.
                var int array_counter = 0;
                var string buffer = "";
                var bool found_delimiter = false;
                foreach var string char ($t.name) {
                    if (($found_delimiter == false) and ($char == $delimiter)) {
                        $found_delimiter = true;
                        $tags[$array_counter] = $buffer;
                        $array_counter = $array_counter + 1;
                        $buffer = "";
                    } else {
                        $buffer = $buffer + $char;
                    } 
                }  
                $tags[$array_counter] = $buffer;
                
                # mt:20050624: Now examine the tags array to determine how to display the tag.
                if (size $tags == 1) {
                    # mt:20050624: This tag has no subtag.
        
                    if ($list_started) {
                        # mt:20050624: Previous tag had a subtag, so must close its outstanding list. 
                        $list = $list + """&amp;lt;/ul&amp;gt;""";
                        $list_started = false;
                    }
                    if ($prev_tags[0] != "") {
                        # mt:20050624: This is not the very first tag in the list, so close off previous tag.
                        $list = $list + """&amp;lt;/li&amp;gt;""";
                    }
                    # mt:20050624: Now add the new tag.
                    $list = $list + """&amp;lt;li class="tagItem"&amp;gt;&amp;lt;a href="$t.url"&amp;gt;$tags[0]&amp;lt;/a&amp;gt;""";
                } else {   
                    # mt:20050624: This tag has a subtag.
        
                    $list_item = """&amp;lt;li class="tagItem"&amp;gt;&amp;lt;a href="$t.url"&amp;gt;$tags[1]&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;""";
                   
                    if (($tags[0] == $prev_tags[0]) and ($list_started)) {
                        # mt:20050624
                        # This tag fits under the previous tag's tier, and it is not the first item in that tier.
                        $list = $list + $list_item;
                    } elseif (($tags[0] == $prev_tags[0]) and ($list_started == false)) {
                        # mt:20050624
                        # This tag fits under the previous tag's tier, and it is the very first item in that tier.
                        $list = $list + """&amp;lt;ul class="tagList"&amp;gt;""" + $list_item;
                        $list_started = true;
                    } elseif (($tags[0] != $prev_tags[0]) and ($list_started)) {
                        # mt:20050624: This tag initializes a new tier and must also close off the previous tag's list.
                        # $list_started retains its true state.
                        $list = $list + """&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;li class="tagItem"&amp;gt;$tags[0]&amp;lt;ul class="tagList"&amp;gt;""" + $list_item;
                    } elseif (($tags[0] != $prev_tags[0]) and ($list_started == false)) {
                        # mt:20050624: This tag initializes a new tier but does not have to close off a list.
                        
                        if ($prev_tags[0] != "") {
                            # mt:20050624: This is not the very first tag in the list, so close off previous tag.
                            $list = $list + """&amp;lt;/li&amp;gt;""";
                        }
                        
                        # mt:20050624: Now add the new tag.
                        $list = $list + """&amp;lt;li class="tagItem"&amp;gt;$tags[0]&amp;lt;ul class="tagList"&amp;gt;""" + $list_item;
                        $list_started = true;
                    }
                }       
                $prev_tags = $tags;           
            }        
            # mt:20050623: Next tag in the list!
        } 
    
        # mt:20050624: Close any outstanding lists.
        if ($list_started) {
            $list = $list + """&amp;lt;/ul&amp;gt;""";
        }	   
    	$list = $list + """&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;""";
	   
        $list = """&amp;lt;div class="tagBox"&amp;gt;""" + $list + """&amp;lt;/div&amp;gt;""";
    }

    $header  = $tag_title;
    $id      = "tagslist";
    $content = $list;

    paraphernalia_box_open ($id, $header);
    print $content;
    paraphernalia_box_close($id, $header);
}

function Page::print_custom_head() {
  """
  &amp;lt;style type="text/css"&amp;gt;

  /* List Alignment */
  /* Styles to ensure that the tag list is correctly aligned beneath the sidebox title */
  li.tagBox {
    padding-left: 0;
    margin-left:  0;
    list-style:   none;
  }
  ul.tagList {
    padding-left: 0;
    margin-left:  0;
    list-style:   none;
  }
  li.tagItem {
    padding-left: 15px;
    list-style:   none;
  }
    
/* Vertical Scroll */
/* Need to shrink the list width to prevent horizontal scrollbar in Firefox. */
/* Note this won't prevent it if your tags are super long, it will only */
/* prevent it from displaying unnecessarily. For the pleasure of IE users */
/* you can also colour any resulting scrollbars as you desire. */
ul.tagList {
width: 70%;
}
.tagBox {
height: 200px;
overflow: auto;
scrollbar-arrow-color: #ffffff;
scrollbar-base-color: #930000;
scrollbar-face-color: #930000;
scrollbar-highlight-color: #cb7575;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: #930000;
}
  &amp;lt;/style&amp;gt;
  """;
}&lt;/textarea&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note: See all Tags on Sidebar:&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;The tags &lt;b&gt;verical scroll&lt;/b&gt;, just remove this out of &lt;b&gt;Multi-Layer Tags&lt;/b&gt; code:&lt;br /&gt;&lt;blockquote&gt;  /* Vertical Scroll */&lt;br /&gt;/* Need to shrink the list width to prevent horizontal scrollbar in Firefox. */&lt;br /&gt;/* Note this won't prevent it if your tags are super long, it will only */&lt;br /&gt;/* prevent it from displaying unnecessarily. For the pleasure of IE users */&lt;br /&gt;/* you can also colour any resulting scrollbars as you desire. */&lt;br /&gt;ul.tagList {&lt;br /&gt;width: 70%;&lt;br /&gt;}&lt;br /&gt;.tagBox {&lt;br /&gt;height: 200px;&lt;br /&gt;overflow: auto;&lt;br /&gt;scrollbar-arrow-color: #ffffff;&lt;br /&gt;scrollbar-base-color: #930000;&lt;br /&gt;scrollbar-face-color: #930000;&lt;br /&gt;scrollbar-highlight-color: #cb7575;&lt;br /&gt;scrollbar-darkshadow-color: #000000;&lt;br /&gt;scrollbar-track-color: #930000;&lt;br /&gt;} &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Extracted from &lt;span class='ljuser' lj:user='babyelefant' style='white-space: nowrap;'&gt;&lt;a href='http://babyelefant.insanejournal.com/profile'&gt;&lt;img src='http://www.insanejournal.com/img/userinfo.gif' alt='[info]' width='17' height='17' style='vertical-align: bottom; border: 0;' /&gt;&lt;/a&gt;&lt;a href='http://babyelefant.insanejournal.com/'&gt;&lt;b&gt;babyelefant&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;To add a &lt;b&gt;custom textbox&lt;/b&gt;, just add this into the &lt;b&gt;Multi-Layer Tags&lt;/b&gt; code:&lt;br /&gt;&lt;br /&gt;&lt;table border="1" bordercolor="" width="400" bgcolor="" cellspacing="10"&gt;
&lt;tr&gt;&lt;td&gt;&lt;textarea rows="2" cols="70" style="font-family: Tahoma; font-size:11px;"&gt;
paraphernalia_box_open("CustomText", "CustomText");
println "&amp;lt;div id=custom&amp;gt;Text in Baroque&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;";
paraphernalia_box_close("CustomText", "CustomText");&lt;/textarea&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;After this:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;Page::lay_print_custom_paraphernalia() {&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Before this:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;    var string id      = "";
    var string header  = "";
    var string content = "";&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Want to change the title of the textbox, simply replace &lt;b&gt;CustomText&lt;/b&gt; with the name you've chosen.&lt;br /&gt;&lt;br /&gt;Extracted from &lt;span class='ljuser' lj:user='babyelefant' style='white-space: nowrap;'&gt;&lt;a href='http://babyelefant.insanejournal.com/profile'&gt;&lt;img src='http://www.insanejournal.com/img/userinfo.gif' alt='[info]' width='17' height='17' style='vertical-align: bottom; border: 0;' /&gt;&lt;/a&gt;&lt;a href='http://babyelefant.insanejournal.com/'&gt;&lt;b&gt;babyelefant&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;To change the position on the sidebar such as tags below the links, just add this into the &lt;b&gt;Theme&lt;/b&gt; code:&lt;br /&gt;&lt;br /&gt;&lt;table border="1" bordercolor="" width="400" bgcolor="" cellspacing="10"&gt;
&lt;tr&gt;&lt;td&gt;&lt;textarea rows="4" cols="70" style="font-family: Tahoma; font-size:11px;"&gt;function Page::lay_print_paraphernalia() "User layers can override this to change what appears in the paraphernalia section" {
$this-&amp;gt;lay_print_journalinfo();
$this-&amp;gt;lay_print_viewsel();
$this-&amp;gt;lay_print_viewspec();
$this-&amp;gt;lay_print_custom_paraphernalia();
$this-&amp;gt;lay_print_userlinks();
if (viewer_sees_vbox()) {
paraphernalia_box_open("", "");
"""&amp;lt;div style="margin-top: 8px;"&amp;gt;""";
$this-&amp;gt;print_vbox();
"&amp;lt;/div&amp;gt;";
paraphernalia_box_close("", "");
}
}&lt;/textarea&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;br /&gt;This is the natural order for this Dear Diary sidebar but to rearrange, simply changing the paraphernalias in the position where you want it. And Save.</content>
  </entry>
</feed>
