?

Log in

No account? Create an account
livejournal S2 style system blue
LiveJournal's S2 Styles
what am I missing? 
Feb 22nd, 2012 - 01:09 am
the queen is dead // aelunii
I'm looking at adding links to track and share an entry to an Opal-based theme - for example, the way Smooth Sailing says "previous | memories | share | track | flag | next" on each entry. Given I can't find any reference to previous/next (for entries themselves, not DayPage or MonthPage), tracking or sharing in the default layer for Opal, what does Opal use to display these, or is it that it actually doesn't support them? It seems like this is usually based on the Core function print_linkbar, but Opal doesn't reference this, and print_linkbar specifically doesn't do nav_next and nav_prev according to the Core. If I call print_linkbar, what exactly will show up? I'm not sure what it does contain by default, or how it's displayed. I can't just try it because I don't have a paid account; the layout is for someone else's account.

I'm also not sure I could lift the code wholesale from, say, the Smooth Sailing layer instead, because I don't know if it will actually compile when transplanted. Is there an s2 sandbox available anywhere? I know there was one back in the old, old days...probably approaching nine years ago. Ack.
Comments 
Feb 22nd, 2012 - 06:12 am (UTC)
Opal doesn't use the linkbar function, it creates each link manually. using the
$link = $e->get_link($key);
method. You'll find it in two places in Opal, in function Page::print_entry (Entry e) and in function ReplyPage::print_body(). These two function create the
Leave a comment   Edit Entry     Edit Tags     Add to Memories     Share     Track This     Link

that you see across the top of the entry when in Opal.

Smooth Sailing is written very differently than Opal. I don't think you'd be able to use the code without serious reworking, and at that point it's probably easier to write a fresh function.

I don't know if there's an S2 sandbox available. You'll need a paid account to create a new layer anyways, so when you do create it make it public and link it here; we can take a look at it then.
Feb 22nd, 2012 - 11:04 pm (UTC)
Thank you! I can work with that.

You don't need a paid account to edit a text file with a layer in it :) I built the layout ages ago and am just tweaking it.
This page was loaded Sep 17th 2019, 11:47 pm GMT.