The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Adding PHP to postbit??..
I have a seperate database, and I would like to add stats from that database into the postbit, how would this be possible to do?
I know PHP/SQL I just don't know if this is the right place to do it, and how exactly to do it without screwing up my forums (I'm new to vB I just bought my license two days ago). I'm trying to add stats such as: Game ID, Guild, Money, Cash, etc. If anyone could help me that'd be great. |
#2
|
||||
|
||||
1) setup a dev board, perhaps localhost, run it in developer mode.
1a) install / create a replica of your site, and the stats you need to acces. ------------ 2) Create a new product in vb product section. 3) Create a new plugin, and work from the plugin either with str_replace and find a good spot to edit and make the changes.. --------------------- TIP's : -----------
Alternatly request a modification or hire a vb coder.. - Request modification (unpaid) - Hire help (requests for paid services) ------------------------------ I can help you a little, this modification adds a "single" link in the postbit via the plugin system.. I made it pr request for some guy.. https://vborg.vbsupport.ru/showthread.php?t=235619 With that atleast showing stuff in postbits should be somewhat simple to add. Accesing the actuall database and rendering/registering the variables you need to display, it needs to be done in the plugin itself, it takes php code. Hope it helps, and welcome. |
#3
|
||||
|
||||
Quote:
Well my thing is just adding stuff from my database to postbit, getting the PHP to actually work. I know how to add more fields to the postbit, that's the easy part. I'll take a look at it, thanks. |
#4
|
|||
|
|||
Here is what I do to grab info from a separate database and display that information by calling the variable in a template using the command {vb:raw $var}
You will want to create a plugin that calls your php script. In the script echo the contents you want displayed. Code:
Hook Location: global_start Plugin PHP code: ob_start(); include('/path/to/your/php/file.php'); $var = ob_get_contents(); ob_end_clean(); vB_Template::preRegister('SHOWTHREAD',array('var' => $var)); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|