Welcome Guest, Not a member yet? Register   Sign In
vBulletin and CodeIgniter

Nice, keep me posted.

I would write
if ($config['MasterServer']['usepconnect'] = 0)
  $db['default']['pconnect'] = FALSE;
  $db['default']['pconnect'] = TRUE;


$db['default']['pconnect'] = ( $config['MasterServer']['usepconnect'] = 0 ? FALSE : TRUE);

just my 2cents Wink otherwize, looking good so far.

[eluser]Mark LaDoux[/eluser]
Thanks, i'll do that. I'm still prototyping a lot of my code and i have a bad habit of using long forms.

here's the version with the recommended changes....

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
| -------------------------------------------------------------------
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
| For complete instructions please consult the "Database Connection"
| page of the User Guide.
| -------------------------------------------------------------------
| -------------------------------------------------------------------
|    ['hostname'] The hostname of your database server.
|    ['username'] The username used to connect to the database
|    ['password'] The password used to connect to the database
|    ['database'] The name of the database you want to connect to
|    ['dbdriver'] The database type. ie: mysql.  Currently supported:
                 mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
|    ['dbprefix'] You can add an optional prefix, which will be added
|                 to the table name when using the  Active Record class
|    ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
|    ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
|    ['cache_on'] TRUE/FALSE - Enables/disables query caching
|    ['cachedir'] The path to the folder where cache files should be stored
|    ['char_set'] The character set used in communicating with the database
|    ['dbcollat'] The character collation used in communicating with the database
| The $active_group variable lets you choose which connection group to
| make active.  By default there is only one group (the "default" group).
| The $active_record variables lets you determine whether or not to load
| the active record class

// adjust this to point to relative path of your vB includes/config.php
require_once 'forums/includes/config.php';

$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = $config['MasterServer']['servername'];
$db['default']['username'] = $config['MasterServer']['username'];
$db['default']['password'] = $config['MasterServer']['password'];
$db['default']['database'] = $config['Database']['dbname'];
$db['default']['dbdriver'] = $config['Database']['dbtype'];
$db['default']['dbprefix'] = $config['Database']['tableprefix'];
$db['default']['pconnect'] = ( $config['MasterServer']['usepconnect'] = 0 ? FALSE : TRUE);
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

/* End of file database.php */
/* Location: ./system/application/config/database.php */

[eluser]Mark LaDoux[/eluser]
Quote:One issue I have with vBulletin is that you cannot include the forums/global.php to get more access to vbulletin’s core, because CI removes all GET variables, this makes it impossible for vBulletin to build its core.

This is an issue for me because I need vBSEO links parser, which the system is integrated into vBulletin Core, so basically I have a lot of reverse engineering to do.

I was just curious, and i'm gonna try it out myself, but couldn't this be worked around by enabling query strings in CI?

no, i don't think this will work because codeigniter literally destroys the get variables. you can get the data from get / query strings by using $this->input->get('') but... vBulletin uses $_GET.

I suggest you try it, but i'm pretty sure you can't build the vb core by including the global file.

[eluser]Mark LaDoux[/eluser]
Yeah, i tried it, and it broke a lot of things in my app, I'm gonna try and build a library that will reproduce it's effect, but due to vB's licensing, I don't think i can ever release it... I'll go and look up the legal implications.

I'm also going to experiment with hooks, maybe i can load the functions *before* the filters come into place.

Tried that vbuser lib, and it works wonderfully, i had to remove the get_avatar function and its referances as it was causing chaos if you weren't logged in.

ah, sorry about that. I just pulled it out of my current ci+vB site (which isn't live) and added some config vars. guess i should have removed the getAvatar calls myself. they work for me though Confusedhrug:

[eluser]Mark LaDoux[/eluser]
no worries, if i couldn't debug such a small thing, i'd be worried about my chances of success with this project.

Hi t0nedef!

I'm curious how this project is going? I'm looking over my website where i've used vBuser and am thinking about putting some work into it.

Have you worked at all with vBulletin's VBCODE system at all? I think at one point I tried getting a good VBCODE script going and i'll i've come up with was a basic class.

The purpose of such a script would be able to parse threads from vBulletin's forums and display them properly on external pages.

I've also done a little big of manipulating a script from a vBulletin 2.x portal called vBindex that was never properly ported to vBulletin 3.x. I was able to re-create the news thread section, and latest forum posts from that script.

If you need something similar me know, i'd love to get a solid vBulletin package going we could release for the community.

[eluser]Mark LaDoux[/eluser]
Well, I had to put the project on hold for like a week, but I'm back on it again. Anyway, what happened is I analyzed the database and figured I was going about it all wrong. I have realized that trying to integrate directly via vB's php was not the way to go. I am rather integrating based on what I have found in the database set, and reproducing much of the functionality, and extending upon it where necessary. In this way, I am able to fully integrate with any existing vB function, yet still keep my code separate from that unmanageable mess. I was able to avoid hooking of any kind, and most of my work is done through models.

However, I may recode a lot of it to be an all around library. The Pro's to this, I should be able to release all of my code, and I should be able better maintain the code in this format. The con's, It's gonna take me a little bit longer to do it this way, and of course, I am still forced to go through a lot of vB's code line by line in order to research how vB stores data. I should have a workable release by mid-January, mostly due to my schedule at school. I'm doing this alone right now, and I am on a limited schedule.

[eluser]Mark LaDoux[/eluser]
sorry i didn't get back sooner, the site i'm coding for has decided to switch to smf because he no longer wants to pay for vBulletin licenses when the other software provides all the features he wants, so i won't be continuing this project.

Theme © iAndrew 2016 - Forum software by © MyBB