vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Seperate member list? (https://vborg.vbsupport.ru/showthread.php?t=187051)

Spank 08-02-2008 08:06 PM

Seperate member list?
 
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.
Code:

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 [DATE]1217778309[/DATE] at [TIME]1217778309[/TIME] ---------------

Friendly bump :)

Oh and the percentage code has changed to
Code:

$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) It will get you started on creating a new page that 'looks' like any other vb page.


All times are GMT. The time now is 03:55 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00939 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete