Bitcoin Forum

Other => Meta => Topic started by: Cyrus on January 24, 2019, 07:04:18 PM



Title: [Userscript] Report to moderator on post history
Post by: Cyrus on January 24, 2019, 07:04:18 PM
After recent discussion (https://bitcointalk.org/index.php?topic=5098880.msg49289678#msg49289678) about it's usefulness, I've made a small userscript to add the Report to moderator button on the Show lasts posts of this person page.

You can upload it to a user script manager (eg:GreaseMonkey for FF).
Code:
Code:
// ==UserScript==
// @name     Post history report button
// @version  1.1
// @grant    none
// @include  https://bitcointalk.org/index.php?action=profile;u=*;sa=showPosts*
// @include  https://bitcointalk.org/index.php?action=profile;threads;u=*;sa=showPosts*
// @require  https://code.jquery.com/jquery-2.2.4.min.js
// ==/UserScript==

var postLinks = $('td.middletext a:last-of-type');
var buttonLink = $("span.middletext").slice(1);

for (var i = 0; i < postLinks.length; i++) {
  var postLink = $(postLinks[i]);
  var reportLink = "<a href=" + postLink.prop("href").replace("index.php?", "index.php?action=reporttm;").replace(".msg", ";msg=") + ">Report to moderator</a>";
  $(buttonLink[i]).prepend (reportLink);
}

Here is how it looks:
https://i.imgur.com/oJKEZFq.png

LMK if you found issues.

LE: Included to latest topics page as well.


Title: Re: [Userscript] Report to moderator on post history
Post by: Cyrus on January 24, 2019, 07:10:44 PM
If there's enough interest, we might turn the OP into a collection of userscripts (with small features that might actually be added to the forum in the long run if they turn out to be really useful for a lot of people).


Title: Re: [Userscript] Report to moderator on post history
Post by: Lafu on January 24, 2019, 07:15:56 PM
Awesome nice thanks for that Button!
Guess reporting will be easyer now for some or the most!
 


Title: Re: [Userscript] Report to moderator on post history
Post by: TheBeardedBaby on January 24, 2019, 07:17:04 PM
Great, I was waiting for this for ages.
The next one is a report button in the search result :)


Title: Re: [Userscript] Report to moderator on post history
Post by: Veleor on January 24, 2019, 09:44:00 PM
Is it possible to hide user's posts from a certain section, eg Bounties (Altcoins)?


Title: Re: [Userscript] Report to moderator on post history
Post by: TryNinja on January 24, 2019, 09:54:56 PM
Is it possible to hide user's posts from a certain section, eg Bounties (Altcoins)?
Ignore the board and they will not show up.

Profile -> Ignore Boards Preferences -> Select “Bounties (Altcoin)”


Title: Re: [Userscript] Report to moderator on post history
Post by: FatBen on January 24, 2019, 09:59:53 PM
works great, just tested it  ;D


Title: Re: [Userscript] Report to moderator on post history
Post by: pugman on January 24, 2019, 11:55:06 PM
Could we also have scripts for these purposes, IF POSSIBLE of course :
 - Show a banned status on a profile if a user is banned, after getting details from seclog?
 - Ability to view trust across all boards, since a few boards hide them, including meta.
 - Have a DT button in the trust page of others to view the default trust on their account, to avoid confusion?
 - Provide accessible buttons with links for modlog, seclog etc on the top bar area next to the my messages menu?
 - A report button as well next on the top bar next to the my messages option which shows how many reports you have and what's the status of each report.

I can suggest some more later, probably.


Title: Re: [Userscript] Report to moderator on post history
Post by: JusticeForYou on January 25, 2019, 03:58:18 AM
Good Work Cyrus and welcome back to development :D

I think it should be added officially to the forum so that everyone can use it usually.


Title: Re: [Userscript] Report to moderator on post history
Post by: joniboini on January 25, 2019, 04:31:06 AM
If there's enough interest, we might turn the OP into a collection of userscripts (with small features that might actually be added to the forum in the long run if they turn out to be really useful for a lot of people).

I support this. I've used some user scripts being posted here but when my laptop went broke I have a hard time finding the script again. It would be nice if there's an index thread for any useful user script for the forum.


Title: Re: [Userscript] Report to moderator on post history
Post by: bL4nkcode on January 25, 2019, 07:01:59 AM
- Show a banned status on a profile if a user is banned, after getting details from seclog?
I'll be on to this.

- Provide accessible buttons with links for modlog, seclog etc on the top bar area next to the my messages menu?
Maybe admins can put it on the MORE tab/menu

- Ability to view trust across all boards, since a few boards hide them, including meta.
As with the discussions on some thread, it will be helpful in the local board to show the trust score, not necessary in off-topic, archival board and Politics & Society.

Also, make the Trust depth to 4 as default (currently 2), since there are instances that only DT3-4 leave some -ve trust to some scammers but these newbies or any rank cannot see those feedbacks and still continue to trade and end up of being scammed.


