Tutorial: How to Separate Entries in Opal

Jun 14, 2006 22:40

I promised a couple people that I'd tell them when I figured it out, so here you go!

Thanks for making things even easier, camomiletea. =D

Step 1:

Go to your stylesheet and find #content. Note the background color that is currently assigned.

Step 2:

Add a different background color than the one in #content and/or border or whatever you want to .entry in your stylesheet:

Note: I also added padding to mine because I liked the look with padding better than without.

Step 3:

Go to the Page::print_entry() part of your theme layer. You need to make sure all of the entry (including the metadata and entrylink bar) is within
.

IMPORTANT NOTE: kunzite1's version of halffling's code contains 2
's. One near the top of Page::print_entry and one surrounding $e->print_text();. In order for this to work, remove the 2nd one (don't forget to also remove the that closes it).

Remove the part of the code that is struck out and move the bolded from where it currently is, to the indicated spot. You do have an option, if you also want the 'back to top' link within the entry box, put the in the 2nd spot indicated below.

function Page::print_entry (Entry e) {

print """""";
var string time = $e.time->time_format();
var string date = $e.time->date_format();
var string security;
if ($e.security != "") {
$security = $e.security_icon->as_string();
}

var UserLite name;
var string pname;
var bool show_name = ($.view == "friends") or (not $e.poster->equals($e.journal));
var bool show_pic = (defined $e.userpic and ((not $e.poster->equals($e.journal)) or ($*show_entry_userpic)));

"""

""";
if($show_pic) {
"""



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

$subject

$security posted on: $date @ $time
""";
if($show_name) {
$this->lay_make_username($e);
}
var int count = 0;
var string tags = "";
var string tags_root = $.journal->base_url() + "/tag";
foreach var Tag t ($e.tags) {
$tags = $tags + """ $t.name""";
if(++$count < size($e.tags)) {
$tags = $tags + ", ";
}
}
if($tags != "" and $*tags_aware) {
$tags = "Tags: " + $tags;
}
"""

$tags

"""; $e->print_text(); """
""";
$e->print_metadata();
"""

<-- MOVE THIS FROM HERE

""";
$e.comments->print();
$e->print_linkbar();
"""

TO HERE

back to top

OR TO HERE
""";
}
Step 4:

Save and Compile.

It should then make your LJ all pretty. =D Go forth and separate!

Cross-posted to opal_help and julzroguenine

security:public, tutorials, lj:layout:opal, layout

Next post
Up