Fandom Developers Wiki
Advertisement

This is the talk page for discussing improvements to the LockOldComments page.

Feature suggestion- Make the reply button still appear for discussion mods, and administrators+[]

This would be very helpful Joshuabirger (talk) 15:48, 10 January 2022 (UTC)

Interesting. I feel like other admins and mods may not appreciate such change, as it can lead them to accidentally replying and breaking the rules they try to establish. Maybe we will wait for more feedback about it by admins from different wikis. Also, every admin must know how to temporarily disable scripts when the need arises :D Nam 23:22, 10 January 2022 (UTC)
disable how? using console/inspect element or safemode? Maybe make text on the bar saying, that its older than thirty days (like it was before) but now for admins its clickable, and you can still type. -Joshuabirger (talk) {Please tell me on my Talk Page if you reply to me}`
With either ?safemode=1 or ?usesitejs=0.
I can get that there may be a usecase for making it more easily available for admins, but the work to implement that is not trivial, so I would some it as "It's not something I'm currently planning of doing". If someone else wants to implement that change then I'm fine with it as long as some measure is kept to prevent an admin from replying to an old comment by accident.
Nam 21:48, 19 January 2022 (UTC)
Wow! I didn't know about (or I probably forgot) about ?usesitejs=0 to only disable JS! Now when I have special discussions that I want to keep open regardless of time, I edit that comment to add a link to it with the parameter added. Something like: "This is an old comment, but you can reply to it by clicking here". This can be VERY useful for wikis that use Comments to sort of replace the regular Fandom Discussions tool. Now, about the admins privilege, yeah, it already exists, through the URL parameters. I don't think it would add much to the script having an option for that. And I personally wouldn't like to have this option on the wikis I admin. If something was to be added in that direction, I'd like to have a separate support list containing the ID of all comments that should not be locked; the list itself editable by admins only, obviously. To lock a certain comment again, just remove its ID from the list. It could be like 1 ID per line, allowing us to include a text comment on that line after a double slash //, where admins could add any note like, the article where the comment is, or even the link to the comment. —Sapador Castelo 13:18, 22 September 2022 (UTC)
I've changed the script to not remove the post button but to hide it instead which can allow for something like this, something along the lines of checking user groups and changing the css but I don't know how to fully implement that in JS. While usesitejs works I find it to be an unwieldy solution, this should really be something where you don't need to resort to the nuclear option. TheWWRNerdGuy 18:58, 31 January 2023 (UTC)

Script doesn't work in my wiki anymore[]

(Sorry for my bad english)

This script was working perfectly fine before the update, I just noticed it isn't working anymore since some users were responding to comments from 7 months ago.

Is there any way to fix this or it doesn't work anymore?

Hopefully it's just something little to fix. I hope to find the time to look into it. Can you please give a link to an example of an old comment that got replies? Nam 09:11, 6 May 2022 (UTC)
Hello, I found an old comment with a reply: https://piggy.fandom.com/wiki/PIGGY_DLC_Codes?commentId=4400000000000105874&replyId=4400000000000826986.
As seen in our common.js page, the reply limit is 30 days, and it's been there since December 4th, 2021. Enexed (talk) 00:18, 29 May 2022 (UTC)
Thanks! It should be fixed once my edit gets approved. Nam 18:57, 29 May 2022 (UTC)

Discussions/Walls Equivalent?[]

Hello,

I was wondering if there was a script like this that did the same thing for Discussions posts and message wall threads?

CAMERAwMUSTACHE (talk) 04:24, 12 November 2022 (UTC)

For Discussions posts it's not possible with the method this script uses because custom code isn't loaded on Discussions.
For message walls it should be possible to create such a script, but there is no currently such one as far as I'm aware.
Nam 22:12, 19 November 2022 (UTC)
Ah I see. Thanks. CAMERAwMUSTACHE (talk) 23:34, 19 November 2022 (UTC)

This does no seem to work anymore[]

This stopped working. -Joshuabirger (talk) {Please tell me on my Talk Page if you reply to me} 23:49, 24 February 2023 (UTC)

link: https://emergency-response-liberty-county.fandom.com/wiki/Emergency_Response:_Liberty_County_(Guide)?commentId=4400000000000190121-Joshuabirger (talk) {Please tell me on my Talk Page if you reply to me} 23:52, 24 February 2023 (UTC)
my console has lots of errors, but this stands out:
Uncaught Error: Syntax error, unrecognized expression: .article-comments-app, [class*="CommentList_comment-list__"
   at Sizzle.error (load.php?lang=en&modules=client-b4280e27.js%7Cjquery&skin=fandomdesktop&version=1czi8:22:720)
   at Sizzle.tokenize (load.php?lang=en&modules=client-b4280e27.js%7Cjquery&skin=fandomdesktop&version=1czi8:32:625)
   at Sizzle.compile (load.php?lang=en&modules=client-b4280e27.js%7Cjquery&skin=fandomdesktop&version=1czi8:38:658)
   at Sizzle.select (load.php?lang=en&modules=client-b4280e27.js%7Cjquery&skin=fandomdesktop&version=1czi8:39:994)
   at Sizzle (load.php?lang=en&modules=client-b4280e27.js%7Cjquery&skin=fandomdesktop&version=1czi8:13:116)
   at Sizzle.matches (load.php?lang=en&modules=client-b4280e27.js%7Cjquery&skin=fandomdesktop&version=1czi8:21:606)
   at jQuery.filter (load.php?lang=en&modules=client-b4280e27.js%7Cjquery&skin=fandomdesktop&version=1czi8:42:701)
   at winnow (load.php?lang=en&modules=client-b4280e27.js%7Cjquery&skin=fandomdesktop&version=1czi8:42:465)
   at jQuery.fn.init.is (load.php?lang=en&modules=client-b4280e27.js%7Cjquery&skin=fandomdesktop&version=1czi8:43:323)
   at Text.findComments (load.php?lang=en&modules=ext.fandom.ImportJs&skin=fandomdesktop&version=1gbau:41:339)

-Joshuabirger (talk) {Please tell me on my Talk Page if you reply to me} 23:53, 24 February 2023 (UTC)

Thank you for the report. The error message points out a syntax error which was apparently in the code since may, so I don't know if it's actuall the cause for the current issue. I submitted a fix and let's see if it helps. Nam 09:23, 26 February 2023 (UTC)
Update: Looks like it works fine now Nam 20:27, 4 March 2023 (UTC)

How I do create custom above old comments lock notice thing?[]

Hello so uh sorry if I'm just being dumb for not understanding enough or annoying you but how I can create a custom above old comments lock notice thing? (Xolaroan (talk) 21:40, 4 December 2023 (UTC)).

When I was trying to do this code on common.js wiki that i'm working on while using test mode but the above notice lock comments thing just disappear when I just saved it

Here is this code:

window.lockOldComments.LockOldComments-above = 'padding: 12px;text-align: center;background: linear-gradient(to bottom, rgba(175, 0, 0, 0.5), rgba(197, 13, 78, 0.2));border: 3.5px solid #FF0050;color: #FFFFFF;font-family: "Urbanist"; margin-bottom: 16px;border-radius: 20px;font-size: 13pt;box-shadow: 0 0 10px #FF0050, inset 0 0 10px #FF0050;text-shadow: 0 0 5px black; 0 0 5px black; 0 0 5px black;';

And this is wiki that i'm working on: Roblox Interminable Rooms Wiki

Nevermind I just already figured it out, you don't need to ask me now (Xolaroan (talk) 17:02, 5 December 2023 (UTC))

Configuration question[]

I just installed the script, and I am wondering if you configure right on the MediaWiki:ImportJS page, or if it a separate page. Additionally, is there a way to customize the text that shows when you use this line: window.lockOldComments.addNoteAbove = true; Esb678 (talk) 18:16, 22 February 2024 (UTC)

Configuration needs to be done on MediaWiki:Common.js, which requires custom JS being enabled on the wiki (by requesting it from Fandom) and a review process of the code.
As for customizing the text, this can be done by overriding the i18n message, see I18n-js#Overriding_messages. The message to be overriden is ['LockOldComments']['above-first-locked-comments']. Nam 07:28, 23 February 2024 (UTC)
Here’s the link to the MediaWiki:ImportJS page, does it look right? I’ll see if I can add the custom message. Thanks! Esb678 (talk) 14:21, 23 February 2024 (UTC)
No, it wouldn't work. As said before, configuration can only be done on a custom JS page - typically MediaWiki:Common.js. You can't put such code on MediaWiki:ImportJS. Nam 23:04, 24 February 2024 (UTC)

Moderator+ should have the ability to reply to these closed posts[]

I think that moderators should have the ability to edit on posts closed by this. Esb678 (talk) 17:27, 5 March 2024 (UTC)

This is literally the subject of the first heading of the talk page. Anyway, if you want to do this, put the following code in your personal CSS
.LockOldComments-above {
	display: none;
}
.LockOldComments-locked [class^="ReplyCreate"] {
	display: block;
}
.LockOldComments-locked [class*="InlineEntityFormWrapper_inline-entity-form-wrapper__"] > div:not([class]) {
	display: none;
}
.LockOldComments-locked [class*="InlineEntityFormWrapper_inline-entity-form-wrapper__"] [class*="FormEntryPoint_form-entry-point__"] {
	display: flex !important;
}

TheWWRNerdGuy 19:01, 5 March 2024 (UTC)

Oh, I didn’t see that. Anyways I mean a site-wide change, if it’s just personal then it only works for me. Esb678 (talk) 19:38, 5 March 2024 (UTC)
Well this isn't a very commonly used feature but you can actually apply CSS to specific usergroups. Put the code on MediaWiki:Group-sysop.css (for admins) and on MediaWiki:Group-threadmoderator.css (for discussion moderators).
Or they can simply add it to their personal CSS if they wish so.
Nam 20:59, 5 March 2024 (UTC)
Advertisement