Jump to content

Number of Posts in a Thread


Gargamel

Recommended Posts

I started the "Primes" forum game the other day, and I was wondering if there was a simple way to keep score. 

I am not a web designer, I haven't done any real web design in 20+ years, so I'm asking for a little help. 

I'd like to see a widget made up that can count the times a person has posted in a thread.  It will then list the top 5 posters in that thread.   Something like a linkable picture that is updated every time it gets loaded.   I could then add that pic to the OP of the thread, and each time it is viewed, it would list the top scores, without having to manually visit an outside site.  

It'd be really cool if this could be made so an OP could add this to any thread, so some of the threads that are possibly scored this way could also benefit from this. 

 

Link to comment
Share on other sites

  • 2 weeks later...

I should be able to make something in python that can count the number of posts by each user in a thread, but I don't know how to host it so it could make a updating picture. I'd also check with the mods before making something that automatically makes a bunch of requests to the forums. Something that you run manually likely wouldn't be an issue, but something that runs every time the page is loaded may cause issues.

Edited by Mad Rocket Scientist
Link to comment
Share on other sites

Here you go, a python script that will take any thread and list how many times people have posted in it.

https://pastebin.com/BfjCR2EX

It requires:

Warning, using this on long threads will take a long time, I'd like to try to improve this but I'm not sure how. It also makes a lot of requests to the forums, comparable to one person clicking next page as fast as possible. It shouldn't be an issue if run by hand on smallish threads, but I would be careful if you try to automate running this script.

I'll try to figure out some way to save data from the program, then the next time it is run on the same thread, it will just add to that instead of looking through the entire thread.

Link to comment
Share on other sites

2 hours ago, Gargamel said:

Thanks @Mad Rocket Scientist, but I think I have moved away from this style of scoring.   But that said, somebody else might find it useful.   But before we progress, I think a little feed back from somebody like @ManeTI would be appropriate at this time. 

That's completely understandable, it was a fun project anyway. 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...