How to Use the Database Classes to Get Data from a Second Database

  • So our site is currently trying to move from vBulletin to Burning Board, and we have some special requirements before we finalize the move. I've been digging through the files in hopes of finding a way to use the database classes to connect to a different database (WordPress, specifically) so that we can use some of the data to integrate the forum with our main site. What would you all recommend? Is there a way to get the existing classes to connect to a new database with specific parameters in the code? Should I design a different database connection? Would it be easier to gather all of WordPress' database connection classes and tie them into BB?

    I look forward to a response. This has been bugging me for awhile.

  • I do not anything about coding/developing or so but there is an existing plugin/extension to connect the WordPress installtion with the WBB4.0
    Unfortunatel, one cannot see how this work at the momemt due to some construction:
    http://www.wbb-world.de/


    What kind of link are you planning to generate?
    What should be linked? The users?

    whats your viewpoint on getting rid of Wordpress and using for example the WL Blog System or even https://localhost/www.hg-202.com another News System which is in development by @TimWolla and @Netzwerg at the moment.

  • We aren't getting rid of WordPress under any circumstances. We've been using it for years and we love it.

    As far as the type of data I want to get, I want to get specific page information from WordPress. We have an interactive navbar that links to useful information on the WordPress part of our site (or will link there in the future, once this is sorted). However, this navbar needs to be built through PHP code and data about all the specific types of pages. I'm not asking for the PHP code to build it; rather, I just need the means to gather the data from the WordPress database.

    If there's a plugin which can do it, I'd love to see it. An existing plugin would drastically reduce development time and could even benefit us in the future. Just one question, though. Do you know if the plugin is FOSS or proprietary? Not that it's much of an issue, but FOSS is always nice.

  • If there's a plugin which can do it, I'd love to see it. An existing plugin would drastically reduce development time and could even benefit us in the future. Just one question, though. Do you know if the plugin is FOSS or proprietary? Not that it's much of an issue, but FOSS is always nice.


    As If I would know that haha :D
    Na sorry I really do not know that

    I only know that WBB world develped for Joomla and Wordpress such a Bridge to have the users who registered to Wordpress can use their login to go to WBB4.
    Ig uess thats all, so bascially a Userbridge.

    I do not know what else would be possible but I'm quite sure there are many developers around who would be willing to help you and have the understanding to do so :D

    (BTW. I wasnt going to get rid of my Wordpress as well but I would love to have my complete community/website under one roof, in the future with WCF 2.1).

  • (Sorry for the sudden user jumping; I didn't know that I had to get my account approved to post in here via the main customer's account, so I was just using his account to seek support. I will be posting using my own account from now on.)

    A user bridge would still be useful to us in the future... But it doesn't solve the immediate problem.

    And I get where you're coming from with having everything "under one roof," so to speak. It would just be a use of resources that we can't afford to delegate at the moment. Plus, we spent so much time customizing our WordPress that to drop it now would be unthinkable. There was a ton of development that went into it.

    Anyway, does anyone else have some opinions and/or ideas?

  • Coming back to the question about the Database Class:
    It is possible and simple to use this class for an externel Access:
    $this->externalDB = new \wcf\system\database\MySQLDatabase($dbHost, $dbUser, $dbPassword, $dbName, $dbPort);

  • Well, the whole wcf is Object-oriented programmed, so everything you like to add normally should also be object-oriented.
    Indeed it is not necessary, you can also use it siple like:
    $mydb = new \wcf\system\database\MySQLDatabase($dbHost, $dbUser, $dbPassword, $dbName, $dbPort);

  • Although, is this intended to be done directly from the database class? You used $this, which implies that you're inside a class.


    Read up on object-oriented programming, and you wouldn't have this question.

    $this denotes the scope of $externalDB, it doesn#t have anything to do with where the class declaration resides. The class can be anywhere, that's why an FQN was used to denote it. If the code snippet were to be places inside the class itself, one would have written $this->externalDB = new MySQLDatabase(...) and not have denoted the class name by it fully qualified name.

    Programming for WCF won't be fun if you don't know OOP.

    "A life is like a garden. Perfect moments can be had, but not preserved, except in memory. LLAP" — Leonard Nimoy

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!