♥*¨¨*:·.*Laura*.·:*¨¨*♥ (ricanprincesa) wrote in component_help,
♥*¨¨*:·.*Laura*.·:*¨¨*♥
ricanprincesa
component_help

  • Mood:
why is it that when i try to click on "edit customizations" button, it will only refresh the page back to the customization main page?

i think it may have something to do with the codes i put in my customizations, but this has nothing to do with it right? someone please help! is it an LJ malfunction? or is it me?

these are the codes i have put in, (& they don't have any errors)...which i am still trying to edit because the components with music, etc won't show.



layerinfo "type" = "theme";
layerinfo "name" = "Additional Customizations";

set lineheight = 15;

layerinfo "type" = "theme";
layerinfo "name" = "ricanprincesa customizations";

function Page::print_custom_head() {
"""

""";
}

function page_layout(Page p) {
var string k1Swidth = "800px";


# 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();
"""


""";

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

if($k1Swidth != "") {
"""
""";
}

# If you want a picture to be at the top of your journal, edit and decomment this section.
# """
caption here
""";

# 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 tag above.
if (not $*comp_navbar or $*comp_state=="none") {
"""
""";
print "$*nav_entries_text";
print "$*nav_friends_text";
print "$*nav_calendar_text";
print "$*nav_info_text";
if ($p.journal.website_url != "") {
print "$p.journal.website_name";
}
$p->lay_viewspec_nav(); # prints previous / next links including arrow images
"""

""";
}

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

# Start the table which lays out the components and main area in side-by-side layout
"""
"""; # 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); """ """; } # 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") { """ """; print_my_components($p); } # Finish off the table for the body """









""";

if($k1Swidth != "") {
"""
""";
}

# End the body section and end the html document
"""


""";
}
function print_profile(Page p) {

print_comp_header("about.the.girl.");
"""



</a>



</b></a>ricanprincesa
</span>

Name: laura melanie
Age: 22
Location: texas
Status: happily taken
Loves: GOD, life, family, friends, my boyfriend, houston, california, traveling, starbucks frapuccinos, chocolate, sunrise, palm trees, the beach, puerto rico, my big fat greek wedding, shrek, the notebook, mean girls, lindsay lohan, ashlee & jessica simpson, jlo, eva longoria, will & grace, six feet under, desperate housewives, late nite w/conan o'brien.. </td>

""";
print_comp_footer();
}

function print_free_text(Page p) {

print_comp_header("obsessions");

"""



eva longoria
true beauty
 

Desperate Housewives
everyone has a little dirty laundry
 

Will & Grace
luv this show~
 

Charmed
season seven
 

Christina
beautiful
 

Gwen Stefani
super hot female
 




""";
print_comp_footer();
# Determine the colouring for the rounded corners based on the actual page colours. Do not change.
# You only need one copy of these four lines per function, so if you already have it in the function you place this code
# in, then you can remove these four lines since the variable will already be defined. Make sure that the lines appear
# before any code which uses the $corner_color variable.
var Color header = $*header_bgcolor;
var Color headerMinus5 = $header->darker(50);
var Color headerPlus3 = $header->lighter(30);
var string corner_color = "/p0"+$headerPlus3->substr(1,6)+"1"+$headerMinus5->substr(1,6)+"2"+$header->substr(1,6);

# Set properties that will be used to determine how the component prints.
# If you want the component to look like one of the other components, then set all_rounded to false.
# If you want to change the title of the component, then change the value for random_quote_title by changing what is red.
# If you don't want a title on the all rounded component, then just set random_quote_title to nothing, ie. ="";.
var bool all_rounded = true;
var string random_quote_title = "random lyrics";

# Define the quotes array and add some sample quotes.
# You can modify the quotes by replacing the ones below with whatever you like. You can also adding new lines by
# repeating the pattern and always making sure to increment each index by 1, starting from 0.
# Note that you can use html in these values.
var string[] quotes;
$quotes[0]=""" """;
$quotes[1]="""
""";
$quotes[2]=""""
""";
$quotes[3]=""" """;
$quotes[4]=""" """;
$quotes[5]=""" """;
$quotes[6]=""" """;
$quotes[7]=""" """;
$quotes[8]=""" """;
$quotes[9]=""" """;

# Pick one of the quotes randomly.
var int randquote;
$randquote = rand(0, ((size $quotes) - 1));

# Print the Random Quote Component.
if ($all_rounded) {
"""
<tr>
<td valign="top" rowspan="3" colspan="3" width="5"></td>
<td class=""></td>
<td valign="top" rowspan="3" colspan="3" width="5"></td>
</tr><tr>
<td class=""></td>
</tr><tr>
<td class=""></td>
""";
if ($random_quote_title!="") {
"""
</tr><tr>
<td class="" width="1"></td>
<td class="" width="1"></td>
<td class="" width="3"></td>
<td class="" width="100%">
$random_quote_title
<td class="" width="3"></td>
<td class="" width="1"></td>
<td class="" width="1"></td>
</tr><tr>
<td class="" colspan="7"></td>
</tr><tr>
<td class="" colspan="7"></td>
""";
}
"""
</tr><tr>
<td class="" width="1"></td>
<td class="" width="1"></td>
<td class="" width="3"></td>
<td class="" width="100%">
$quotes[$randquote]
<td class="" width="3"></td>
<td class="" width="1"></td>
<td class="" width="1"></td>
</tr><tr>
<td valign="top" rowspan="3" colspan="3" width="5"></td>
<td class=""></td>
<td valign="top" rowspan="3" colspan="3" width="5"></td>
</tr><tr>
<td class=""></td>
</tr><tr>
<td class=""></td>
</tr><tr>
<td colspan="5"></td>
</tr>
""";
} else {
print_comp_header($random_quote_title);
"""$quotes[$randquote]""";
print_comp_footer();
}
}


####BEGIN print_custom_head####
function Page::print_custom_head() {
"""

""";
} #end function#

#Once we've done that we can proceed to edit the entries so that they apply these new classes #and do all that stuff that we want them to ;).

### Override the printing of entries. This affects the Recent/Day pages, Friends pages, and Entry pages.
function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text) {


# Print the anchor to be used in the page summary.
if ($p.view=="friends") {
"""""";
} else { # for recent, day, entry pages.
"""""";
}

var string noscroll ;
if ($p.view == "recent" or $p.view == "friends") {
$noscroll = "class=\"fixed\"" ;
}

var string content_top = """<td class="" width="100%" valign="top">

[Error: Irreparable invalid markup ('<table [...] $noscroll>') in entry. Owner must fix manually. Raw contents below.]

why is it that when i try to click on "edit customizations" button, it will only refresh the page back to the customization main page?

i think it may have something to do with the codes i put in my customizations, but this has nothing to do with it right? someone please help! is it an LJ malfunction? or is it me?

these are the codes i have put in, (& they don't have any errors)...which i am still trying to edit because the components with music, etc won't show.

<lj-cut text="codes that i have so far">
<code>
layerinfo "type" = "theme";
layerinfo "name" = "Additional Customizations";

set lineheight = 15;

layerinfo "type" = "theme";
layerinfo "name" = "ricanprincesa customizations";

function Page::print_custom_head() {
"""
<style type="text/css">
body {
background-image: url(http://pictures.greatestjournal.com/userimg/2424176/78295) ;
background-repeat: no-repeat ;
background-attachment: scroll ;
background-position: top ;
margin-top: 381px ;
}
.header {
text-align: center;
}
</style>
""";
}

function page_layout(Page p) {
var string k1Swidth = "800px";


# 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($k1Swidth != "") {
"""<table style="border: 0px; margin: auto; padding: 0px; width:$k1Swidth;"><tr><td>""";
}

# If you want a picture to be at the top of your journal, edit and decomment this section.
# """<div align="center"><img src="url here" alt="caption here" title="caption here too" /></div>""";

# 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="http://www.livejournal.com/palimg/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="http://www.livejournal.com/palimg/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="http://www.livejournal.com/palimg/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="http://www.livejournal.com/palimg/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="http://www.livejournal.com/palimg/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>
""";
}
function print_profile(Page p) {

print_comp_header("about.the.girl.");
"""
<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"><img src="$p.journal.default_pic.url" width="$p.journal.default_pic.width" height="$p.journal.default_pic.height" border="0" /> </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><center><span class='ljuser' style='white-space:nowrap;'><a href='http://www.livejournal.com/userinfo.bml?user=ricanprincesa&mode=full'><span class='ljuser' style='white-space:nowrap;'><a href='http://www.livejournal.com/userinfo.bml?user=ricanrpincesa&mode=full'><b>ricanprincesa</b></a></span>
<a
href="http://www.livejournal.com/users/ricanprincesa"></a></span></div></center>
<div align="center">
<div><table><tr><td><img src="http://www.aol.com/aim/gr/online.gif" alt="" style="border: 0;" />
<a href="aim:goim?screenname=lauramelanie28 "><b>lauramelanie28</b></a>
</td></td>
</table></div>

</div>


<div><b>Name:</b> laura melanie</div>
<div><b>Age:</b> 22</div>
<div><b>Location:</b> texas</div>
<div><b>Status:</b> happily taken <img src=http://pictures.greatestjournal.com/userimg/2550434/78295></div>
<div><b>Loves:</b> GOD, life, family, friends, my boyfriend, houston, california, traveling, starbucks frapuccinos, chocolate,
sunrise, palm trees, the beach, puerto rico, my big fat greek wedding, shrek, the notebook, mean girls, lindsay lohan,
ashlee & jessica simpson, jlo, eva longoria, will & grace, six feet under, desperate housewives, late nite w/conan o'brien..
</td>
</tr>
</table>
""";
print_comp_footer();
}

function print_free_text(Page p) {

print_comp_header("obsessions");

"""

<div id="Layer1" style="border:0px solid #CCCCCC; position:relative;
width:100%; height:60px; z-index:1; overflow: auto; overflow-x: hidden;
scrollbar-3dlight-color: #CCCCCC; scrollbar-3dlight-color: #CCCCCC;
scrollbar-arrow-color: #FF33FF; scrollbar-base-color: #CCCCCC;
scrollbar-darkshadow-color: #CCCCCC; scrollbar-face-color: #CCCCCC;
scrollbar-highlight-color: #CCCCCC; scrollbar-shadow-color: #CCCCCC;">
<table width="100%" cellpadding="3" cellspacing="0">
<tr bgcolor="#CC0000">
<td align="left">
<img
src="http://quiet-cadence.org/lj/layouts/sarah/obsess_eva.png"border="0"
style="border: 1px solid #7f6029" /></td>
<td align="left"><b>eva longoria</b><br><i>true beauty</i><br>&nbsp;</td>
</tr>

<tr bgcolor="#FFCCCC">
<td align="left">
<a
href=""><img
src="http://tiger.towson.edu/~rcintr1/chicacintron/layout/tv/2.jpg"
border="0" style="border: 1px solid #7f6029" /></td>
<td align="left"><b>Desperate Housewives</b><br><i>everyone has a little dirty laundry</i><br>&nbsp;</td>
</tr>

<tr bgcolor="#CC0000">
<td align="left">
<a
href=""><img
src="http://tiger.towson.edu/~rcintr1/chicacintron/layout/tv/5.jpg"
border="0" style="border: 1px solid #7f6029" /></td>
<td align="left"><b>Will & Grace</b><br><i>luv this show~</i><br>&nbsp;</td>
</tr>

<tr bgcolor="#FFCCCC">
<td align="left">
<a
href=""><img
src="http://pics.livejournal.com/jadedmisery/pic/0000htxp"
border="0" style="border: 1px solid #7f6029" /></td>
<td align="left"><b>Charmed</b><br><i>season seven</i><br>&nbsp;</td>
</tr>

<tr bgcolor="#CC0000">
<td align="left">
<a
href=""><img
src="http://img106.exs.cx/img106/6158/ob1.gif"
border="0" style="border: 1px solid #7f6029" /></td>
<td align="left"><b>Christina</b><br><i>beautiful</i><br>&nbsp;</td>
</tr>

<tr bgcolor="#FFCCCC">
<td align="left">
<a
href=""><img
src="http://img113.exs.cx/img113/3428/album2.gif"
border="0" style="border: 1px solid #7f6029" /></td>
<td align="left"><b>Gwen Stefani</b><br><i>super hot female</i><br>&nbsp;</td>
</tr>

</tr>
</table>

</div>

""";
print_comp_footer();
# Determine the colouring for the rounded corners based on the actual page colours. Do not change.
# You only need one copy of these four lines per function, so if you already have it in the function you place this code
# in, then you can remove these four lines since the variable will already be defined. Make sure that the lines appear
# before any code which uses the $corner_color variable.
var Color header = $*header_bgcolor;
var Color headerMinus5 = $header->darker(50);
var Color headerPlus3 = $header->lighter(30);
var string corner_color = "/p0"+$headerPlus3->substr(1,6)+"1"+$headerMinus5->substr(1,6)+"2"+$header->substr(1,6);

# Set properties that will be used to determine how the component prints.
# If you want the component to look like one of the other components, then set all_rounded to false.
# If you want to change the title of the component, then change the value for random_quote_title by changing what is red.
# If you don't want a title on the all rounded component, then just set random_quote_title to nothing, ie. ="";.
var bool all_rounded = true;
var string random_quote_title = "random lyrics";

# Define the quotes array and add some sample quotes.
# You can modify the quotes by replacing the ones below with whatever you like. You can also adding new lines by
# repeating the pattern and always making sure to increment each index by 1, starting from 0.
# Note that you can use html in these values.
var string[] quotes;
$quotes[0]=""" """;
$quotes[1]="""
""";
$quotes[2]=""""
""";
$quotes[3]=""" """;
$quotes[4]=""" """;
$quotes[5]=""" """;
$quotes[6]=""" """;
$quotes[7]=""" """;
$quotes[8]=""" """;
$quotes[9]=""" """;

# Pick one of the quotes randomly.
var int randquote;
$randquote = rand(0, ((size $quotes) - 1));

# Print the Random Quote Component.
if ($all_rounded) {
"""
<tr>
<td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-top-left.gif$corner_color" width="5" height="5" alt="" border="0" /></td>
<td class="dkLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-top-right.gif$corner_color" width="5" height="5" alt="" border="0" /></td>
</tr><tr>
<td class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
</tr><tr>
<td class="tabBg"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
""";
if ($random_quote_title!="") {
"""
</tr><tr>
<td class="dkLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td class="ltLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td class="tabBg" width="3"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
<td class="tabBg" width="100%">
<span class="sideHeader">$random_quote_title</span>
<td class="tabBg" width="3"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
<td class="ltLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td class="dkLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
</tr><tr>
<td class="medLine" colspan="7"><img src="http://test.livejournal.org/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
</tr><tr>
<td class="dkLine" colspan="7"><img src="http://test.livejournal.org/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
""";
}
"""
</tr><tr>
<td class="dkLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td class="ltLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td class="tabBg" width="3"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
<td class="tabBg" width="100%">
<span class="randomquote">$quotes[$randquote]</span>
<td class="tabBg" width="3"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
<td class="ltLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td class="dkLine" width="1"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
</tr><tr>
<td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-bottom-left.gif$corner_color" width="5" height="5" alt="" border="0" /></td>
<td class="tabBg"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
<td valign="top" rowspan="3" colspan="3" width="5"><img src="http://www.livejournal.com/palimg/component/curve-bottom-right.gif$corner_color" width="5" height="5" alt="" border="0" /></td>
</tr><tr>
<td class="ltLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
</tr><tr>
<td class="dkLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
</tr><tr>
<td colspan=5><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="3" alt="" border="0" /></td>
</tr>
""";
} else {
print_comp_header($random_quote_title);
"""<span class="randomquote">$quotes[$randquote]</span>""";
print_comp_footer();
}
}


####BEGIN print_custom_head####
function Page::print_custom_head() {
"""
<style media="screen" type="text/css">

table.fixed
{
table-layout:fixed;
}
div.scrollentry
{
width:100%;
overflow:auto;
height: 195px;
padding-bottom:17px;
}
</style>
""";
} #end function#

#Once we've done that we can proceed to edit the entries so that they apply these new classes #and do all that stuff that we want them to ;).

### Override the printing of entries. This affects the Recent/Day pages, Friends pages, and Entry pages.
function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor, bool hide_text) {


# Print the anchor to be used in the page summary.
if ($p.view=="friends") {
"""<a name="$e.journal.username$e.itemid"></a>""";
} else { # for recent, day, entry pages.
"""<a name="item$e.itemid"></a>""";
}

var string noscroll ;
if ($p.view == "recent" or $p.view == "friends") {
$noscroll = "class=\"fixed\"" ;
}

var string content_top = """<td class="entryHolderBg" width="100%" valign="top">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="100%">
<table cellspacing="0" cellpadding="0" border="0" width="100%" $noscroll>
<tr>
<td width="1" class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td width="1" class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
</tr>
<tr>
<td width="1" class="medLine"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td class="entry">
""";

# Print the header for the entry. It prints in the default form "[<icon> ]<time> <date>" where:
# <icon> is the security icon (ie. lock if protected, eye if private, or none if public)
# <time> is in the default time format (eg: 03:46 am)
# <date> is bold and in the "long" format (eg: November 25th, 2003)
# The ordering can be adjusted however needed, and you can also modify the formats that date and time print in.
# This can all be done in the red section below. For specifications of available formats or how to construct
# your own formats, you can see: http://www.livejournal.com/doc/s2/siteapi.core1.html#siteapi.core1.dateformats
print_entry_header((defined $e.security_icon?"$e.security_icon ":"")+$e.time->time_format()+" <b>"+$e.time->date_format("long")+"</b>");

print_system_box_top();
"""<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>""";

# Check to see if we need to display a usericon and/or journal names, and if so, then print them
# Cases - 1. We are viewing a friends page, so we need to display icons if they exist and journal/poster names
# 2. We are viewing a recent/day/entry page, so we display only the icon if it exists and
# the user has set recent userpics on.
# The code in red is the logic to decide whether or not to show the userpics. You can modify it as you see fit.
if ($p.view=="friends" or ($*show_entry_userpic and defined $e.userpic) or $e.journal.journal_type=="C") {
# Start the table that will hold the icon and/or names
"""
<td valign="top" style="padding-right: 8px;">
<table cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
</tr>
""";
# Display the icon if it exists
if (defined $e.userpic) { """
<tr>
<td><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="2" alt="" border="0" /></td>
""";
# If we are on the friends view, then we want to print the extra border around the image that have the colors
# which are custom defined. If you don't like the colors or the border on the friends view, then you can just
# remove the blue segments. By default the recent/day/entry pages have a border around the usericons. If a user
# has a non-rectangular image, this may look strange, so you can replace the 1 with a 0 to remove the border.
#
if ($p.view=="friends") {
""" <div style="padding-top: 3px; padding-left: 3px; padding-right: 3px; padding-bottom: 3px; background-color: """; print $bgcolor.as_string; """ ;" align="center">
<img border="1" src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="" style="border-color: """; print $fgcolor.as_string; """ ;" />
</div> """;
}else{
""" <td align="center" class="userpic"><img border="1" src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="" /></td> """;
}
"""
</tr>
"""; }
# Display the journal and possibly poster name if we are viewing the friends page or any page on a community
# This code will print the journal the entry was made on, and if the poster is different, will print the poster under it.
# I made the names centered under the image, but if you want to keep them left aligned as in the original, then
# remove the blue segments
if ($p.view=="friends" or $e.journal.journal_type=="C") { """
<tr>
<td><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="2" alt="" border="0" /></td>
<td align="center" class="ljuser">$e.journal""";
if ($e.journal.username!=$e.poster.username) {"""
<div align="center" class="ljuser">$e.poster</div>""";
} """
</td>
</tr>""";
}
"""
</table>
</td>
"""; }

# Start the main entry text area.
#ATTENTION ALL THOSE ALREADY USING THE PRINT_ENTRY FUNCTION
#YOU HAVE TO REPLACE THIS PART OF YOUR CODE, NOT JUST ADD IT OR IT WON'T WORK.
print $content_top;

# If the subject is not empty, then print it followed by the line to seperate it from the entry text
# You can modify the lines in red if you want to adjust the way your subject prints, but the other lines must remain as is.
if ($e.subject!="") { """
<div class="entryHeader">$e.subject</div>
<div class="entryDash"><img src="http://www.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></div>
</td>
<td width="1" class="medLine"><img src="http://stat.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
</tr>
<tr>
<td width="1" class="medLine"><img src="http://stat.livejournal.com/palimg/component/clear.gif" width="1" height="1" alt="" border="0" /></td>
<td class="entry">
"""; }

"""<div class="scrollentry">""";
# Print the entry text.
# If you want the entry text to be after the mood and music, then you need to do two things:
# - decomment the pink lines by removing the #'s from in front of them
# - comment out the blue lines by putting a # in front of them
""" $e.text """;

# Print Mood and/or Music Fields:
# If we have a mood to print
if ($e.metadata{"mood"}!="") {
# first we need a spacer after the entry text
"""<br/><br/>""";
# and then we print the mood label, followed by a mood icon if one exists, followed by the mood text.
# If you want the mood icon to be after the mood text, then you need to change the order of the two lines in red.
"""<b> $*text_meta_mood : </b>""";
if (defined $e.mood_icon) { """ $e.mood_icon """; }
print $e.metadata{"mood"};
"""<br/>""";
# if ($e.metadata{"music"}=="") { """<br/>"""; }
}
# If we have music to print
if ($e.metadata{"music"}!="") {
# If we didn't print a spacer because the mood was empty, then print one
if ($e.metadata{"mood"}=="") { """<br/><br/>"""; }
# then print the actual music label and the music
"""<b> $*text_meta_music : </b>"""; print $e.metadata{"music"};
# """<br/><br/>""";
}

# """ $e.text """;

# Close off the entry text area
"""</div>""";
print_content_bottom();

# This is where the fun stuff is!
# Now we begin the area underneath the entry that holds the comments, link, and entry related buttons.
"""
<table width="100%">
</tr>
<td width="50%" align="left" valign="center">
<div class="entryComments">
""";
# First we print the comment links if the entry allows comments
if ($e.comments.enabled) {
$e.comments->print();
}
"""
</div>
</td>
<td align="center" valign="center">""";
# Then print a permanent link to the entry.
# I have this because I have my journal set to display comment links with "?nc=XX" tacked onto the end,
# and when I'm copying and pasting links, it's annoying to have there. Also, if you want a link to
# an entry that has no comments yet, the only link that's shown by default is the reply to link, and that
# that includes "?mode=reply" which is also annoying to have to remove.
# Essentially this is here for convenience. If you don't want it, remove the blue segment.
"""
<div class="entryComments"><span style="white-space:nowrap;"><b>( <a href="$e.permalink_url" class="commentLinks">$*text_permalink</a> )<b></span></div>
</td>
<td width="50%" align="right" valign="center">""";
# Then the entry related buttons
"""<div class="entryComments">
""";
# The easiest way to do this, which will work for all account types, is as follows, and will display actual buttons.
# If you'd like text instead of buttons, then remove the following line in blue, decomment the lines in pink,
# and edit as you see fit. Note that using the print_linkbar function will also add next and previous buttons to the
# Entry page (with comments), and I've reflected that in the pink lines below.
$e->print_linkbar();

