67433f757c5a5

67433f757dd86
2 Guests are here.
 

Topic: Script for items? Read 1248 times  

67433f7580723unn_atropos

67433f75807a8
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 »
67433f7580afe
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.

67433f7581171unn_atropos

67433f75811ca
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!
67433f758152c
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?

67433f75815fbunn_atropos

67433f758164b
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.
67433f7581755
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.
who are you? you are a cat
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67433f7582871