PDA

View Full Version : Seperate member list?


Spank
08-02-2008, 08:06 PM
Hi I hope someone can help with this as it will be an important feature on my forum.

I need to create a separate member list (or just a list of users) going by a calculation I have setup. The calculation is called $percentage. I want to be able to have a list in order of the value of $percantage, and only show users that have a percentage of 1 or higher. It would also be great if I could include some values of custom fields in there.

eg.

Rank Name Field 8 Field 9 $percentage
1 Member C 2 1 89%
2 Member A 4 3 60%
3 Member B 1 2 30%


How would I achieve this? Thanks in advance.

--------------- Added 1217778309 at 1217778309 ---------------

Friendly bump :)

Oh and the percentage code has changed to
$percentage = ($post['field6'] ? $post['field7'] / $post['field6']: 0);

Because of a divide by 0 error I was getting with the former code.

Spank
08-04-2008, 05:57 PM
Is anyone able to help with this?

Lynne
08-04-2008, 06:00 PM
What sort of results are you getting by using the line of code you posted?

Is this on a separate page or are you using the vb page with another post variable passed?

Spank
08-04-2008, 07:14 PM
I've not got anything at the mo. The line of code is to calculate a percentage from 2 customer user fields, it then displays this in the postbit in a certain forum.

I have no idea where to begin to make a leader board from this.

Lynne
08-04-2008, 08:00 PM
Hmmm, have you taken a look at this article - How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164) It will get you started on creating a new page that 'looks' like any other vb page.