Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 19 Jul 2012, 02:47
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Real name: Austin
Queries on Custom Pages with Multiple Results

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.
Reply With Quote
  #2  
Old 19 Jul 2012, 10:47
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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.
Reply With Quote
  #3  
Old 20 Jul 2012, 04:49
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Real name: Austin
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.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Board Optimization Remove unnecessary queries from search results pages Andreas vBulletin 4.x Add-ons 22 03 Jun 2012 13:13



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 08:42.

Layout Options | Width: Wide Color: