vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Connector API for vBulletin (https://vborg.vbsupport.ru/showthread.php?t=114338)

Jeff@Mutant 05-27-2009 05:37 PM

Hello

I'm running vB 3.8 and I 'm getting the following error when trying to use the Connector API

Code:

Fatal error: Call to a member function unlock_tables() on a non-object in /var/www/forums/includes/functions.php on line 5772

Any idea what's going on?

g.gadaleta 05-28-2009 09:11 AM

Me too, same error. Any idea?

Quote:

Originally Posted by Jeff@Mutant (Post 1818250)
Hello

I'm running vB 3.8 and I 'm getting the following error when trying to use the Connector API

Code:

Fatal error: Call to a member function unlock_tables() on a non-object in /var/www/forums/includes/functions.php on line 5772

Any idea what's going on?


xilefen 07-17-2009 01:36 PM

Has somebody an example for the dbConnector?

// make database connection

$db->connect(
$this->config['Database']['dbname'],
$this->config['MasterServer']['servername'],
$this->config['MasterServer']['port'],
$this->config['MasterServer']['username'],
$this->config['MasterServer']['password'],
$this->config['MasterServer']['usepconnect'],
$this->config['SlaveServer']['servername'],
$this->config['SlaveServer']['port'],
$this->config['SlaveServer']['username'],
$this->config['SlaveServer']['password'],
$this->config['SlaveServer']['usepconnect'],
$this->config['Mysqli']['ini_file'],
$this->config['Mysqli']['charset']
);

rruchte 07-21-2009 03:32 AM

Quote:

Originally Posted by g.gadaleta (Post 1818654)
Me too, same error. Any idea?

I just got this working in vB 3.5.8. In connector.class.php, lines 99-116 do the same thing as lines 233-252 in include/init.php. In vB 3.5.8, most of those lines are commented out. Starting at line 106 in connector.class.php, change
Code:

    define('SAPI_NAME', php_sapi_name());
    if (!defined('NOSHUTDOWNFUNC'))
    {
      if (PHP_VERSION < '5' OR ((SAPI_NAME == 'cgi' OR SAPI_NAME == 'cgi-fcgi') AND $this->options['gzipoutput'] AND strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false))
      {
        define('NOSHUTDOWNFUNC', true);
      }
      else
      {
        vB_Shutdown::add('exec_shut_down');
      }
    }

To:

Code:

    /*
    if (!defined('NOSHUTDOWNFUNC'))
    {
      if (PHP_VERSION < '5' OR ((SAPI_NAME == 'cgi' OR SAPI_NAME == 'cgi-fcgi') AND $this->options['gzipoutput'] AND strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false))
      {
        define('NOSHUTDOWNFUNC', true);
      }
      else
      {
        vB_Shutdown::add('exec_shut_down');
      }
    }
    */   
    define('NOSHUTDOWNFUNC', true);


xilefen 07-27-2009 09:06 AM

Hi,

I use the vConnector API to create and/or authenticate Users and skip login.

Code:

include ('includes/connector/connector.class.php');
$connector = new vbConnector();

// get CASUser
$casuser = phpCAS::getUser();

// get UserID if present
$result = $connector->getUserID($casuser);

// check, if user is allready registered
if(empty($result)){
// edit/save new user
$user = array('username' => $casuser, 'password' => 'default', 'email' => 'test@test.com');
    $result = $connector->addUser($user);
}

// Login user
session_start();
$result = $connector->doLogin($casuser, "default", 1);

I 'm getting the following error:

Fatal error: Cannot redeclare class vBulletinHook in C:\xampp\htdocs\forums\includes\init.php on line 288

Any idea to fix this?

Thanks Felix

Clayton 11-07-2009 11:30 AM

this was so ahead of its time

Lysekoid 06-28-2011 10:13 AM

Where do I find something similar for vBulletin 4, since this example is from 2006 I guess it doesn't work for the new vBulletin 4.

kamilkurczak 07-14-2011 07:29 AM

I am waiting for post/thread adding system

c0der 09-12-2011 01:38 PM

nice

but have alot of errors


All times are GMT. The time now is 11:33 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01191 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete