?

Log in

No account? Create an account

Previous Entry | Next Entry

I was wondering if it would be possible to do this in Expressive/Mixit? Just adding a link to the comment bar that would work similiar to the permalink, but maybe show the layout in a different style? For example, it would show any entry in ?format=light, or ?s2id=numberofstylehere .

Comments

( 2 comments — Leave a comment )
av8rmike
Jul. 6th, 2007 09:16 am (UTC)
This is a lot easier in Expressive than Flexible Squares, just because the print_linkbar() function is pretty straightforward. Rather than having yet another link to the entry, I just changed the "Link" permalink to the light-formatted entry. The entry title and "# comments" already link to the default formatted entry. To change the displayed text add this line somewhere to the theme layer and edit the blue text:
set text_permalink = "Link";
function Entry::print_linkbar() {
    var Link link;
    var string url = "";
    var string text = "";
    var bool light_format = true; # Set to false for default formatted entry view.

    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,
    };

    var string permalink_suffix = $light_format ? "?format=light" : ""; # Could also use "?s2id=xxxxxxxx"
    var string permalink_url = $.permalink_url + $permalink_suffix;

    foreach var string 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 safe """<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";
}
bibliotech
Jul. 6th, 2007 03:25 pm (UTC)
Thank you so much! Worked like a charm.
( 2 comments — Leave a comment )

Latest Month

March 2016
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

S2 Help Communities

Tags

Powered by LiveJournal.com
Designed by chasethestars