<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. https://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="https://www.livejournal.com" xmlns:idx="urn:atom-extension:indexing" idx:index="no">
  <id>urn:lj:livejournal.com:atom1:fblayers</id>
  <title>FB Layers</title>
  <subtitle>FB Layers</subtitle>
  <author>
    <name>FB Layers</name>
  </author>
  <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/"/>
  <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom"/>
  <updated>2006-02-14T19:41:50Z</updated>
  <lj:journal userid="5676671" username="fblayers" type="community"/>
  <link rel="service.feed" type="application/x.atom+xml" href="https://fblayers.livejournal.com/data/atom" title="FB Layers"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:3023</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/3023.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=3023"/>
    <title>[theme] - [smoove] - [add link to journal in header]</title>
    <published>2006-02-14T19:41:50Z</published>
    <updated>2006-02-14T19:41:50Z</updated>
    <category term="function make_navbox"/>
    <category term="layout smoove"/>
    <content type="html">&lt;pre&gt;&lt;code&gt;function make_navbox (Page this, int top) {
  var string title = $this-&amp;gt;title();

  var string lj_text = "my livejournal";
  var string lj_link = """&amp;lt;a href="http://${this.user.user}.livejournal.com/"&amp;gt;$lj_text&amp;lt;/a&amp;gt;""";
  """
    &amp;lt;div class="navbox"&amp;gt;""";
  if ($top == 1) {
    """
      &amp;lt;div class="header"&amp;gt;
        &amp;lt;table border="0" cellpadding="0" cellspacing="0" width="100%"&amp;gt;
          &amp;lt;tr&amp;gt;
            &amp;lt;td width="50%" class="title"&amp;gt;""";
    print $this-&amp;gt;title();
    """
            &amp;lt;/td&amp;gt;
            &amp;lt;td align="right" valign="bottom" width="50%" class="pager"&amp;gt;""";
    $this-&amp;gt;lay_pager();
    print $lj_link;
    """
            &amp;lt;/td&amp;gt;
          &amp;lt;/tr&amp;gt;
        &amp;lt;/table&amp;gt;
      &amp;lt;/div&amp;gt;""";
  }
  """
      &amp;lt;table border="0" cellpadding="0" cellspacing="0" width="100%"&amp;gt;
        &amp;lt;tr&amp;gt;
          &amp;lt;td width="50%"&amp;gt;
            &amp;lt;p&amp;gt;
  """;
  if ($top == 1) {
    $this-&amp;gt;lay_top_left_links();
  } else {
    $this-&amp;gt;lay_btm_left_links();
  }
  """
            &amp;lt;/p&amp;gt;
          &amp;lt;/td&amp;gt;
          &amp;lt;td align="right" width="50%" valign="top"&amp;gt;
            &amp;lt;p&amp;gt;""";
  if ($top == 1) {
    $this-&amp;gt;lay_top_right_links();
  } else {
    $this-&amp;gt;lay_btm_right_links();
  }
  """
            &amp;lt;/p&amp;gt;
          &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/div&amp;gt;""";
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:2576</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/2576.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=2576"/>
    <title>[theme] - [positive contact] - [remove other pictures sidebar box]</title>
    <published>2006-01-24T01:18:48Z</published>
    <updated>2006-01-24T01:18:48Z</updated>
    <category term="layout posicont"/>
    <category term="function lay_print_sidebar"/>
    <category term="class picturepage"/>
    <content type="html">&lt;pre&gt;&lt;code&gt;function PicturePage::lay_print_sidebar() {
  var string part_of;
  foreach var Link l ($.parent_links) {
    $part_of = $part_of + """
                &amp;lt;li&amp;gt;&amp;lt;a href="$l.url"&amp;gt;$l.caption&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;""";
  }
  print_sidebar_box("Related Galleries", """
              &amp;lt;ul&amp;gt;$part_of
              &amp;lt;/ul&amp;gt;""");
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:2542</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/2542.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=2542"/>
    <title>[theme] - [positive contact] - [add custom css]</title>
    <published>2006-01-24T00:12:04Z</published>
    <updated>2006-01-24T00:12:04Z</updated>
    <category term="class page"/>
    <category term="layout posicont"/>
    <category term="function print"/>
    <content type="html">&lt;pre&gt;&lt;code&gt;function Page::print () {
var string title     = $this-&amp;gt;title();
var string logged_in = logged_in("You are not currently logged in, &amp;lt;a href='/login'&amp;gt;Login now&amp;lt;/a&amp;gt;?");
"""&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd"&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;$title&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="$.stylesheeturl" type="text/css" /&amp;gt;
""";

"""
&amp;lt;style type="text/css"&amp;gt;
/* custom css here */
&amp;lt;/style&amp;gt;
""";

"""
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div id="Title" style="text-align: $*title_align"&amp;gt;
      &amp;lt;a name="top"&amp;gt;&amp;lt;/a&amp;gt;
      &amp;lt;h1&amp;gt;$title&amp;lt;/h1&amp;gt;
      &amp;lt;div id="TitleNav"&amp;gt;
        $logged_in
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div id="Main" style="clear: both"&amp;gt;
      &amp;lt;div id="Sidebar" style="text-align: center"&amp;gt;
        &amp;lt;div id="SidebarContents"&amp;gt;""";
var string navigation = """
              &amp;lt;ul&amp;gt;
                &amp;lt;li&amp;gt;&amp;lt;a href="/$.user.user/"&amp;gt;View all Galleries&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
                &amp;lt;li&amp;gt;""" + logged_in("&amp;lt;a href='/login'&amp;gt;Log in to ScrapBook&amp;lt;/a&amp;gt;") + """&amp;lt;/li&amp;gt;""" +
                $this-&amp;gt;lay_sidebar_navigation() + """
              &amp;lt;/ul&amp;gt;""";

print_sidebar_box("Navigation", $navigation);
print_sidebar_box("Link Back", """
              &amp;lt;p&amp;gt;Use this HTML to link back to this page:&amp;lt;/p&amp;gt;
              &amp;lt;textarea style="width: 100%;" rows="5" cols="5"&amp;gt;""" + 
              ehtml($this-&amp;gt;lay_self_link()) +
              """&amp;lt;/textarea&amp;gt;""");

$this-&amp;gt;lay_print_sidebar();
"""
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div id="Viewer"&amp;gt;
        &amp;lt;div style="left: -16em; height: 100%; position: absolute;"&amp;gt; &amp;lt;/div&amp;gt;""";
$this-&amp;gt;print_body();
"""
        &amp;lt;/div&amp;gt;
     &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;""";
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:2055</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/2055.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=2055"/>
    <title>[theme] - [cornered] - [make Page::print() call Page::print_head()]</title>
    <published>2005-12-08T02:39:48Z</published>
    <updated>2005-12-08T02:44:26Z</updated>
    <category term="class page"/>
    <category term="layout cornered"/>
    <category term="function print"/>
    <lj:music>Rayza - Sonic the Hedgehog 3 IceCap(FrozenKnuckles) OC ReMix</lj:music>
    <content type="html">&lt;pre&gt;&lt;code&gt;function Page::print() {
  var string title = $this-&amp;gt;title();
  """&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;$title&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="$.stylesheeturl" type="text/css"&amp;gt;
&lt;span style="color:green; font-weight:bold;"&gt;  """:

  # like.  actually call this function.  and stuff.
  $this-&amp;gt;print_head();

  """&lt;/span&gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
  """;

  $this-&amp;gt;lay_print_header();

  $this-&amp;gt;print_body();

  $this-&amp;gt;lay_print_footer();

  """
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;""";
}&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:1849</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/1849.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=1849"/>
    <title>department of redundancy department</title>
    <published>2005-11-13T06:37:26Z</published>
    <updated>2005-11-13T06:42:42Z</updated>
    <content type="html">in the new "positive contact" layout:&lt;pre&gt;&lt;code&gt;function logged_in(string login_text) : string {
  var Page p = get_page();
  if (viewer_logged_in()) {
    if (viewer_is_owner()) {
      return """&amp;lt;a href="$p.manage_account.url"&amp;gt;$p.manage_account.caption&amp;lt;/a&amp;gt;""";
    }
  }
  return $login_text;
}&lt;/code&gt;&lt;/pre&gt;umm.  if we know that the viewer is the owner, we know that the viewer is logged in.  duh.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:1634</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/1634.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=1634"/>
    <title>[theme] - [apache] - [apache image downloader]</title>
    <published>2005-10-02T20:58:11Z</published>
    <updated>2005-10-02T21:00:46Z</updated>
    <category term="class gallerypage"/>
    <category term="function print_body"/>
    <category term="layout apache"/>
    <content type="html">install &lt;a href="http://downthemall.mozdev.org/" target="_blank"&gt;downTHEMall!&lt;/a&gt; extension.&lt;br /&gt;&lt;br /&gt;create new apache &lt;a href="http://pics.livejournal.com/manage/styles/advanced/layers" target="_blank"&gt;layer&lt;/a&gt;.&lt;br /&gt;create layout-specific layer.&lt;br /&gt;type: theme.&lt;br /&gt;layout: apache-style directory indexing.&lt;hr /&gt;&lt;pre&gt;&lt;code&gt;layerinfo "type" = "theme";
layerinfo "name" = "apache image downloader";

layerinfo "source_viewable" = 1;

function GalleryPage::print_body (){
"&amp;lt;h1&amp;gt;Apache Image Downloader&amp;lt;/h1&amp;gt;";
  if (not $.pages.all_subitems_displayed) {
    if ($.pages.url_prev != "") { 
      dir_item("left", $.pages.url_prev, "Previous Page", $.gallery.dateupdate, "", "Page " + ($.pages.current - 1) + " of $.pages.total"); 
    }
    if ($.pages.url_next != "") { 
      dir_item("right", $.pages.url_next, "Next Page", $.gallery.dateupdate, "", "Page " + ($.pages.current + 1) + " of $.pages.total"); 
    }
  }
  "&amp;lt;/pre&amp;gt;";

  if ((size $.pictures) == 0) { return; }

  "&amp;lt;hr noshade align=\"left\" width=\"80%\" /&amp;gt;";

  "&amp;lt;table cellpadding='2'&amp;gt;";
  var bool tr = false;
  var int td = 0;
  var string desrow;
  var int rows = 0;
  foreach var Picture p ($.pictures) {
    if (not $tr) {
      "&amp;lt;tr align='center' valign='bottom'&amp;gt;\n";
      $rows++;
      $tr = true;
    }
    var Image i = $p.thumbnails{"norm"};
    "&amp;lt;td&amp;gt;";
    $i-&amp;gt;print({
      "tint" =&amp;gt; $*tint,
      "href" =&amp;gt; $p.fullimage.url,
      "alt" =&amp;gt; $p.title,
    });
    "&amp;lt;/td&amp;gt;\n";
    $desrow = $desrow + "&amp;lt;td&amp;gt;$p.title&amp;lt;/td&amp;gt;";
    $td++;
    if ($td == $*cols) {
      "&amp;lt;/tr&amp;gt;\n";
      if ($*show_titles) {
        "&amp;lt;tr valign='top'&amp;gt;$desrow&amp;lt;/tr&amp;gt;\n";
      }
      $td = 0;
      $tr = false;
      $desrow = "";
    }
  }
  if ($tr) {
    "&amp;lt;/tr&amp;gt;\n";
    if ($*show_titles) {
      "&amp;lt;tr valign='top' align='center'&amp;gt;$desrow&amp;lt;/tr&amp;gt;\n";
    }
  }
  "&amp;lt;/table&amp;gt;";
}&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;create new &lt;a href="http://pics.livejournal.com/manage/styles/" target="_blank"&gt;style&lt;/a&gt;.&lt;br /&gt;template: (no base)&lt;br /&gt;edit style.&lt;br /&gt;name: apache image downloader.&lt;br /&gt;layout: apache-style directory indexing&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pics.livejournal.com/manage/gals" target="_blank"&gt;manage gals&lt;/a&gt;.&lt;pre&gt;&lt;code&gt;foreach $gal ($gals) {

  choose a gal to download images from.

  if (size($images) &amp;gt; 0) {

    change style to "apache image downloader."
    save gallery.
    click on "view all pictures" link on right.

    select &amp; copy gal title.

    right click -&amp;gt; downTHEMall!
    select "links in the page" tab.
    filter by "all files."

    if (size($pages) &amp;gt; 1) {
      deselect any links to other pages.
    }

    set dir to download to.  (if you copied the gal title,
      you can use that to create a dir with that name)
    click "start downloads!" and watch them be grabbed.  and stuff.

    if (size($pages) &amp;gt; 1) {
      go to next page and perform above process for remaining pages.
    }

    hit the back button until you reach the manage gal page.

    change style back to what it was before you changed it to:
      "apache image downloader."
    save changes.

  }

  if (size($images) == 0) {
    choose a subgal.
    perform above process.
  }

  if (size($remaining_subgals) == 0) {
    go to parent gal.
    perform above process.
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;hr /&gt;then use this php, running in a web server emulator on your computer (such as &lt;a href="http://www.xitami.com/" target="_blank"&gt;xitami&lt;/a&gt;), to append the correct filetype to each file.  this script is intended to run within each folder.&lt;pre&gt;&lt;code&gt;&amp;lt;?php
function image_type_to_extension($imagetype) {
  if(empty($imagetype)) return false;
  switch($imagetype) {
    case IMAGETYPE_GIF     : return 'gif';
    case IMAGETYPE_JPEG    : return 'jpg';
    case IMAGETYPE_PNG     : return 'png';
    case IMAGETYPE_SWF     : return 'swf';
    case IMAGETYPE_PSD     : return 'psd';
    case IMAGETYPE_BMP     : return 'bmp';
    case IMAGETYPE_TIFF_II : return 'tiff';
    case IMAGETYPE_TIFF_MM : return 'tiff';
    case IMAGETYPE_JPC     : return 'jpc';
    case IMAGETYPE_JP2     : return 'jp2';
    case IMAGETYPE_JPX     : return 'jpf';
    case IMAGETYPE_JB2     : return 'jb2';
    case IMAGETYPE_SWC     : return 'swc';
    case IMAGETYPE_IFF     : return 'aiff';
    case IMAGETYPE_WBMP    : return 'wbmp';
    case IMAGETYPE_XBM     : return 'xbm';
    default                : return false;
  }
}

$dir   = ".";
$files = array();
$dir = opendir($dir);
while($file = readdir($dir)) {
  $files[] = $file;
}

foreach ($files as $file) {
  if(is_file($file)) {
    if(count(explode(".", $file)) == 1) {
      list($width, $height, $type, $attr) = getimagesize($file);
      $newfile = $file . "." . image_type_to_extension($type);
      if(rename($file, $newfile)) {
        echo $file . " -&amp;gt; " . $newfile . "&amp;lt;br /&amp;gt;";
      }
    }
  }
}
?&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:1486</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/1486.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=1486"/>
    <title>userpics! </title>
    <published>2005-04-15T02:22:25Z</published>
    <updated>2005-04-15T02:22:25Z</updated>
    <content type="html">check out &lt;a href="http://pics.livejournal.com/kunzite1/gallery/00032048" target="_blank"&gt;this gallery&lt;/a&gt; and vote on the userpics.&lt;br /&gt;x-posted to: &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="fblayers" lj:user="fblayers" &gt;&lt;a href="https://fblayers.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://fblayers.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;fblayers&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;, and &lt;span  class="ljuser  i-ljuser  i-ljuser-type-C     "  data-ljuser="s2layers" lj:user="s2layers" &gt;&lt;a href="https://s2layers.livejournal.com/profile/"  target="_self"  class="i-ljuser-profile" &gt;&lt;img  class="i-ljuser-userhead"  src="https://l-stat.livejournal.net/img/community.png?v=556&amp;v=923.1" /&gt;&lt;/a&gt;&lt;a href="https://s2layers.livejournal.com/" class="i-ljuser-username"   target="_self"   &gt;&lt;b&gt;s2layers&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:1276</id>
    <author>
      <name>NovaChild</name>
    </author>
    <lj:poster user="dgriswold" userid="3157937"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/1276.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=1276"/>
    <title>[Code snippets for layout layer] - [Parse &amp;lt;lj user=*&amp;gt; tags / make "Add as User Icon" buttons]</title>
    <published>2005-04-14T23:35:05Z</published>
    <updated>2005-04-15T00:04:36Z</updated>
    <content type="html">Two snippets. First, a function to parse strings for &amp;lt;lj user=*&amp;gt; and &amp;lt; comm=*&amp;gt; tags. Also includes a recursive function to find the earliest occurrence of a substring in a larger string using a binary search. These functions are useful for parsing picture or gallery descriptions.&lt;br /&gt;


&lt;pre&gt;
function find_earliest_instance (string input, string subs) : int
{
  #Finds the earliest instance of substring subs in in that occurs after character start
  if (not $input-&amp;gt;contains($subs)) {
    return -1;
  }
  var int sub_length = $subs-&amp;gt;length();
  var int input_length = $input-&amp;gt;length();
  
  if ($input_length == $sub_length) 
  {
    return 0;
  }
  
  var int mid2 = ($input_length / 2) + ($sub_length / 2);
  var int mid1 = $mid2 - $sub_length + 1;
  var int val;
  
  $val = find_earliest_instance($input-&amp;gt;substr(0, $mid2), $subs);
  if ($val != -1) {

    return $val;
  }
  $val = find_earliest_instance($input-&amp;gt;substr($mid1, $input_length), $subs);
  return $mid1 + $val;
}

function parse_lj_user (string input) : string
{ # FUNCTION BLOCK
  var string user_string = "&amp;amp;lt;lj user=";
  var string comm_string = "&amp;amp;lt;lj comm=";
  var string rep_base_1 = "&amp;lt;span class='ljuser' style='white-space: nowrap;'&amp;gt;&amp;lt;"
    +"a href='http://www.livejournal.com/userinfo.bml?user=";
  var string rep_commbase_2 = "'&amp;gt;&amp;lt;img " +
    "src='http://stat.livejournal.com/img/community.gif' " +
    "alt='[info]' width='16' height='16' " + 
    "style='vertical-align: bottom; border: 0;' " +
    "/&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;a href='http://www.livejournal.com/community/";
  var string rep_userbase_2 = "'&amp;gt;&amp;lt;img " +
    "src='http://stat.livejournal.com/img/userinfo.gif' " +
    "alt='[info]' width='16' height='16' " +
    "style='vertical-align: bottom; border: 0;' " +
    "/&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;a href='http://www.livejournal.com/user/";
  var string rep_base_3 = "/'&amp;gt;&amp;lt;b&amp;gt;";
  var string rep_base_4 = "&amp;lt;/b&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;";
  
  var int beginning;
  var int end;
  var string string_to_rep;
  var string rep_string;
  var int rep_length;
  var string username;
  var string linktype;
  var string part1;
  var string part2;
  var string output;
   
  $beginning = find_earliest_instance($input, $user_string);
  if ($beginning != -1) {
    $linktype = "user";
  } else {
    $beginning = find_earliest_instance($input, $comm_string);
    if ($beginning != -1) {
      $linktype = "comm";
    } else {
      return $input;
    }
  }
  $end = find_earliest_instance($input, "&amp;amp;gt;");
  if ($end == -1) { return $input;}
  
  # REPLACE THIS STRING
  $rep_length = $end - $beginning + 4;
  $string_to_rep = $input-&amp;gt;substr($beginning, $rep_length);
  $username = $string_to_rep-&amp;gt;substr(12, $rep_length - 16);
  var int userlength = $username-&amp;gt;length();
  var string userbegin = $username-&amp;gt;substr(0,6);
  var string userend = $username-&amp;gt;substr($userlength - 6, $userlength);
  if ($userbegin-&amp;gt;contains("&amp;amp;quot;")) 
  {
    if (not $userend-&amp;gt;contains("&amp;amp;quot;")) 
    { return $input; }
    $username = $username-&amp;gt;substr(6, $userlength - 12);
  }
   elseif ($userbegin-&amp;gt;contains("&amp;amp;#39;")) 
   {
     if (not $userend-&amp;gt;contains("&amp;amp;#39;")) 
     { return $input; }
     $username = $username-&amp;gt;substr(5, $userlength - 10);
   }
  if ($linktype-&amp;gt;contains("comm")) 
  {
    $rep_string = $rep_base_1 + $username + $rep_commbase_2 +
     $username + $rep_base_3 + $username + $rep_base_4;
  }
  else
  {
   $rep_string = $rep_base_1 + $username + $rep_userbase_2 +
     $username + $rep_base_3 + $username + $rep_base_4;
  }
  $part1 = $input-&amp;gt;substr(0, $beginning);
  $part2 = $input-&amp;gt;substr($end + 4, $input-&amp;gt;length());
  $output = $part1 + $rep_string + $part2;
  if ($output-&amp;gt;contains($input)) 
  { 
    return $output;
  } 
  else
  {
    return parse_lj_user($output);
  }
} #END FUNCTION BLOCK      
 
&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;&lt;br /&gt;

The second snippet is HTML (encased in strings) for a form button that lets any user add an image's thumbnail as their own LJ user icon, assuming they're logged in. The URL, Keywords, and Comments values assume you're in Gallery View on the Super Simple style (having run $this-&amp;gt;load_pict_descriptions()) but it's pretty simple to adapt to any view, just change $i.url, $p.title, and $p.des to the correct values for the image's thumbnail, title, and description respectively. &lt;br /&gt;&lt;br /&gt;


&lt;pre&gt;
"""&amp;lt;form action='http://livejournal.com/editpics.bml' """ +
"""method='post' enctype='multipart/form-data'&amp;gt;\n""" +
"""&amp;lt;input type='hidden' value="url" name="src" /&amp;gt;\n""" +
"""&amp;lt;input type="hidden" name="urlpic" value = "$i.url" /&amp;gt;\n""" +
"""&amp;lt;input type="hidden" name="keywords" value="$p.title" /&amp;gt;\n""" +
"""&amp;lt;input type="hidden" value="$p.des" name="comments" size="40" /&amp;gt;\n""" +
"""&amp;lt;input type='submit' value="Add as user icon" /&amp;gt;&amp;lt;/form&amp;gt;\n&amp;lt;/td&amp;gt;\n""";
&lt;/pre&gt;&lt;a name='cutid2-end'&gt;&lt;/a&gt;&lt;br /&gt;

I recommend setting properties in your layout for the use of these snippets. You can see an example in my modified Super Simple style, number 14200. &lt;a href="http://pics.livejournal.com/dgriswold/gallery/0000a9hr" target="_blank"&gt;This gallery&lt;/a&gt; (and each of its subgalleries) is using the style right now, if you want to see an example.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:935</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/935.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=935"/>
    <title>[snippet intended for layout layer] - [add to page::print()] - [add lj links to fb layout]</title>
    <published>2005-01-07T08:16:16Z</published>
    <updated>2005-01-07T08:16:16Z</updated>
    <content type="html">&lt;pre&gt;&lt;span style="color:green;"&gt;# set the values of these variables&lt;/span&gt;
var string   journal_type           = "&lt;span style="color:maroon; font-style:italic;"&gt;P&lt;/span&gt;"; &lt;span style="color:green;"&gt;# p = person/user, c = comm, y = syn # set journal type&lt;/span&gt;
var string[] views_order            = ["&lt;span style="color:maroon; font-style:italic;"&gt;recent&lt;/span&gt;", "&lt;span style="color:maroon; font-style:italic;"&gt;friends&lt;/span&gt;", "&lt;span style="color:maroon; font-style:italic;"&gt;archive&lt;/span&gt;", "&lt;span style="color:maroon; font-style:italic;"&gt;userinfo&lt;/span&gt;"]; &lt;span style="color:green;"&gt;# set view order&lt;/span&gt;
var string   text_view_recent       = "&lt;span style="color:maroon; font-style:italic;"&gt;recent&lt;/span&gt;";
var string   text_view_friends      = "&lt;span style="color:maroon; font-style:italic;"&gt;friends&lt;/span&gt;";
var string   text_view_friends_comm = "&lt;span style="color:maroon; font-style:italic;"&gt;members&lt;/span&gt;";
var string   text_view_archive      = "&lt;span style="color:maroon; font-style:italic;"&gt;calendar&lt;/span&gt;";
var string   text_view_userinfo     = "&lt;span style="color:maroon; font-style:italic;"&gt;user info&lt;/span&gt;";
var string   website_url            = "&lt;span style="color:maroon; font-style:italic;"&gt;http://mal.mm1swebcreations.com/&lt;/span&gt;";
var string   website_name           = "&lt;span style="color:maroon; font-style:italic;"&gt;mal's website&lt;/span&gt;";
var string   link_seperator         = "&lt;span style="color:maroon; font-style:italic;"&gt; | &lt;/span&gt;";

&lt;span style="color:green;"&gt;# dont mess with these 'less you know what yer doing&lt;/span&gt;
var Page     p                      = get_page(); &lt;span style="color:green;"&gt;# get page handle&lt;/span&gt;
var string   LJSITEROOT             = "http://www.livejournal.com"; &lt;span style="color:green;"&gt;# set root for lj&lt;/span&gt;
var string   view_links             = "";
&lt;span style="color:green;"&gt;# build website url&lt;/span&gt;
var string   website                = (($website_url != "") ? ("""$link_seperator&amp;lt;a href="$website_url"&amp;gt;""" + (($website_name != "") ? $website_name : $website_url) + "&amp;lt;/a&amp;gt;") : "");
var string   journal_dir            = $journal_type == "C" ? "community" : "users"; &lt;span style="color:green;"&gt;# set journal directory&lt;/span&gt;
var string   base_url               = "$LJSITEROOT/$journal_dir/$p.user.user"; &lt;span style="color:green;"&gt;# build base url to journal&lt;/span&gt;
var string{} view_url               = { &lt;span style="color:green;"&gt;# set view urls&lt;/span&gt;
                                       "recent"   =&amp;gt; "$base_url/",
                                       "friends"  =&amp;gt; "$base_url/friends/",
                                       "archive"  =&amp;gt; "$base_url/calendar/",
                                       "userinfo" =&amp;gt; "$base_url/info/"
                                      };
var string{} view_text              = { &lt;span style="color:green;"&gt;# set view text&lt;/span&gt;
                                       "recent"   =&amp;gt; $text_view_recent,
                                       "friends"  =&amp;gt; $journal_type == "C" ? $text_view_friends_comm : $text_view_friends,
                                       "archive"  =&amp;gt; $text_view_archive,
                                       "userinfo" =&amp;gt; $text_view_userinfo
                                      };
&lt;span style="color:green;"&gt;# add seperator before links&lt;/span&gt;
$view_links = $view_links + $link_seperator;
foreach var string v ($views_order) {
&lt;span style="color:green;"&gt;  # add seperator after links&lt;/span&gt;
  $view_links = $view_links + """&amp;lt;a href="$view_url{$v}"&amp;gt;$view_text{$v}&amp;lt;/a&amp;gt;$link_seperator""";
}
&lt;span style="color:green;"&gt;# remove last seperator from links cuz website will add one if needed&lt;/span&gt;
$view_links = $view_links-&amp;gt;substr(0, $view_links-&amp;gt;length() - $link_seperator-&amp;gt;length()) + $website;&lt;/pre&gt;&lt;a name='cutid1-end'&gt;&lt;/a&gt;&lt;br /&gt;&lt;img src="https://pics.livejournal.com/kunzite1/pic/00064edf" alt="" title="" fetchpriority="high" /&gt;&lt;a name='cutid2-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:550</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/550.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=550"/>
    <title>opening house</title>
    <published>2005-01-07T01:50:19Z</published>
    <updated>2005-01-07T01:50:19Z</updated>
    <content type="html">here's what i need:&lt;ul&gt;&lt;li style="text-decoration:line-through;"&gt;categories for memories&lt;/li&gt;&lt;li&gt;ideas for rules about posting&lt;/li&gt;&lt;li&gt;responsible people who will not abuse maintainership&lt;/li&gt;&lt;li&gt;people who want to sort memories to the agreed upon specifications&lt;/li&gt;&lt;li&gt;people who want to take care of flame wars if they arise&lt;/li&gt;&lt;li&gt;which layout to use for the journal&lt;/li&gt;&lt;li&gt;what to add/change/delete on the userinfo page&lt;/li&gt;&lt;li&gt;people who have suggestions to this list&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;now... &lt;span style="font-weight:bold; font-style:italic;"&gt;discuss!&lt;/span&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:fblayers:331</id>
    <author>
      <name>kunzite</name>
    </author>
    <lj:poster user="kunzite1" userid="956023"/>
    <link rel="alternate" type="text/html" href="https://fblayers.livejournal.com/331.html"/>
    <link rel="self" type="text/xml" href="https://fblayers.livejournal.com/data/atom/?itemid=331"/>
    <title>first post</title>
    <published>2005-01-07T01:47:08Z</published>
    <updated>2005-01-07T01:47:08Z</updated>
    <content type="html">&lt;span style="font-weight:bold;"&gt;how to post&lt;/span&gt;&lt;br /&gt;post your layer code under a &lt;a href="http://www.livejournal.com/support/faqbrowse.bml?faqid=75" target="_blank"&gt;cut&lt;/a&gt; after converting all&lt;br /&gt;&lt;code&gt;&amp;amp;&lt;/code&gt; to &lt;code&gt;&amp;amp;amp;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;&lt;/code&gt; to &lt;code&gt;&amp;amp;lt;&lt;/code&gt;&lt;br /&gt;and&lt;br /&gt;&lt;code&gt;&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.simplebits.com/cgi-bin/simplecode.pl" target="_blank"&gt;this&lt;/a&gt; can help with the conversion.&lt;br /&gt;if you use the aforementioned tool, change the &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/code&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/pre&amp;gt;&lt;/code&gt; respectively.&lt;br /&gt;if you dont use the aforementioned tool, please wrap your code with &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;/pre&amp;gt;&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;the subject line should follow the following format:&lt;br /&gt;&lt;code&gt;[&lt;span style="color:maroon; font-style:italic;"&gt;layout name&lt;/span&gt;] - [&lt;span style="color:maroon; font-style:italic;"&gt;layer type&lt;/span&gt;] - [&lt;span style="color:maroon; font-style:italic;"&gt;mini description of what your code does&lt;/span&gt;] - [&lt;span style="color:maroon; font-style:italic;"&gt;page number (if applicable)&lt;/span&gt;]&lt;/code&gt;&lt;br /&gt;layout name - apache, color hover, cornered, framed, porfoloroid, etc.&lt;br /&gt;layer type - layout, user, theme&lt;br /&gt;page number - page #/total pages&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;if your code is too long to place into a single post:&lt;/span&gt;&lt;br /&gt;put a comment in the code saying &lt;code&gt;# part 1 ends here&lt;/code&gt; and then in the next post put a comment in the code saying &lt;code&gt;# part 2 starts here&lt;/code&gt; ... lather, rinse, repeat.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;recommended coloring scheme (not required)&lt;/span&gt;&lt;br /&gt;if you have comments in the code, we suggest making it &lt;span style="color:green;"&gt;green&lt;/span&gt; by doing something like:&lt;br /&gt;&lt;code&gt;&amp;lt;span style="color:green;"&amp;gt;comment&amp;lt;/span&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;variable values: &lt;span style="color:maroon;"&gt;maroon&lt;/span&gt;&lt;br /&gt;&lt;code&gt;var string moo = "&amp;lt;span style="color:maroon;"&amp;gt;variable&amp;lt;/span&amp;gt;";&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;code that is currently active but can be deactivated by commenting (putting a &lt;code&gt;#&lt;/code&gt; in front of it) it out.&lt;br /&gt;active code: &lt;span style="color:blue;"&gt;blue&lt;/span&gt;&lt;br /&gt;&lt;code&gt;"&amp;lt;span style="color:blue;"&amp;gt;if($active) { print "make it blue"; }&amp;lt;/span&amp;gt;";&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;code that is currently inactive but can be activated by decommenting (taking &lt;code&gt;#&lt;/code&gt; in front of it out) it.&lt;br /&gt;inactive code: &lt;span style="color:pink;"&gt;pink&lt;/span&gt;&lt;br /&gt;&lt;code&gt;"&amp;lt;span style="color:pink;"&amp;gt;# if($inactive) { print "make it orange"; }&amp;lt;/span&amp;gt;";&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;screenshot of output&lt;/span&gt;&lt;br /&gt;we would also like to have a screenshot available that shows the results of the code.&lt;br /&gt;&lt;br /&gt;and finally, &lt;span style="font-weight:bold;"&gt;select the don't auto-format option.&lt;/span&gt;  this makes the entry a lot easier to read.</content>
  </entry>
</feed>
