The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hey,
I need help. I use Reeve of Shinra's points hack. I need to run a query so I can display the Top to the Lowest person with points. Can anyone help? |
#2
|
||||
|
||||
![]()
Sorry I did a search and couldn't find this modification here? Could you please tell me the name of the field in the user table which holds the points for a user?
Also note, displaying all your users is not a good idea, you'll need to implement this into a PHP script and group it into pages otherwise it's not going to be very efficient ![]() |
#3
|
|||
|
|||
![]()
It's Reeve of Shinra's Points hack for vBulletin 2. The profile field is called "Money" (don't worry, it's actually called money, unlike field4, just to clear that up). Perhaps i should list only the top 30 users with the most points and place it in somewhere called richest.php . I can install hacks, yet, I'm just a copy and paster. If you can, can you assist me with what query to run?
|
#4
|
|||
|
|||
![]() Code:
$query = mysql_query("SELECT * FROM `users` WHERE 1 ORDER BY `money` DESC LIMIT 0, 30 "); while($user = mysql_fetch_array($query)) { echo "$user[username] has $user[money] money.<br>"; } |
#5
|
|||
|
|||
![]()
So, I should run that as a query via PHPmyadmin, and then...? Again, I apologize for my ignorance.
|
#6
|
|||
|
|||
![]()
That depends on what you're trying to do. If you just want to make a static html file with your current top 30, then you'd put that query (line 1) in phpMyAdmin and copy the results, if you want to make a dynamic richest.php, then you take the code I put above, and put it in a file that connects to the database.
To explain the code: line 1: This is the query to the database. You're searching all users, ordering by the money field, sorting in descending order, and then take the first 30 positions after 0 (aka the first 30). line 2: This is a while statement that will parse through all 30 of your results. As in, this chunk of code will get called 30 times since we're going to have 30 results from teh previous query. line 3: echo() is just a function that will print the following string to the user, so you're printing "USERNAME has # money.<br>". This would return 30 lines, with USERNAME and # replaced with the top 30 users. Just for formatting purposes, you might want to start a table. Something like: <table> <tr><td>User</td><td>Money</td></tr> then your echo string would be "<tr><td>$user[username]</td><td>$user[money</td></tr>"; then close your table with: </table> I'm not sure how much HTML you know, but you can pretty up the table as you see fit with the rest of the page. |
#7
|
|||
|
|||
![]()
I'm trying to create a file called richest.php . I'm good with html, but, I wouldn't know how to make a file with the header, footer, navbist, etc using php language, then make a template after. If I can give you (or anybody else) an admin password to my forums, and the person who wants to do this does the php file, and sends it to me, that'd be great. I'm just not sure where to go from here, but Zubaz thus far you've been an excellent help! I'd ask another staff member but no one has real knowledge on how to work .php and MYSQL.
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|