![]() |
this should be very simple.....
i got a already made hack that couts the number of theads you started in a certain section... i was wondering if any one could take the code.... and make a top 10 list for it???? it should be very simple i belive
thanks for your time... if you can please post here and i will post the code to work from Thanks! |
top tem list for what
|
kinda like
Top 10 Posters Username Posts joe 8 make 6 john 5 fred 1 stinky 1 jack 0 barney 0 juan 0 but it would be like a top 10 thread for certain forums on the board |
Ok I don't know if this will work cuz I don't know a whole lot about php but it's modeled after the Top 5 Hack. If it don't work sorry, I just kinda guessed a bit and my forum is down :(, but if it doesn't work I would like to see a working one to see what I did wrong. I hope I at least got close. :D
Find this $numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user'); $numbermembers=number_format($numbersmembers['users']); Add Under That // Top 10 Posters in a certain thread $top10 = $DB_site->query('SELECT userid,username,posts FROM thread WHERE forumid=# ORDER BY posts DESC LIMIT 10'); while ($top10thread = mysql_fetch_array($top10)): ++$top10threadnbsp; $top10name .= "? <a href=member.php?s=$session[sessionhash]&action=getinfo&userid=$top10thread[userid]>$top10thread[username]</a><br>"; $top10post .= "$top10thread[posts]<br>"; endwhile; // End Top 10 Posters in a certain thread Put these on your main page(index.php) somewhere. $top10thread is the list of users with the most posts $top10name is there names $top10post is the amt of posts each user has |
i get this error
Database error in vBulletin 2.2.4: Invalid SQL: SELECT userid,username,posts FROM thread WHERE forumid=14 ORDER BY posts DESC LIMIT 10 mysql error: Unknown column 'userid' in 'field list' mysql error number: 1054 |
ok this might help alittle.... all i want is the first hack below working with the second hack
Code:
********************************* i want that code above to display in this type of form Code:
|
Quote:
|
i dont understand.???
|
Quote:
|
same error..... cant you show a complete peice? im still a bit confused
|
All times are GMT. The time now is 10:42 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|