vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Menalto's G2 integration into VB3 (https://vborg.vbsupport.ru/showthread.php?t=80478)

Brent H 03-30-2006 05:44 AM

Awesome! Works perfectly now, no errors :)

A new thread for this really should be created...

defcon_420 03-30-2006 06:19 AM

ok i cant scratch my head no more... this is driving me nuts :confused:

i decided not to upgrade to 3.5.4 YET because there is no way of getting my v3 articles hack to work with 3.5.4 so i upgraded from 3.0.7 to 3.0.13.

All worked well except the intergration of gallery 2.1 into vb 3.0.13
Gallery works standalone

i had it working with vb 3.0.13 and gallery 2.0, but i upgraded to gallery 2.1 and now all i get is this error
PHP Code:

Fatal errorCall to undefined function: iserror() in /home/ganjacon/public_html/home/gallery2.php on line 75 

my gallery is installed into /gallery2
VB is installed into /home

I'm not a programmer so any help is welcome

SilVert 03-30-2006 04:31 PM

Quote:

Originally Posted by defcon_420
ok i cant scratch my head no more... this is driving me nuts :confused:

i decided not to upgrade to 3.5.4 YET because there is no way of getting my v3 articles hack to work with 3.5.4 so i upgraded from 3.0.7 to 3.0.13.

All worked well except the intergration of gallery 2.1 into vb 3.0.13
Gallery works standalone

i had it working with vb 3.0.13 and gallery 2.0, but i upgraded to gallery 2.1 and now all i get is this error
PHP Code:

Fatal errorCall to undefined function: iserror() in /home/ganjacon/public_html/home/gallery2.php on line 75 

my gallery is installed into /gallery2
VB is installed into /home

I'm not a programmer so any help is welcome

Read post ?116? on. that has the NEW(as of 2.1) integration code. they ahnged some varibales...

Brent and i went through some things that might help if you still get errors, and johnmount put up some more code that should resolve any issues you have :)

defcon_420 03-30-2006 05:17 PM

i was under the impression that the variables changed because of vbulletin 3.5.x cause i tried that script and it didnt work with my gallery 2.1 and vb 3.0.13
any ideas?

Brent H 03-30-2006 05:40 PM

The first script ONLY works with gallery 2.0 and vB 3.0... The second script ONLY works with with gallery 2.0 and vB 3.5, and the third script that I posted and johnmont provided fixes for is ONLY for gallery 2.1 and vB 3.5... There is no script for 2.1 and 3.0 that I'm aware of.

silurius 03-30-2006 08:38 PM

Glad to see this effort for 3.5 happening. Are there plans to release this in a new thread over in the 3.5 extensions forum?

Brent H 03-30-2006 09:34 PM

I'll write a tutorial for the 3.5.4/Gallery 2.1 version and post it over there later tonight, maybe we'll get some more people interested in this and expand it further :)

johnmont 03-30-2006 09:36 PM

Plugin 1:

This will delete users from the gallery table when you delete them from the VB Admin Panel.

1. new hook (Plugin System: Add New Plugin)
2. Hook Location: userdata_delete
3. Call it "Delete Gallery User' or something similar
4. The code:

Code:

require_once('/absolute/path/to/gallery2/embed.php');
$ret = GalleryEmbed::init();

if ($ret) {
//  echo $ret->getAsHtml();
}
$uid = $this->existing['userid'];

$ret2 = GalleryEmbed::deleteUser($uid);

if ($ret2) {
//  echo "ret2".$ret2->getAsHtml() ;
}

You can uncomment the echos to see what is happening if badness occurs. Now whenever you delete a user from VB, you'll delete that user from Gallery, as well as the entry in the gallery ExternalIdMap database table.





Plugin 2:

This plugin will:

a. Update a VB user's information in the gallery2 database when they modify their User CP.
b. If a user has not been created already in the gallery2 database, a new user will be created.
c. Also note the use of custom user fields in the code, to allow for full names in the gallery information area.

Installation is similar to my previous post:

1. new hook (Plugin System: Add New Plugin)
2. location: userdata_postsave
3. call it "Update Gallery User" or something
4. The code follows:

Code:

require_once('/absolute/path/to/gallery2/embed.php'');
$ret = GalleryEmbed::init();

if ($ret) {
//  echo $ret->getAsHtml();
}


// Set fullname based upon custom fields
$fullname=$this->existing['field13'] ." ". $this->existing['field14'];


// Set the array for updating
$args['fullname']    =  $fullname ;
$args['username']    = $this->existing['username'];
$args['hashedpassword'] =  $this->existing['password'];
$args['hashmethod'] =    'md5';
$args['email']      =  $this->existing['email'];
$args['language']  =  $this->existing['lang_code'];
$args['creationtimestamp']  =  $this->existing['joindate'];
$args['groupid']      =  $this->existing['usergroupid'];

// Get the userid
$uid = $this->existing['userid'];


$ret = GalleryEmbed::isExternalIdMapped($uid,$args);

//Now if no user exists, we'll create one
//If user exists, we'll update existing user

if ($ret && ($ret->getErrorCode() & ERROR_MISSING_OBJECT)) {

 $ret2 = GalleryEmbed::createUser($uid,$args);

}else {

 $ret2 = GalleryEmbed::updateUser($uid,$args);

}


if ($ret2) {

//  echo "ret2: ". $ret2->getAsHtml() ;
}


defcon_420 03-30-2006 10:43 PM

can anyone give some help with 3.0.x to 2.1?

/me scratch's head

alternatively if someone could point me in the right direction to get v3 articles working with VB 3.5.X or find a way to get the articles i have in my database displayed in another articles hack i could then upgrade to 3.5.x

help please

Brent H 03-31-2006 03:32 AM

Awesome, johnmont, thanks!


All times are GMT. The time now is 07:36 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.02033 seconds
  • Memory Usage 1,751KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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