UPDATE (2008/04/25): The print_comment() function in this post has been updated to allow the use of the "expand comments" link, which was previously unavailable in custom layers.
In response to
this post by
lollobrigida, these functions will add pop-ups or "tooltips" to entries and comments when hovering over user icons. Now more standards compliant! This
(
Read more... )
Comments 15
S2 Compiler Output at Wed Dec 19 21:37:29 2007
Error compiling layer:
Compile error: line 708, column 38: Unknown function have_collapsed(Comment)
S2::NodeTerm, S2/NodeTerm.pm, 196
S2::NodeTerm, S2/NodeTerm.pm, 66
S2::NodeLogAndExpr, S2/NodeLogAndExpr.pm, 47
S2::NodeExpr, S2/NodeExpr.pm, 46
S2::NodeIfStmt, S2/NodeIfStmt.pm, 79
S2::NodeStmtBlock, S2/NodeStmtBlock.pm, 101
S2::NodeIfStmt, S2/NodeIfStmt.pm, 92
S2::NodeStmtBlock, S2/NodeStmtBlock.pm, 101
S2::NodeFunction, S2/NodeFunction.pm, 230
S2::Checker, S2/Checker.pm, 353
S2::Compiler, S2/Compiler.pm, 34
Context
704: print lang_posted_by_date_and_time($e, false, true, true);
705:
706: var Link expand_link;
707: $expand_link = $e->get_link("expand_comments");
708: if (defined $expand_link and have_collapsed($e)) {
709: """ $*text_expand_link """;
710: }
711:
712: if (size($e.replies) > 0) {
Reply
Reply
Reply
Reply
When we wasn't allowed to use expanding comments in custom layers the text for the link was just written in EntryPage::print_comment function. So it was quite easy to create an option called something like text_expand_link and modify put a reference in expand link generation code. But when they made it possible to use expander in custom layers, link generation became too complicated for my understanding))
var Link expand_link = $e->get_link("expand_comments");
if ($e.thread_url != "" and defined $expand_link) {
" " + $e->expand_link({ "class" => "collapsed-comment-link" });
}
For example, what should I change in the code above to generate links like "show the thread"?
Reply
Reply
Leave a comment