674341844f84a

6743418450fb5
1 Guest is here.
 

Topic: Script for items? Read 1249 times  

6743418451928unn_atropos

67434184519b1
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 »
6743418451cfb
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.

674341845233eunn_atropos

6743418452395
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!
674341845274a
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?

6743418452847unn_atropos

67434184528b7
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.
6743418452a8d
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.
ATX have a function for the rain, it still rains inside buildings etc. tho.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6743418453651