Title: Re: [Userscript] Report to moderator on post history
Post by: TheBeardedBaby on January 25, 2019, 01:27:25 PM
- Provide accessible buttons with links for modlog, seclog etc on the top bar area next to the my messages menu?
 - A report button as well next on the top bar next to the my messages option which shows how many reports you have and what's the status of each report.

I think both options can be fixed with bookmarks, if you bookmark the modlog and seclog you have access to them with one click and you can also bookmark the report history (https://bitcointalk.org/index.php?action=reportlist;mine) ( if you have 300+ good reports ) It's the same.


Title: Re: [Userscript] Report to moderator on post history
Post by: suchmoon on January 25, 2019, 02:11:37 PM
Also, make the Trust depth to 4 as default (currently 2), since there are instances that only DT3-4 leave some -ve trust to some scammers but these newbies or any rank cannot see those feedbacks and still continue to trade and end up of being scammed.

Absolutely not. You can still see the feedbacks under untrusted. But including 4 levels into the trust score (which is what you seem to be suggesting) would be a disaster. There are too many unreliable ratings at that level. If DT3-4 have credible accusations they should bring it up and someone in DT1-2 will confirm it.


Title: Re: [Userscript] Report to moderator on post history
Post by: 3dOOm on January 25, 2019, 02:50:40 PM
After recent discussion (https://bitcointalk.org/index.php?topic=5098880.msg49289678#msg49289678) about it's usefulness, I've made a small userscript to add the Report to moderator button on the Show lasts posts of this person page.

You can upload it to a user script manager (eg:GreaseMonkey for FF).
Code:
Code:
// ==UserScript==
// @name     Post history report button
// @version  1
// @grant    none
// @include  https://bitcointalk.org/index.php?action=profile;u=*;sa=showPosts*
// @require  https://code.jquery.com/jquery-2.2.4.min.js
// ==/UserScript==

var postLinks = $('td.middletext a:last-of-type');
var buttonLink = $("span.middletext").slice(1);

for (var i = 0; i < postLinks.length; i++) {
  var postLink = $(postLinks[i]);
  var reportLink = "<a href=" + postLink.prop("href").replace("index.php?", "index.php?action=reporttm;").replace(".msg", ";msg=") + ">Report to moderator</a>";
  $(buttonLink[i]).prepend (reportLink);
}

Here is how it looks:

LMK if you found issues.

Good project! BTC to the moon!
https://i.imgur.com/1meTbmJ_d.jpg


Title: Re: [Userscript] Report to moderator on post history
Post by: Quickseller on January 25, 2019, 05:49:33 PM
Why do you not just add this functionality directly on the forum instead of making users use a script?


Title: Re: [Userscript] Report to moderator on post history
Post by: Kopyleft on January 25, 2019, 06:00:58 PM
Why do you not just add this functionality directly on the forum instead of making users use a script?
I second this, I have been searching for the function for the past six hours, and i do not know much about scripts and how they are used.
It might take some learning, I am doing a bit of research. It would be much easier if it was added directly.


Title: Re: [Userscript] Report to moderator on post history
Post by: Xal0lex on January 25, 2019, 06:26:23 PM
The script does not work if you view the latest topics person. It would be nice to make the script work there.


Title: Re: [Userscript] Report to moderator on post history
Post by: madnessteat on January 25, 2019, 06:56:47 PM
~snip~

I really liked your script. Thank you for your work. Would be cool if you modify the script.
The script does not work if you view the latest topics person. It would be nice to make the script work there.

I translated your theme (https://bitcointalk.org/index.php?topic=5102160.msg49418739#msg49418739) for the Russian locale and added a small instruction on how to use the script.  


Title: Re: [Userscript] Report to moderator on post history
Post by: TryNinja on January 25, 2019, 07:05:21 PM
The script does not work if you view the latest topics person. It would be nice to make the script work there.
Can you test this?

Code:
// ==UserScript==
// @name     Post history report button
// @version  1
// @grant    none
// @include  https://bitcointalk.org/index.php?action=profile;u=*;sa=showPosts*
// @include  https://bitcointalk.org/index.php?action=profile;threads;u=*;sa=showPosts*
// @require  https://code.jquery.com/jquery-2.2.4.min.js
// ==/UserScript==

var postLinks = $('td.middletext a:last-of-type');
var buttonLink = $("span.middletext").slice(1);

for (var i = 0; i < postLinks.length; i++) {
  var postLink = $(postLinks[i]);
  var reportLink = "<a href=" + postLink.prop("href").replace("index.php?", "index.php?action=reporttm;").replace(".msg", ";msg=") + ">Report to moderator</a>";
  $(buttonLink[i]).prepend (reportLink);
}

All I did was add an include for the “View latest topics” page.


Title: Re: [Userscript] Report to moderator on post history
Post by: Xal0lex on January 25, 2019, 07:24:08 PM
The script does not work if you view the latest topics person. It would be nice to make the script work there.
Can you test this?
All I did was add an include for the “View latest topics” page.

Yes, it works. Thank you.


Title: Re: [Userscript] Report to moderator on post history
Post by: pugman on January 25, 2019, 09:47:08 PM
I'll be on to this.
Thanks.

As with the discussions on some thread, it will be helpful in the local board to show the trust score, not necessary in off-topic, archival board and Politics & Society.

Also, make the Trust depth to 4 as default (currently 2), since there are instances that only DT3-4 leave some -ve trust to some scammers but these newbies or any rank cannot see those feedbacks and still continue to trade and end up of being scammed.
Like suchmoon said, bad idea. It'll fuck up things for the worse. Scammers would have a better reputation and will seem more trust-worthy than the scam-busters, if such a disaster were to happen.

I think both options can be fixed with bookmarks, if you bookmark the modlog and seclog you have access to them with one click and you can also bookmark the report history (https://bitcointalk.org/index.php?action=reportlist;mine) ( if you have 300+ good reports ) It's the same.
Yes, but very few of them are aware of such links, and there's only so much of bookmarks that you can possibly have in your bookmarks list. Idk, just thought it might be worth mentioning, maybe not.

Is it possible to create a script that provides a checkbox option in a thread which allows to report multiple posts that fit under the same category?


Title: Re: [Userscript] Report to moderator on post history
Post by: Cyrus on January 26, 2019, 04:10:06 PM
Why do you not just add this functionality directly on the forum instead of making users use a script?
The script is there for anyone that finds it useful. Just because users lobby for a certain functionality doesn't mean that it's also good idea in the long run. I see this as an experiment to see what we could improve in the future.

- Provide accessible buttons with links for modlog, seclog etc on the top bar area next to the my messages menu?
Maybe admins can put it on the MORE tab/menu
This seems easy and useful.

All I did was add an include for the “View latest topics” page.
Thanks! Forgot to include that page as well, added to the OP.


Title: Re: [Userscript] Report to moderator on post history
Post by: Lafu on January 26, 2019, 08:12:02 PM
Maybe its been possible if you report a post on a thread that the "Report to Moderator button" disappears and is no longer clickable !

Would be better for the Reporters in a Spam thread to see if the post already is reported and that would also be against double reports and bad reports !

Is only a suggestion.


Title: Re: [Userscript] Report to moderator on post history
Post by: TryNinja on January 26, 2019, 08:34:03 PM
Maybe its been possible if you report a post on a thread that the "Report to Moderator button" disappears and is no longer clickable !

Would be better for the Reporters in a Spam thread to see if the post already is reported and that would also be against double reports and bad reports !

Is only a suggestion.
The only way this can work inside the script is if it starts saving the reported posts in a file/database and check every single one before rendering the “Report to moderator” button.


Title: Re: [Userscript] Report to moderator on post history
Post by: Cyrus on January 27, 2019, 02:51:02 AM
The only way this can work inside the script is if it starts saving the reported posts in a file/database and check every single one before rendering the “Report to moderator” button.

Yes, I'd rather focus on simpler features to implement first but it's a good idea. There are also some cases where you'd want to report a post again (adding more information, etc). It would probably be nice to have an indication, forum-side, that you already reported it though.


Title: Re: [Userscript] Report to moderator on post history
Post by: vit05 on January 27, 2019, 03:32:23 AM
This has probably been suggested before as a change in the forum, but maybe creating a script is simpler.

Show the amount of Merit that has been distributed in a topic in the title on the section list of topics. You would know how many merits a topic received before opening it. In the same way, we can see the number of responses and views that a topic had.


Title: Re: [Userscript] Report to moderator on post history
Post by: yefi on February 03, 2019, 04:04:33 PM
Why do you not just add this functionality directly on the forum instead of making users use a script?
The script is there for anyone that finds it useful. Just because users lobby for a certain functionality doesn't mean that it's also good idea in the long run. I see this as an experiment to see what we could improve in the future.

Must say I find it weird that admins are writing userscript hacks. Why not add as experimental options in the user preferences instead? You have access to the back-end database then, so you could query pre-existing reports for example.


Title: Re: [Userscript] Report to moderator on post history
Post by: AverageGlabella on February 04, 2019, 06:29:26 AM
Maybe its been possible if you report a post on a thread that the "Report to Moderator button" disappears and is no longer clickable !

Would be better for the Reporters in a Spam thread to see if the post already is reported and that would also be against double reports and bad reports !

Is only a suggestion.

It would be better if a warning popped up rather than removing it completely but I do agree that something should be put in place. But I would think that if a post has more reports then it goes to the top of the queue so if someone has already reported it there is no need to worry about double or multiple reports. I understand from an individual viewpoint so that they don't report it twice to avoid their report accuracy going down or wasting their time.