ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to Integrate Vbulletin object into codeigniter?

March 27, 2009 3:24pm

Subscribe [6]
  • #16 / Jul 03, 2011 2:49pm

    Uplift

    18 posts

    Just a note, I couldn’t get the vb datamanagers working from within CI, or at least the one I was trying which was the user datamanager.  I kept getting “Call to a member function query_first_slave() on a non-object” errors and finally tracked it down to the fact that we were unsetting $GLOBALS[‘vbulletin’].  The datamanagers internally call upon the global $vbulletin, so we can’t unset it if we want to use datamangers, unless Im missing something.  After commenting out this line I was able to use the user datamanager and change a persons usergroup with no errors.  This hasn’t yet shown to prove harmful to anything else that I’ve done, although it probably consumes more memory because you aren’t destroying the global vbulletin object.

    Has anybody done anything interesting with CI/VB integration?  Any common issues?  It would be nice if we could collaborate so everything is in one thread.

    Thanks.

    I’m trying to use the above code

          $query = $this->vbulletin->db->query_read(“SELECT * FROM post WHERE postid = 1”);
          $post = $this->vbulletin->db->fetch_array($query);
         
          print_r($post);

    but get the error you mentioned above

    Fatal error: Call to a member function query_read() on a non-object ...

    i’m pretty sure this worked when i first tested it before i built my site :s

    i can use stuff like getUsername(), hasSession() without issues.

    any ideas?

    [edit] i also get

    A PHP Error was encountered
    Severity: Notice

    Message: Undefined property: vBulletin::$db
    Filename: controllers/theme.php
    Line Number: 22

  • #17 / Jul 31, 2011 3:27pm

    Uplift

    18 posts

    bump :( anyone?

  • #18 / Aug 04, 2011 4:18pm

    Uplift

    18 posts

    bump :p

  • #19 / Aug 06, 2011 7:10am

    nikes

    31 posts

    And it does work great.  Thank you again for this!

  • #20 / Nov 11, 2011 4:12pm

    Swedie

    61 posts

    I have the code initalizating the vBulletin global object but I have an issue with the charset of vB not matching CI. vB is ISO-8859-1 (Swedish) and CI is UTF-8. I set charset utf-8 in the meta-tag. No difference setting it iso-8859-1 or removing it. It still messes up the å ä ö characters on the rendered page.

    Anyone with a clue how to change this?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases