Log in

.:::.:. .::.

July 2010
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

voressima [userpic]
Header images for sidebar boxes and entry link separator

I am currently in the process of making a new layout for a friend, and just like every other time I made something new in opal, I came across some issues.

(I really need to learn to stick to just changing colors and slapping a new header on a layout that already works!)

Problem 1: in the sidebar, all boxes have a little header image instead of the plain, standard bolded text title. However, I can't get this for the link list and the page summary. The only piece of code I have on those is $this->lay_print_summary(); and $this->print_linklist();, so, eh, not a lot to work with. Does someone know of any extended code for those, one where I can define a header image etc?

I want to somehow be able to get the "Links" to look like the other titles in the sidebar.

(I never use the page summary and go into the raw source code to add links instead of somehow retreiving the data from the default link list, so it's never been an issue before...)

Problem 2: Details, details... But I'd really like to be able to have my entry links separated by a simple character, "|" or ":", haven't decided yet. Something like this:

comment | edit entry | edit tags

There seems to be a piece of code for that under Entry::print_linkbar(), but when I put a "|" in the spot where I think it should go, it doesn't show up. I probably put it in the wrong place or something :/ (It's also not a color-issue, such as black on black and therefore not being visible. I checked by making my the background color of my entries something bright and nasty)

My code (work in progress):

Thanks in advance!


This should fix #1:

If all you see in a Theme layer is something like $this->, it's calling code from somewhere else. In this case, it's drawing code from the Source Layer. You are usually safe in grabbing the source code to edit. That is what's included in the edited code below.

You'll probably have to mess with the CSS or code to make the Summary look ok (it currently cuts text off). You'll also have to change the images for the Summary and Link List.

Add this:

And this should fix # 2:

The issue was that there were 2 bits of code trying to control the linkbar (one in Entry::print_linkbar() and the other in Page::print_entry(). Since Entry::print_linkbar() is what you want (and it's much user friendly to customize), I got rid of the other one.

I also added CommentInfo::print_readlink and CommentInfo::print_postlink because Entry::print_linkbar() does not control the # comments/comment part. I added the "|" in those sections to make the entry links all look uniform.

Add this:

Replace Page::print_entry() with this:


My dear Julz, as per usual, you totally rock! :D Both solutions worked like a charm (and after some slightly frustrating tinkering, managed to whip the summary into playing nice and staying within the confines of the sidebar). Thanks a million!

Everyone using Opal owes you so much cookies, you'd better invest in a elastic waistband pair o'pants right now! ;)

Edited at 2010-07-19 06:05 pm (UTC)