![]() |
How can I use a external database with vb Blocks
1 Attachment(s)
Hi , Sorry because my English is weak, but I liked to write a topic on the use of an external database within the Forum's Blocks .
Go to : admincp -> Forums & Moderators -> Forum Blocks Manager -> Add Block : Custom Html / Php Add new block: Custom HTML/PHP Title : Your title ; Description : your description ; Cache Time (in minutes) : 60; Content Type : Php Content : *** Template to Use : add your template . (eg. block_html) The content : PHP Code:
Create a new template . HTML Code:
<ul> Attachment 114191 |
& What is in your db? For the screenshot? Looks like a normal forum block.
|
He's just showing how to call content from a different database other than your forum one.
|
Quote:
In my another db i have an article system, so I display the list of sections . |
Couple of suggestions...
When going outside the vB DB class, track your new connection by explicitly using the resource identifiers Like... PHP Code:
Try putting your ob_end_clean() before your return $output too. Although, I don't see the point of using it. I guess you're trying to catch any errors and tag them on to the output? I'm not crazy about using constants (DEFINE) for passwords and such either. |
All times are GMT. The time now is 02:01 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|