vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=285710

Queries on Custom Pages with Multiple Results
by evenmonkeys
19 Jul 2012 02:47

I know that the answer exists somewhere.. I just have no idea what I should be searching for.

I have a custom table with userids, win and losses for a game I made. I want to display these results on a custom page using only plugins and templates. I'd rather not create a physical file.

Can someone please point me in the right direction? I don't understand how to create a query in the plugin and display it in the template.

Thanks.

kh99 19 Jul 2012 10:47

If you don't want to create a new file, you can use a plugin on hook misc_start and have your plugin check for a specific value of $_REQUEST['do'], like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


then the url for your page would be misc.php?do=game_stats.


To format your page, you would do your query then build a string with the results, then probably use that string in a template, like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


You could also use a small template to format your game stats if you prefer, rather than putting html formatting in your plugin code.

evenmonkeys 20 Jul 2012 04:49

You are easily the most helpful person I have ever dealt with on this website. No credit taken away from the others that have helped me.. but you are awesome.

Thank you so much. Works perfectly.


All times are GMT. The time now is 09:04.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.