The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Querying the Database
I asked over at vBulletin.com's forums (here) and was directed here for custom modifications.
I'm trying to do a custom member map for my forums, but I can't get round this. I want to query a table I've made in the database which contains information about the members' locations, but I can't figure out how to do it. I've made a raw PHP file which calls the template I've made. Do I have to call from another PHP file by means of include(), or is there an easier way? Does it have anything to do with Replacement Variables? Thanks in advanced. |
#2
|
|||
|
|||
this will depend on a lot of things, for example are you going to retrieve just 1 record, or more. Are you including global.php to make vB functions available?
Easiest would be if you posted the script you got until now. |
#3
|
|||
|
|||
I've not written a script yet, as I don't know where to start with this. I can do all the querying stuff fine in PHP, but the problem I have is where to put the actual PHP code that queries stuff from the database. It will include the vB template, so I'll have all the usual global.php stuff and navbars etc.
Basically, do the custom query codes have to go within a [do] function, like this: PHP Code:
Sorry if this is confusing. NB. I've not yet upgraded my board to 3.5.0 RC X from 3.0.8, we're waiting for the Gold version, but I've read about Hooks and Plugins - does this allow you to specify custom PHP code and have it called from a custom php file? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|