Vixen Erica (vixenerica) wrote in component_help,
Vixen Erica
vixenerica
component_help

  • Mood:
I cannot for the life of me figure out why I cannot add more than one free text component to my layout... it always gives me errors. Ive even copied and pasted straight from tuts and it still doesnt work. Could anyone give me any help with this? Thanks!




layerinfo "type" = "theme";

layerinfo "name" = "Layer";

set background_scrolling = "fixed";

set show_free_text = true;

set show_profile= true;

set show_summary = true;

function Page::print_custom_head() {

"""



<style>

body {

background-image: url(http://kissme-killme.net/hg-pattern19.gif);

}

img {

         border: 0px;

}

.calendarInactive {

border: 1px solid #000000;

}



.calendarActive {

border: 1px solid #000000;

}

</style>





""";



}







function print_free_text(Page p)

{

print_comp_header("quote");



"""

<div style="height: 140px; width: 200px; overflow: auto;">

"The truth is I love being alive. And I love feeling free. So if I can't have those things then I feel like a caged animal and I'd rather not be in a cage. I'd rather be dead. And it's real simple. And I think it's not that uncommon." ~Angelina Jolie

</div>

""";



print_comp_footer();

}



        





function print_profile(Page p) {



print_comp_header("profile");

"""

<table cellspacing="0" cellpadding="0" border="0">

<tr>

<td width="50%" align="center">

<div class="shortLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>

<div class="shortLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>

</td>

<td align="center"><a href="http://www.livejournal.com/allpics.bml?user=vixenerica">$p.journal.default_pic </a></td>

<td width="50%" align="center">

<div class="shortLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>

<div class="shortLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>

</td>

</tr>

<tr>

<td colspan="3" class="compContent">

<div><b>User:</b> <span class='ljuser' style='white-space:nowrap;'><a href='http://www.livejournal.com/userinfo.bml?user=vixenerica'><img src='http://stat.livejournal.com/img/userinfo.gif' alt='userinfo' width='17' height='17' style='vertical-align:bottom;border:0;' /></a><a href='http://www.livejournal.com/users/vixenerica/'><b>vixenerica</b></a></span></div>

<div><b>Name:</b> <img src="http://kissme-killme.net/ericarainbow.gif" alt="Blinkie"/></div>

<div><b>Age:</b> 26</div>

<div><b>Location:</b> AZ, USA</div>

<div><b>Email:</b> <a href="mailto:vixenerica@gmail.com">vixenerica@gmail.com</a></div>

<div><img src="http://kissme-killme.net/me.jpg" alt="Me"/></div>



<table style="width: 100%;">

<tr><th colspan="2">AIM</th></tr>





<tr><td colspan="2">

<div class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>

<div class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div></td></tr>



<tr><td><a href="aim:goim?screenname=kissme8killme&message=I'm+an+LJ+junkie+too!">

<img src="http://kissme-killme.net/aimon.gif" alt="Message me" style="border: 0;" /></a></td>

<td style="text-align: right;">

<a href="aim:addbuddy?screenname=kissme8killme">+add me</a><br />

<a href="aim:goim?screenname=kissme8killme&message=I'm+an+LJ+junkie+too!">message me</a><br /></td></tr>



<tr><th colspan="2">LiveJournal</th></tr>

<tr><td><a href="http://www.livejournal.com/friends/add.bml?user=vixenerica">

<img src="http://kissme-killme.net/addfriend.gif" alt="Add me" style="border: 0;" /></a></td>

<td style="text-align: right;"><a href="http://www.livejournal.com/friends/add.bml?user=vixenerica">+add me</a></td></tr>



<tr><td colspan="2">

<div class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>

<div class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div></td></tr>



<tr><td><a href="http://www.livejournal.com/todo/?user=vixenerica">

<img src="http://kissme-killme.net/btn_todo.gif" alt="my Todo list" style="border: 0;" /></a></td>

<td style="text-align: right;"><a href="http://www.livejournal.com/todo/?user=vixenerica">my to do list</a></td></tr>



<tr><td colspan="2">

<div class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>

<div class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div></td></tr>



<tr><td><a href="http://www.livejournal.com/tools/memories.bml?user=vixenerica">

<img src="http://kissme-killme.net/memories.gif" alt="my Memories" style="border: 0;" /></a></td>

<td style="text-align: right;"><a href="http://www.livejournal.com/tools/memories.bml?user=vixenerica">my memories</a></td></tr>



</table>





</td>

</tr>

</table>

""";

print_comp_footer();

}





function CommentInfo::print() {

    if (not $.enabled) { return; }

    if ($.count > 0 or $.screened) {

        $this->print_readlink();

        """ <img src="http://kissme-killme.net/blinker.gif" alt="Blinker" /> """;

    }

    $this->print_postlink();

}





