View Full Version : Custom PHP Page in vBulletin. How to?
kingharrison
06-17-2010, 03:19 AM
I want to create a multiple selection list user profile field that is private for al my users. It will be a selection on a certain affiliation with a club. I am hiding that information by making the field private. But I want to have a page that shows the number of members of each club, starting from most members to least. Any idea how to do this?
--------------- Added 1276783923 at 1276783923 ---------------
OK, I think I have a better idea of what to do now.
I have some sql (encapsulated into php if needed) and I want to make a custom page to go through the view I created. How do I do that?
DragonBlade
06-17-2010, 11:18 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=228112" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=228112</a>
mordor1
06-20-2010, 10:39 AM
bump!
kingharrison
06-20-2010, 11:49 AM
Thanks DragonBlade for the article.
Is there a good tutorial on how to display an array result from a mysql query?
DragonBlade
06-20-2010, 09:43 PM
How you want it displayed?
kingharrison
06-21-2010, 12:28 AM
Very simple. In a table. Each row in the SQL would be put in a table row. All the fields separated into colums.
--------------- Added 1277163043 at 1277163043 ---------------
Here, I can write out exactly what I am trying to do. I have in a View a table that contains Gym Names and Number of Members. The list is organized in descending order from most members to least. The MySQL statement I used to load it into an array was:
$gymarray = $db->query_first_slave("SELECT * FROM `gym_representation` ");
I then registered it:
$templater->register('gym', $gymarray);
In my CSS I can get the first result with:
{vb:raw gym.Members} and {vb:raw gym.Gym}
How do I get the next result
and
how do I build a table that grows dynamically to fit the data?
I tried to use a while loop and use another CSS template that contains the information for a row, but it didn't work. I am just missing how to do all this stuff in vBulletin.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.