red wolf (redwolf) wrote in s2expressive,
red wolf
redwolf
s2expressive

[Done] Linkbar: Adding Next and Previous Links

For some reason the developers have seen fit to yank the previous and next links out of the linkbar for individual entries. This is extremely annoying.

Does anybody know how to either turn them back on or hard code them into the linkbar?

Update: Solved by the always amazing kunzite1.

############################################
# settings to change the default link text #
############################################

set text_edit_entry		= "Edit Entry";
set text_edit_tags		= "Edit Tags";
set text_mem_add		= "Add to Memories";
set text_watch_comments		= "Track This";
set text_unwatch_comments	= "UnTrack This";
set text_permalink		= "Link";
set text_entry_prev		= "Previous";
set text_entry_next		= "Next";

#####################################
# linkbar customisation by kunzite1 #
#####################################

function Entry::print_linkbar() {
    var Link link;
    var string url = "";
    var string text = "";
    var string link_key = "";

    print """<div class="asset-meta">\n""";
    print """<ul class="asset-meta-list">>\n""";

    $.comments->print();

    var string{} link_caption = {
        "edit_entry"       => $*text_edit_entry,
        "edit_tags"        => $*text_edit_tags,
        "mem_add"          => $*text_mem_add,
        "watch_comments"   => $*text_watch_comments,
        "unwatch_comments" => $*text_unwatch_comments,
        "nav_prev"         => $*text_entry_prev,
        "nav_next"         => $*text_entry_next,
    };

    foreach $link_key ($.link_keyseq) {
        $link = $this->get_link($link_key);
        if (defined $link) {
            $url = $link.url;
            $text = $link_caption{$link_key} != "" ? $link_caption{$link_key} : $link.caption;
            print """<li class="asset-meta-comments item asset-meta-no-comments"><a href="$url">$text</a></li>""";
        }
    }

    var Page p = get_page();
    if(($p.view == "entry") or ($p.view == "reply")) {
        foreach $link_key (["nav_prev", "nav_next"]) {
            $link = $this->get_link($link_key);
            if (defined $link) {
                $url = $link.url;
                $text = $link_caption{$link_key} != "" ? $link_caption{$link_key} : $link.caption;
                print """<li class="asset-meta-comments item asset-meta-no-comments"><a href="$url">$text</a></li>""";
            }
        }
    }

    print """<li class="asset-meta-comments item asset-meta-no-comments"><a href="$.permalink_url">$*text_permalink</a></li>""";
    println "\n</ul>\n</div>\n";
}
Tags: !obsolete, entries:linkbar, page:skiplinks, s2:theme layer
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 7 comments