67433e2db1cbf

67433e2db3b84
2 Guests are here.
 

Topic: Script for items? Read 1246 times  

67433e2db60cbunn_atropos

67433e2db6138
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 »
67433e2db638c
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.

67433e2db68feunn_atropos

67433e2db6953
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!
67433e2db6cb2
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?

67433e2db6d9funn_atropos

67433e2db6df1
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.
67433e2db6eed
Sorry, there's no such feature. What you're asking is programmatic in nature while the possibilities in forum posts are limited to layouting.
2 Guests are here.
Seine Hautfarbe war aschfahl bis bläulich-weiß
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67433e2db7a8e