# var Link prevlink = $e->get_link("nav_prev");
# if ($p.view=="entry" and defined $prevlink and $prevlink.url!="") { """<a href="$prevlink.url"><img border='0' width="$prevlink.icon.width" height="$prevlink.icon.height" alt="" src="$prevlink.icon.url" /></a>"""; }
# var Link editlink = $e->get_link("edit_entry");
# if (defined $editlink and $editlink.url!="") { """<a href="$editlink.url"><img border='0' width="$editlink.icon.width" height="$editlink.icon.height" alt="" src="$editlink.icon.url" /></a>"""; }
# var Link memlink = $e->get_link("mem_add");
# if (defined $memlink and $memlink.url!="") { """<a href="$memlink.url"><img border='0' width="$memlink.icon.width" height="$memlink.icon.height" alt="" src="$memlink.icon.url" /></a>"""; }
# var Link nextlink = $e->get_link("nav_next");
# if ($p.view=="entry" and defined $nextlink and $nextlink.url!="") { """<a href="$nextlink.url"><img border='0' width="$nextlink.icon.width" height="$nextlink.icon.height" alt="" src="$nextlink.icon.url" /></a>"""; }
"""
</div>
</td>
</tr>
</table>
""";

# End the entry component and put a spacer after it so that entry components are seperated.
"""</tr></td></table>""";
print_system_box_bottom();
""" <div><img src="http://www.livejournal.com/palimg/component/clear.gif" width="3" height="3" alt="" border="0"></div> """;

} # end of Function print_entry
</code>
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments