Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Connector API for vBulletin Details »»
Connector API for vBulletin
Version: 0.02, by Noodles24 Noodles24 is offline
Developer Last Online: Apr 2018 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-28-2006 Last Update: 05-10-2006 Installs: 50
Additional Files Is in Beta Stage  
No support by the author.

What it does
Allows you to access vBulletin functions and data through an API. This is useful if you want to tie vBulletin into a larger site and allow the users to only have 1 login for site/forum.

Allows other applications to edit data in vBulletin

Warning
This API opens up a lot of the internal functions of vBulletin, use it carefully and do not trust any input from the browser. Clean and validate your inputs!

Installation
Unzip the files into your the root of your forum
You may need to change
PHP Code:
/* User changable options */
// change this to your forum path.
$forumroot $_SERVER['DOCUMENT_ROOT']."forum";
/* end of User changable options */ 
in the connector.class.php if your forum doesn't sit in /forum/ on your site.

[0.02]
Added addUser function
Added delUser function
Added getUser function
Added editUser function
Cleaned up code
Added comments
Fixed warnings in 3.5.4
Fixed PHP4 incompatability

[0.01]
Initial quick dirty release.
Includes basic API
Allows login/logout through API

TODO:
Error checking function(s)
Forum listings
Topic/Post listings

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #62  
Old 05-27-2009, 05:37 PM
Jeff@Mutant Jeff@Mutant is offline
 
Join Date: Jul 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #63  
Old 05-28-2009, 09:11 AM
g.gadaleta g.gadaleta is offline
 
Join Date: Nov 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Me too, same error. Any idea?

Quote:
Originally Posted by Jeff@Mutant View Post
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?
Reply With Quote
  #64  
Old 07-17-2009, 01:36 PM
xilefen xilefen is offline
 
Join Date: Jul 2009
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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']
);
Reply With Quote
  #65  
Old 07-21-2009, 03:32 AM
rruchte rruchte is offline
 
Join Date: Jul 2009
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by g.gadaleta View Post
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);
Reply With Quote
  #66  
Old 07-27-2009, 09:06 AM
xilefen xilefen is offline
 
Join Date: Jul 2009
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #67  
Old 11-07-2009, 11:30 AM
Clayton Clayton is offline
 
Join Date: Nov 2004
Posts: 216
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this was so ahead of its time
Reply With Quote
  #68  
Old 06-28-2011, 10:13 AM
Lysekoid Lysekoid is offline
 
Join Date: Jan 2011
Location: Sweden
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #69  
Old 07-14-2011, 07:29 AM
kamilkurczak kamilkurczak is offline
 
Join Date: May 2010
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am waiting for post/thread adding system
Reply With Quote
  #70  
Old 09-12-2011, 01:38 PM
c0der's Avatar
c0der c0der is offline
 
Join Date: Oct 2010
Location: Egypt
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice

but have alot of errors
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05363 seconds
  • Memory Usage 2,300KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete