?

Log in

No account? Create an account
LiveJournal Likes? - 'Twas brillig, and the slithy toves did gyre and gimble in the wabe — LiveJournal [entries|archive|friends|userinfo]
Thomas

[ website | Beware the Jabberwock... ]
[ deviantArt | the-boggyb ]
[ FanFiction | Torkell ]
[ Tumblr | torkellr ]

Links
[Random links| BBC news | Vulture Central | Slashdot | Dangerous Prototypes | LWN | Raspberry Pi]
[Fellow blogs| a Half Empty Glass | the Broken Cube | The Music Jungle | Please remove your feet | A letter from home]
[Other haunts| Un4seen Developments | Jazz 2 Online | EmuTalk.net | Feng's shui]

LiveJournal Likes? [Sunday 4th December 2016 at 9:05 pm]
Thomas

boggyb
[Tags|, ]
[Feeling |annoyedannoyed]
[Playing |2]Whistler's Bride ~ Warder/The Feadanaigh Epic [whistler's bride.it]]

Okay, how do likes work on LiveJournal? All I get is an email saying:

"1 user(s) likes this - http://boggyb.livejournal.com/488309.html"

As best as I can tell that's it. I can't see how many likes I have on an entry (for that matter I don't even have a like button), and the like statistics page is empty.

The FAQ does say that this needs the new design and one of the new styles - but I still don't see like buttons even after switching to the new site design (which I'd prefer not to use as it's fallen into the trap of assuming that everything has to be designed for mobile - Vertigo is a far more useful scheme with the left-hand link bar and the smaller journal banner) and previewing my journal in the Air style.

Oh, wait, but if I try the Expressive style then it does appear (so much for that FAQ claiming that Air supports this). Interesting. It seems like there's an entirely new function to generate the likes button:

var int likus_journal_id = $.journal.userid;
var int likus_post_id = $.itemid;
var string likus_url = $.permalink_url;

print get_lj_entry_likus("li", "asset-meta-likus item", $likus_journal_id, $likus_post_id, $likus_url);


And that looks is implemented in the base layer as:

function get_lj_entry_likus(string tag, string class, int journal_id, int post_id, string post_uri) : string {

    # LJSUP-24066
    if( not is_likes_display() ) {
        return "";
    }

    # for js LJSUP-18559
    return """<""" + $tag + """ class="$class" lj-likus lj-likus-journal="$journal_id" lj-likus-item="$post_id" lj-likus-uri="$post_uri"></""" + $tag + """>""";

}


Hmm... I wonder if I can hack it into my S2 style? All this does is add a placeholder HTML element so it would seem the actual like button is generated with Javascript - which is a bit annoying as that makes it hard to customise. I might be able to do something with suitably crazy CSS hackery.

Not that such a feature should need a new journal style anyway. S2 is designed to cope with new features without needing all styles to be redesigned - for example, the way the per-entry links work ("Edit Entry", "Add to Memories", "Share" and so on) is that the S2 engine provides a list of actions and a function to generate each link. So adding a new one is straightforward, and unless the style writer has gone for an entirely custom layout ignoring this list then it will Just Work.

Sigh. It does annoy me that the current trend in, well, everything computing-related is to remove open-ended customisability because maintaining it requires effort, and that sounds too much like actual work compared to rewriting everything in the latest shiny framework.
Link | Previous Entry | Share | Next Entry[ 4 pennies | Penny for your thoughts? ]

Comments:
[User Picture]From: flippet
Tuesday 17th January 2017 at 7:41 pm (UTC)
Oh, thanks for the reply!

So, in theory, it ought to show you a list of *who* liked the post.

Hmm. That *might* be worth tinkering with it a bit myself.

Thanks for the code info, too - I can mess with the code with some hand-holding, but wouldn't have known where to start on my own. :-)
(Reply) (Parent) (Thread)
[User Picture]From: reecord2
Friday 26th July 2019 at 5:42 pm (UTC)
hello from 2019! I also just received and email letting me know someone 'liked' an entry of mine and I have no idea how to see it. So take comfort in knowing 3 years later this is still an issue.
(Reply) (Parent) (Thread)