This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-04-30 21:07:10

cpumaster930
Scratcher
Registered: 2009-02-23
Posts: 100+

Hello, AT. I have a challenge for you.

Make an auto-ranking system for post counts. (Preferably one that works for the TBG also.)

Basically an image or something that contains auto-updating text and shows the top 10 or 20 posters.

Is this possible?  tongue


http://i.imgur.com/Qd0lu.png

Offline

 

#2 2012-04-30 21:18:38

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

Possible for both, although it'd require passwords of all the top 10 or 20 posters on here to see their posts counts. It'd take a long long time for it to generate the list of the users, though, without access to the user list.  smile
So to sum it up, no that's really hard


Posts: 20000 - Show all posts

Offline

 

#3 2012-04-30 21:46:14

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

You'd need access to the user list for sure, as veggie said. It would probably be possible, although it wouldn't be self updating, since it would have to go through the whole list so collect the top posters  tongue


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#4 2012-04-30 21:47:13

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

No I think there's a way you can sort the user list by post count


Posts: 20000 - Show all posts

Offline

 

#5 2012-04-30 21:52:16

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

veggieman001 wrote:

No I think there's a way you can sort the user list by post count

*Checks own forum*

Yes there is! This could be possible, although unlikely since the Scratch Team doesn't want post counts to be visible anymore  tongue


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#6 2012-04-30 21:53:56

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

Well it's possible even without the userlist but it would take forever and require tons of passwords.


Posts: 20000 - Show all posts

Offline

 

#7 2012-04-30 21:54:08

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

jji7skyline wrote:

veggieman001 wrote:

No I think there's a way you can sort the user list by post count

*Checks own forum*

Yes there is! This could be possible, although unlikely since the Scratch Team doesn't want post counts to be visible anymore  tongue

You can sort the user list by post count in FluxBB, and I think in PunBB.

I don't think this would be at all easy given how these forums work, if even possible.

Last edited by jvvg (2012-04-30 21:59:02)


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#8 2012-04-30 21:54:52

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

jvvg wrote:

jji7skyline wrote:

veggieman001 wrote:

No I think there's a way you can sort the user list by post count

*Checks own forum*

Yes there is! This could be possible, although unlikely since the Scratch Team doesn't want post counts to be visible anymore  tongue

You can sort the user list by post count in FluxBB, and I think in PunBB.

I don't think this would be at all easy, if even possible.

Yes, you can in PunBB.

Without the userlist, no.  tongue


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#9 2012-04-30 21:59:36

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

It wouldddd it would just take forever and need passwords is nobody listening


Posts: 20000 - Show all posts

Offline

 

#10 2012-04-30 21:59:48

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

jji7skyline wrote:

jvvg wrote:

jji7skyline wrote:

*Checks own forum*

Yes there is! This could be possible, although unlikely since the Scratch Team doesn't want post counts to be visible anymore  tongue

You can sort the user list by post count in FluxBB, and I think in PunBB.

I don't think this would be at all easy, if even possible.

Yes, you can in PunBB.

Without the userlist, no.  tongue

Yeah, exactly.
I wonder if there is any way to get a user list (hint, hint, Scratch Team...)

