September 3rd, 2006

sun

Bug Fix: Customising Text

To the writers of the original layout code...

Almost all the text for the layout is customisable through the generic Edit Journal Style GUI interface (such as text for comments, etc.) except the text for the Permalink at the bottom of entries and the Reply, Parent and Thread text on comments. These can be made to appear along with the other customisations by putting:

property use text_permalink ;
property use text_comment_reply ;
property use text_comment_parent ;
property use text_comment_thread ;

into propgroup text { }.
green man

How To Change Background Images (css)

The background of the page as a whole (i.e. under the central content strip) can be changed using the body tag:

body {
background-color: #fef9d2;
background-image: url("http://www.sampleurl.com/background.jpg");
background-repeat: repeat-x ;
background-attachment: fixed ;
}

In this case, I have used a gradient background, which is a thin vertical strip image repeated in the x-direction and fixed, with the underlying colour the same as the bottom of the gradient to blend in smoothly.

You can also change the background of the sidebar(s). Use:

.layout-wt #content-inner {
background-image: url("http://www.sampleurl.com/background.jpg");
}

.layout-tw #content-inner {
background-image: url("http://www.sampleurl.com/background.jpg");
}

These two will give you background images for single sidebar layouts on the right or left respectively. You can also use these to change the background colours of them. Again, you could use gradients if you like, remembering to specify the relevant positions and repeats of the background image strip.
green man

How To Change The Image Next To The Entry Title

Some layouts (such as Hills) have a little picture next to the entry title. This can be changed with:

.asset-stream .asset-header {
background: transparent url(post-ornament.gif) no-repeat scroll 0 0;
}

Replace post-ornament.gif with the address of your own image (remember to include http://) and put this in the Custom CSS area.

If you then need to move the entry title text over a bit due to overlapping, put these two lines into your Custom CSS:

h2.asset-name, .pageheader2 .asset-name-hover { margin-left: 36px; }
h2.asset-name, .pageheader2 { margin-left: 36px; }

Adjust the margin there as required.
green man

How To: Change The Date and Time Format

This can't be done with CSS - to do this you need to have a cutom layer or theme.

You need to change the lang_posted_by_date_and_time function, which is:

function lang_posted_by_date_and_time(EntryLite e, bool showposter, bool showdate, bool showtime) : string {
var string posted = "";
if ($showposter) {
var string posterstr = (defined $e.poster ? ""+$e.poster : """<i class="noposter">$*text_poster_anonymous</i>""");
if (not $showtime and not $showdate) {
return $posted;
}
}
if ($showdate and $showtime) {
if ($e.depth > 0) { # If $e is a comment
return $posted + $e->time_display("med", "");
} else {
return $posted + $e->time_display($*lang_fmt_date_med + " at %%h%%:%%min%% %%A%%M", "none");
}
}
if ($showdate and not $showtime) {
return $posted + $e->time_display("med", "none");
}
if (not $showdate and $showtime) {
return $e->time_display("none", "%%h%%:%%min%% %%A%%M");
}
return "";
}


In this, change these two lines:

return $posted + $e->time_display($*lang_fmt_date_med + " at %%h%%:%%min%% %%A%%M", "none");

return $posted + $e->time_display("med", "none");


, replacing $*lang_fmt_date_med with $*lang_fmt_date_med_day in the first and "med" with "med_day" in the latter.

This will give you the abbreviated day of the week at the start of the date and time. If you want the full day name, use $*lang_fmt_date_long_day and "long_day" respectively.

You can see all the date and time format options here.
  • nopsa

Link color issue

I've tried just about everything to change the color of the links at the bottom of my entries IE:(read 4 | comment | Edit |Tag | +Memo | Link).. I've customized everything else easily... the links on the rest of the page changed... but I just can't seem to get these to change from gray to something else. Help?

nopsa & I'm using urban sunset.