67431f654b984

67431f654cb49
1 Guest is here.
 

Topic: Script for items? Read 1243 times  

67431f654d480unn_atropos

67431f654d4fc
Is there a forum script that counts the items in a list (or two lists in two topics) automatically, adds them together and displays them at the top?

Example:


a total of: 5

A 3

  • Georg345
  • Mr. Tubby
  • bob,wrench only


B 2
  • Duke of Fartington
  • Proff Krawuttnik, blind


A few times in a year I check if all Let's Play videos are still up (if any of you magicians has a script that checks this as well; you could spare me literally hours of tedious work), remove them from one list, add them to another. My method now is that I paginate dots on a piece of paper that I hold to the screen to check if the numbers are correct...
« Last Edit: 29. May 2016, 15:08:11 by unn_atropos »
67431f654d7b0
No. It would be easy to cook something up with Javascript, but then you can't use Javascript in a forum post.
I'm not sure what you are doing with the paper sheet. Since these are decimal lists, the numbers will always be correct, ie you can remove one point somewhere in the list and it just recounts. So adding the last number of each list will always give you the final result.

Youtube provides ways to check if videos are still online, see here: http://stackoverflow.com/questions/1383073/how-do-i-check-if-a-video-exists-on-youtube-using-php
You would need a list of the video IDs, then you could write a PHP script that checks each and spits out the ones that went down.  There's an example in the link. Again, you can't do that in a forum post as PHP won't work/is not allowed here.

67431f654de3bunn_atropos

67431f654de95
Since these are decimal lists, the numbers will always be correct, ie you can remove one point somewhere in the list and it just recounts. So adding the last number of each list will always give you the final result.
That's the problem. I added the numbers manually and have to count by hand (using the sheet of paper to count 50 or so items at once). There is nothing in place to automatically count...

Youtube provides ways to check if videos are still online, see here: http://stackoverflow.com/questions/1383073/how-do-i-check-if-a-video-exists-on-youtube-using-php
You would need a list of the video IDs, then you could write a PHP script that checks each and spits out the ones that went down.  There's an example in the link. Again, you can't do that in a forum post as PHP won't work/is not allowed here.
I have not done one of these things before, so I'll have to take a closer look. Thanks for the hint!
67431f654e229
That's the problem. I added the numbers manually and have to count by hand (using the sheet of paper to count 50 or so items at once). There is nothing in place to automatically count...

You can simply add a "type=decimal" attribute to the initial list tag to turn your list of bullet points into a numbered list , eg now you have:
Code: [Select]
[list]
Add type attribute with decimal value:
Code: [Select]
[list type=decimal]
Does this help?

67431f654e317unn_atropos

67431f654e367
That solves the counting issue, but bullet points look way better. If there isn't a way to have bullet points that are counted and their quantity delivered to the section above (A 12) and to a counter adding numbers from both lists (A-N, M-Z), I think I'll bit the bullet (haha) and keep on using manual counting.
67431f654e461
Sorry, there's no such feature. What you're asking is programmatic in nature while the possibilities in forum posts are limited to layouting.
1 Guest is here.
(TR/Agent.mgqb;maybe a false one)
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67431f654f004