Btw, I use FluxBB, not PunBB on my forums (I prefer software that's newer and not developed by a for-profit company.)

Last edited by jvvg (2012-04-30 22:00:52)


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#11 2012-04-30 22:02:14

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

This forum uses Flux, I do believe.


Posts: 20000 - Show all posts

Offline

 

#12 2012-04-30 22:07:54

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

veggieman001 wrote:

It wouldddd it would just take forever and need passwords is nobody listening

Asking for passwords isn't — well, it's just not right.

And yes, these forums are FluxBB.


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#13 2012-04-30 22:25:09

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

jji7skyline wrote:

veggieman001 wrote:

It wouldddd it would just take forever and need passwords is nobody listening

Asking for passwords isn't — well, it's just not right.

And yes, these forums are FluxBB.

'Course it's not right. But that doesn't mean it's not possible.


Posts: 20000 - Show all posts

Offline

 

#14 2012-04-30 23:36:20

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

veggieman001 wrote:

jji7skyline wrote:

veggieman001 wrote:

It wouldddd it would just take forever and need passwords is nobody listening

Asking for passwords isn't — well, it's just not right.

And yes, these forums are FluxBB.

'Course it's not right. But that doesn't mean it's not possible.

Sure it's possible technically, but not practically  tongue


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#15 2012-05-01 05:22:48

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

Tsk, no passwords needed for the main site  big_smile

1. veggie
2. veggie
3. veggie

Anyway, hear ye, there is actually a way to do it without the passwords of every user. However, it would put a lot of strain on the Scratch servers to update the list: there are 247139 users in this forum!

(Coding details follow)

To proceed in the caching method, the script would have to perform a search of every user's posts and count the results. This already presents a challenge since it cannot be done using a simple file_get_contents() and therefore requires knowledge of cURL. For 247139 users and 2 seconds per action (the script needs to query a different server, which takes time), I estimate 500 000 seconds.

Then we would need to sort the array, and such a big array will take at least 10 seconds. OK, neglegible.

In total, you're not going to get the job finished before 140 hours, which makes roughly 5 days and a half of non-stop running! And most scripts time out after 20 seconds.  tongue

Offline

 

#16 2012-05-01 05:31:52

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

LS97 wrote:

Tsk, no passwords needed for the main site  big_smile

1. veggie
2. veggie
3. veggie

Anyway, hear ye, there is actually a way to do it without the passwords of every user. However, it would put a lot of strain on the Scratch servers to update the list: there are 247139 users in this forum!

(Coding details follow)

To proceed in the caching method, the script would have to perform a search of every user's posts and count the results. This already presents a challenge since it cannot be done using a simple file_get_contents() and therefore requires knowledge of cURL. For 247139 users and 2 seconds per action (the script needs to query a different server, which takes time), I estimate 500 000 seconds.

Then we would need to sort the array, and such a big array will take at least 10 seconds. OK, neglegible.

In total, you're not going to get the job finished before 140 hours, which makes roughly 5 days and a half of non-stop running! And most scripts time out after 20 seconds.  tongue

I have seen a program that does that before. I forgot who made it. It took aaaaaagggggggeeeeesssss to get everyones usernames on it. (It had my username in it's database too  tongue )


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#17 2012-05-01 06:04:03

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

I have a Python script somewhere that can read PunBB/FluxBB forum pages, parses the HTML using BeautifulSoup (lovely library for this kind of thing) and checks for new posts. I'm sure it could be adapted...  tongue


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#18 2012-05-01 07:47:54

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

I can tell you right away that the Scratch Team isn't going to provide a user list, or add new code to the forums that would let us read that information (Even though it's pretty much just an SQL statement).

There is a way to do it without passwords on the current forum system, but it's slow, time consuming and the ST would have the creator's head on a silver platter cos it would be calling their site all the time. It would involve using an external program to run through every thread in all the forums, adding new users to an array or incrementing their count every time it finds a post by them. I could probably do it but won't and encourage you not to  tongue  According to the topic count on the home page of the forums, the forums would have to be accessed at least 87556 times, though probably more since it's not one-topic-per-page.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#19 2012-05-01 08:09:55

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

LS97 wrote:

Tsk, no passwords needed for the main site  big_smile

1. veggie
2. veggie
3. veggie

Anyway, hear ye, there is actually a way to do it without the passwords of every user. However, it would put a lot of strain on the Scratch servers to update the list: there are 247139 users in this forum!

(Coding details follow)

To proceed in the caching method, the script would have to perform a search of every user's posts and count the results. This already presents a challenge since it cannot be done using a simple file_get_contents() and therefore requires knowledge of cURL. For 247139 users and 2 seconds per action (the script needs to query a different server, which takes time), I estimate 500 000 seconds.

Then we would need to sort the array, and such a big array will take at least 10 seconds. OK, neglegible.

In total, you're not going to get the job finished before 140 hours, which makes roughly 5 days and a half of non-stop running! And most scripts time out after 20 seconds.  tongue

And then it'll be outdated anyways.  tongue

nathanprocks wrote:

I have seen a program that does that before. I forgot who made it. It took aaaaaagggggggeeeeesssss to get everyones usernames on it. (It had my username in it's database too  tongue )

Sparks made it.

Offline

 

#20 2012-05-01 08:36:57

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

Yeah, that was a slightly different program. It scanned the "users online" list from the forum home page and added their name to a list in Panther, ready to be bbcoded in. It's a similar principle  tongue


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#21 2012-05-01 09:13:45

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

LS97 wrote:

Tsk, no passwords needed for the main site  big_smile

1. veggie
2. veggie
3. veggie

Anyway, hear ye, there is actually a way to do it without the passwords of every user. However, it would put a lot of strain on the Scratch servers to update the list: there are 247139 users in this forum!

(Coding details follow)

To proceed in the caching method, the script would have to perform a search of every user's posts and count the results. This already presents a challenge since it cannot be done using a simple file_get_contents() and therefore requires knowledge of cURL. For 247139 users and 2 seconds per action (the script needs to query a different server, which takes time), I estimate 500 000 seconds.

Then we would need to sort the array, and such a big array will take at least 10 seconds. OK, neglegible.

In total, you're not going to get the job finished before 140 hours, which makes roughly 5 days and a half of non-stop running! And most scripts time out after 20 seconds.  tongue

That number would still be wrong, too, because it doesn't count deleted posts whereas the official post count does.


Posts: 20000 - Show all posts

Offline

 

#22 2012-05-01 10:24:28

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

veggieman001 wrote:

LS97 wrote:

Tsk, no passwords needed for the main site  big_smile

1. veggie
2. veggie
3. veggie

Anyway, hear ye, there is actually a way to do it without the passwords of every user. However, it would put a lot of strain on the Scratch servers to update the list: there are 247139 users in this forum!

(Coding details follow)

To proceed in the caching method, the script would have to perform a search of every user's posts and count the results. This already presents a challenge since it cannot be done using a simple file_get_contents() and therefore requires knowledge of cURL. For 247139 users and 2 seconds per action (the script needs to query a different server, which takes time), I estimate 500 000 seconds.

Then we would need to sort the array, and such a big array will take at least 10 seconds. OK, neglegible.

In total, you're not going to get the job finished before 140 hours, which makes roughly 5 days and a half of non-stop running! And most scripts time out after 20 seconds.  tongue

That number would still be wrong, too, because it doesn't count deleted posts whereas the official post count does.

Precisely. However, wouldn't it be better to count existing posts anyway?

Offline

 

#23 2012-05-01 10:26:04

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

sparks wrote:

There is a way to do it without passwords on the current forum system, but it's slow, time consuming and the ST would have the creator's head on a silver platter cos it would be calling their site all the time. It would involve using an external program to run through every thread in all the forums, adding new users to an array or incrementing their count every time it finds a post by them. I could probably do it but won't and encourage you not to  tongue  According to the topic count on the home page of the forums, the forums would have to be accessed at least 87556 times, though probably more since it's not one-topic-per-page.

Do you think that is an easier way to do it, also from a code performance point of view, rather than searching the user and getting their post in less than 10 seconds?

Offline

 

#24 2012-05-01 10:43:49

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

sparks wrote:

There is a way to do it without passwords on the current forum system, but it's slow, time consuming and the ST would have the creator's head on a silver platter cos it would be calling their site all the time. It would involve using an external program to run through every thread in all the forums, adding new users to an array or incrementing their count every time it finds a post by them. I could probably do it but won't and encourage you not to  tongue  According to the topic count on the home page of the forums, the forums would have to be accessed at least 87556 times, though probably more since it's not one-topic-per-page.

Darn, that's what I was thinking of...  tongue  You're right -- It's reasonably unpractical.  hmm

Last edited by blob8108 (2012-05-01 10:44:10)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#25 2012-05-01 14:34:12

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Hello, AT. I have a challenge for you.

LS97 wrote:

sparks wrote:

There is a way to do it without passwords on the current forum system, but it's slow, time consuming and the ST would have the creator's head on a silver platter cos it would be calling their site all the time. It would involve using an external program to run through every thread in all the forums, adding new users to an array or incrementing their count every time it finds a post by them. I could probably do it but won't and encourage you not to  tongue  According to the topic count on the home page of the forums, the forums would have to be accessed at least 87556 times, though probably more since it's not one-topic-per-page.

Do you think that is an easier way to do it, also from a code performance point of view, rather than searching the user and getting their post in less than 10 seconds?

And how do you get the post count of another user?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

Board footer