CoH Forum Greasemonkey Mod


Aggelakis

 

Posted

I have two beefs with the new forums, one of which I know it shared by at least some others:
1) You must click a small linked image to get to the newest unread post in a thread
2) The "Forum Tools" popup menu (required to mark a forum as read) is painfully slow to animate

So, I have created a Greasemonkey script to alleviate my issues.

If you've already got Greasemonkey installed (requires restarting Firefox), you can get the script from here:
CoH Forum Mod
(Just click the "Install" link, and the Greasemonkey install dialog will open for you)

What the script does:
- The "Forum Tools" button is removed. It gets replaced by a "Mark Forum Read" link.*
- The "Mark Forum Read" link will mark all posts in the forum as read, and move you to the parent forum.**
- Any thread links which follow a new post arrow, which shares the post ID with the new post arrow, will have its link modified to go to the new post. Threads without new posts will remain unchanged (thread link takes you to the first post in the thread)
- The forum skin remains unmodified

I've tested this with both Hero and Villain skin. The only problem I can foresee occurring would be caused by catastrophic errors in the forum layout, which is far beyond my control.

Here's an example: The thread title with new posts in it is being hovered over with my mouse, and the url at the bottom will take me to the new post:


Note that the script will only be active while you're viewing a forum on these boards. It will also work on the search page, as well as on subscribed threads in your user CP.


* Yes, this does remove a handful of things you can do in a forum, like subscribe/unsubscribe to the whole forum. But I don't think there's anything in the popup that is both used frequently and not found elsewhere. For the things used infrequently (eg, subscribe to forum), you can temporarily disable the script. For things found elsewhere (eg, New Post), you can access them elsewhere anyway.
** This behavior is slightly different from the Mark Forum Read option in the Forum Tools popup, in that the Forum Tools version keeps you in the same forum. However, this is apparently accomplished with a redirect in the PHP code, which I cannot prevent. Besides, if you're marking the forum read, you're probably not going to be reading more threads there.


http://www.fimfiction.net/story/36641/My-Little-Exalt

 

Posted

Lovely! I love to grease my monkeys.

Also I suggest adding this: "http://boards.cityofheroes.com/search.php?searchid=*" to the script's included pages. that way when you click new posts it works


 

Posted

Done


http://www.fimfiction.net/story/36641/My-Little-Exalt

 

Posted

Works a treat,thank you.


 

Posted

Quote:
Originally Posted by Fleeting_Whisper View Post
2) The "Forum Tools" popup menu (required to mark a forum as read) is painfully slow to animate
Just use the "Mark Forums Read" option in the grey "Quick Links" button at the top of the forum.


"Everybody wants to change the world, but nobody wants to change themselves." -Tolstoy

 

Posted

Quote:
Originally Posted by Boxcars View Post
Just use the "Mark Forums Read" option in the grey "Quick Links" button at the top of the forum.
That marks everything read. All forums.

FW's marks only the one you are looking at read. Everything else stays at their current state.


Paragon Wiki: http://www.paragonwiki.com
City Info Terminal: http://cit.cohtitan.com
Mids Hero Designer: http://www.cohplanner.com
Quote:
Originally Posted by Dispari View Post
I don't know why Dink thinks she's not as sexy as Jay was. In 5 posts she's already upstaged his entire career.

 

Posted

Could you modify this to mark the forum as read and then go to the user control panel instead of the parent forum?
The Subscribed forums in the CP is how I'm getting my "Favorite Forums" like from the old boards.


 

Posted

Quote:
Originally Posted by Nod View Post
Could you modify this to mark the forum as read and then go to the user control panel instead of the parent forum?
The Subscribed forums in the CP is how I'm getting my "Favorite Forums" like from the old boards.
That's what I'm using too, but unfortunately, the redirect to the parent forum is being done with PHP (server side), which I've been unable to intercept with Greasemonkey's JavaScript (client side).


http://www.fimfiction.net/story/36641/My-Little-Exalt

 

Posted

Just a thought, but...
With clicking the thread name taking you to the first unread post, it might be nice to also have an alternate way to reach the first post in the thread.

Since the little arrow is now redundant, it could be used to house this function.

(i.e. a reversal of the default behavior. Clicking the arrow would take you to the first post of the thread, and clicking the thread title would take you to the first unread post)

Adding
links[i].href='showthread.php?t'+links[i].href.substring(links[i].href.lastIndexOf('='));

directly after
lastNewpost = id.substring(id.lastIndexOf('_') + 1);

should do the trick.
(I suppose that since the substring index will be static you could just replace it with the appropriate integer, but the above makes it a bit more clear what it does)

It might then be appropriate to change the arrow icon to something else (like an upwards pointing arrow), using something like Stylish.


 

Posted

Another tweak I'd love if you could add is removing the Announcements at the top of the search.php results page.

The best way I can think of with my limited knowledge of greasemonkey would be to remove any td containing an image with alt "Announcement" as well as the td immediately following it.


 

Posted

Quote:
Originally Posted by Fleeting_Whisper View Post
I have two beefs with the new forums, one of which I know it shared by at least some others:
1) You must click a small linked image to get to the newest unread post in a thread
I'm surprised anyone's having a beef with that, as it's how it's done in every forum that's not our old ones.

Clicking the title taking me to the newest post was what threw me, and I'm glad to have the "normal" method pack, personally.


Quote:
Originally Posted by Back Alley Brawler
Did you just use "casual gamer" and "purpled-out warshade" in the same sentence?
Apostrophe guidelines.

 

Posted

I've been on other forums with the feature (including ones in which the entire table cell is linked via JavaScript, rather than just the actual text), but most forums have a larger image to click to reach the newest unread post.


http://www.fimfiction.net/story/36641/My-Little-Exalt