function page_layout(Page p) {

  # Set this to the width that you want both the navbar (if it exists) and the whole journal to be

  # may be percentage (70%) or number of pixels (700px).

  var string k1Swidth = "70%";



  # Start the html document and print the head section which controls the page title, stylesheet information,

  # server supplied head content, and custom header informtion from the print_custom_head function.

  var string title = $p->title();

  """

  <html>

  <head>

    <link rel="stylesheet" href="$p.stylesheet_url" type="text/css"/>

    $p.head_content

    """; $p->print_custom_head(); """

    <title>$title</title>

  </head>

  """;

  

  # Start the body section of the html document which controls the visible parts of the page.

  """<body style="text-align:center;">""";



  # If you want a picture to be at the top of your journal, edit and decomment this section remove the # from the next line.

  """<div align="center"><img src="http://img.photobucket.com/albums/v48/edreams/vblackangelv-barbara-70.jpg" alt="Header" title="Header" /></div>""";



  if($k1Swidth != "") {

    """<table style="border: 0px; margin: auto; padding: 0px; width:$k1Swidth;"><tr><td>""";

  }



  # Print the navigation bar if it is needed. This can be incorporated into any other tutorials which override

  # the page_layout() function, and should be placed immediately after the <body> tag above.

  if (not $*comp_navbar or $*comp_state=="none") {

    """    <div class="header">""";

    print "<span class=\"header-item\"><a href=\""+$p.view_url{"recent"}+"\">$*nav_entries_text</a></span>";

    print "<span class=\"header-item\"><a href=\""+$p.view_url{"friends"}+"\">$*nav_friends_text</a></span>";

    print "<span class=\"header-item\"><a href=\""+$p.view_url{"archive"}+"\">$*nav_calendar_text</a></span>";

    print "<span class=\"header-item\"><a href=\""+$p.view_url{"userinfo"}+"\">$*nav_info_text</a></span>";

    if ($p.journal.website_url != "") {

        print "<span class=\"header-item\"><a href=\"$p.journal.website_url\">$p.journal.website_name</a></span>";

    }

    $p->lay_viewspec_nav();  # prints previous / next links including arrow images

    """

    </div>

    """;

  }



  # Print a spacer at the top of the page above the components and main area.

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



  # Start the table which lays out the components and main area in side-by-side layout

  """

  <table cellspacing="0" cellpadding="0" valign="top">

    <tr valign="top" width="100%">

      <td width="3">

        <img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" />

      </td>

  """;

  

  # If the components are supposed to be on the left side of the page, then print them, followed by a column

  # with a spacer which is to seperate the components and the main area.

  if ($*comp_state == "left") {

    print_my_components($p);

    """

    <td width="3">

      <img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" />

    </td>

    """;

  }



  # Print the main area of the page.

  print_my_entries($p, $title);



  # If the components are supposed to be on the right side of the page, then first print a column with a spacer

  # and then print the components after the spacer.

  if ($*comp_state == "right") {

    """

    <td width="3">

      <img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" />

    </td>

    """;

    print_my_components($p);

  }



  # Finish off the table for the body

  """

      <td width="3">

        <img src="$*PALIMGROOT/component/clear.gif" width="3" height="1" alt="" border="0" />

      </td>

    </tr>

  </table>

  """;



  if($k1Swidth != "") {

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

  }



  # End the body section and end the html document

  """

  </body>

  </html>

  """;

}



# Change the way RecentPage and FriendsPage summaries print. (FriendsPage inherits from RecentPage)

function RecentPage::lay_print_summary() {



   # print the header of the component and determine the size of the entries array

   print_comp_header("page summary");

   var int size = size $.entries - 1;

   if ($size<0) { return; }



   # loop on the entries

   foreach var int pos (0..$size) {



      # Get the Entry and start the summary line

      var Entry e = $.entries[$pos];

      var string subject = ($e.subject!=""?$e->plain_subject():"<i>(no subject)</i>");

      """<div>""";



      # On the Friends page print: <poster_name> : <journal_name> : <security_icon> <subject> [+<comment_count>]

      if ($.view=="friends") {

         """$e.poster """;

         if ($e.journal.username!=$e.poster.username) { """: $e.journal : """; }

         if (defined $e.security_icon) { """$e.security_icon """; }

         """<a href="#$e.journal.username$e.itemid">$subject</a>""";

         if ($e.comments.count>0) { """ <a href="$e.comments.read_url">[+$e.comments.count]</a>"""; }



      # On the Recent page print: <date> <time> : <security_icon> <subject> [+<comment_count>]

      }else{ # recent page

         print $e.time->date_format()+" "+$e.time->time_format()+" : ";

         if (defined $e.security_icon) { """$e.security_icon """; }

         """<a href="#item$e.itemid">$subject</a>""";

         if ($e.comments.count>0) { """ <a href="$e.comments.read_url">[+$e.comments.count]</a>"""; }



      # Close if..else loop and end the summary line

      }

      """</div>""";



      # If it's not the last summary line, print a seperator bar

      if ($size!=$pos) {

        """

        <div class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>

        <div class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>

        """;

      }



   # End the loop for entries

   }



   # Print the component footer when done.

   print_comp_footer();

}



Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 7 comments