Dec. 22nd, 2019
Fixing Comment Links on Perm Account Layout
I've gone through and set "disable custom comment pages" to "No" and haven't - as far as I know - touched anything else that would relate in an obvious way to this issue. However, even with custom comment pages enabled on my journal, I'm getting "?style=mine" placed into the links for number of comments on a post. Which, yeah, works fine for me, but anyone else who views will get their own journal layout or the generic IJ post layout depending if their account is free or paid (I tested this with one of my free accounts and confirmed).
Since I know it can be stopped - this community's layout doesn't tack "?style=mine" into the comment page urls, for example - I'm hoping someone can tell me how to stop it. I initially thought it might be related to enabling the navstrip on my journal, but disabling it didn't fix the issue when testing.
Since I know it can be stopped - this community's layout doesn't tack "?style=mine" into the comment page urls, for example - I'm hoping someone can tell me how to stop it. I initially thought it might be related to enabling the navstrip on my journal, but disabling it didn't fix the issue when testing.
Comments
The short answer is: You can't turn it off. It would have to be done for your journal via the theme layers. If you don't have a paid or permanent account, that's kind of the end of that. If you do, you can add the following in your theme layers and delete the highlighted parts to remove the URL string permanently from your journal:
Entry Header:
function print_entry(Page p, Entry e) {
oster, $e.journal)+"</span>"; }
oster, $e.journal)+"</span>"; } y_icon</span> ";
oster, $e.journal)+"</span>"; }
var string subject = "";
if ($e.subject != "") { $subject = $e.subject; }
else { $subject = $*text_no_subject; }
"<div class='entry'" + ($e.dom_id ? " id='$e.dom_id'" : "") + ">\n";
"<div class='entry-inner'>\n";
var bool showtime = $*opt_showtime;
var bool showdate = not $*opt_datehead;
var bool showposter = false;
var bool showuserpic = $*opt_userpic_main;
if ($p.view == "friends") { $showtime = $*opt_showtime; $showdate = true; $showposter = true; $showuserpic = $*opt_userpic_friends; }
if ($p.view == "day") { $showdate = false; }
if ($p.view == "entry" or $p.view == "reply") { $showdate = true; }
if ($p.view == "recent") { $showdate = true; }
if ($p.view == "entry") { $showuserpic = $*opt_userpic_entrypage; }
if (not $e.poster->equals($e.journal)) { $showposter = true; }
if (($showuserpic and defined $e.userpic) or $showposter) {
"<div class='outer-entry-userpic'>";
if ($showuserpic and defined $e.userpic) { "$e.userpic"; }
if (($showuserpic and defined $e.userpic) and $showposter) { "<br />"; }
if ($showposter) { "<span class='pic-poster'>"+lang_posted_by($e.p
"</div>\n";
}
"<div class='entry-header'><div class='entry-header-inner'>\n";
if (($showuserpic and defined $e.userpic) or $showposter) {
"<div class='mid-entry-userpic'>";
if ($showuserpic and defined $e.userpic) { "$e.userpic"; }
if (($showuserpic and defined $e.userpic) and $showposter) { "<br />"; }
if ($showposter) { "<span class='pic-poster'>"+lang_posted_by($e.p
"</div>\n";
}
"<h3>";
if (defined $e.security_icon) {
print "<span class='lj-entry-securityicon'>$e.securit
}
"<a href='$e.permalink_url?style=mine'>$subject</a></h3>\n";
"</div></div>\n";
if ($showposter) {
"<div class='header-poster'>";
print lang_posted_by($e.poster, $e.journal);
#removed $this from both lang_posted_by, no clue why compiler choked on it
"</div>";
}
if ($showdate or $showtime) {
"<div class='entry-datetime'>";
print lang_posted_date_and_time($e, $e.time, $showdate, $showtime);
"</div>";
}
"<div class='entry-content'>\n";
"<div class='entry-body'>\n";
"<div class='entry-text'>\n";
if (($showuserpic and defined $e.userpic) or $showposter) {
"<div class='inner-entry-userpic'>";
if ($showuserpic and defined $e.userpic) { "$e.userpic"; }
if (($showuserpic and defined $e.userpic) and $showposter) { "<br />"; }
if ($showposter) { "<span class='pic-poster'>"+lang_posted_by($e.p
"</div>";
}
$e->print_text();
"</div>";
"<div class='entry-metadata'>";
$e->print_metadata();
"</div>\n";
"</div>\n";
$e->print_linkbar();
"</div>\n";
"<div class='entry-footer'></div>\n";
"</div>\n";
"</div>\n";
}
function Entry::print_linkbar() {
_read_comments"); """</a></li>"""; /a></li>""";
var Page p = get_page();
var bool printqr = false;
"""
<div class="entry-linkbar"><ul>
""";
if ($.comments.enabled) {
$printqr = true;
"""<li class="first-el">"""; $p->print_reply_link({"linktext" => $*text_post_comment, "target" => "qr$.journal.username$.itemid", "reply_url" => $.comments.post_url}); """</li>""";
if ($.comments.count > 0 or $.comments.screened) {
"""<li><a href="$.permalink_url?style=mine#comments">"""; print safe get_plural_phrase($.comments.count,"text
#href was .comments.read_url
}
}
print safe """<li><a href="$.permalink_url">$*text_permalink<
var string{} link_caption = {
"edit_entry" => $*text_edit,
"edit_tags" => $*text_edittag,
"mem_add" => $*text_add_to_memories,
"tell_friend" => "$*text_tell_friend",
"watch_comments" => $*text_track_comments,
"unwatch_comments" => $*text_untrack_comments,
};
var Link link;
var string url;
var string text;
foreach var string link_key ($.link_keyseq) {
$link = $this->get_link($link_key);
$url = $link.url;
$text = $link_caption{$link_key} != "" ? $link_caption{$link_key} : $link.caption;
if (defined $link) {
print safe """<li><a href="$url">$text</a></li>""";
}
}
"""
</ul></div> <!-- entryLinkbar -->
""";
if ($printqr) { $p->print_reply_container({"class" => "quickreply_entry", "target" => "qr$.journal.username$.itemid"}); }
}
Can't help but wonder if it was supposed to be conditional formatting based on the "disable custom comment pages" option or if it was an intentional break point for if someone had a really terrible layout with improperly styled comments. But either way, it's super annoying.
But yeah, that might be! There's a lot of incomplete stuff hidden around haha.