666624ca4bdc8

666624ca4c463
1 Guest is here.
 

Topic: Script for items? Read 796 times  

666624ca4cc05unn_atropos

666624ca4ccc1
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 »
666624ca4cf43
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.

666624ca4d454unn_atropos

666624ca4d4b0
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!
666624ca4d82a
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?

666624ca4d91eunn_atropos

666624ca4d977
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.
666624ca4da94
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.
We managed to restore artificial gravity for this deck, but neither the local array of sensors nor the interior lighting systems seem to be operative.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
666624ca515c5