vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Custom PHP Page in vBulletin. How to? (https://vborg.vbsupport.ru/showthread.php?t=244769)

kingharrison 06-17-2010 03:19 AM

Custom PHP Page in vBulletin. How to?
 
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 [DATE]1276783923[/DATE] at [TIME]1276783923[/TIME] ---------------

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

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.


All times are GMT. The time now is 07:24 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
  • Page Generation 0.01174 seconds
  • Memory Usage 1,712KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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