Hi. I'm sorry but I have encountered some problems doing the integration.
I got the below error.
Code:
Warning: main(./global.php): failed to open stream: No such file or directory in /home/iwap/public_html/gallery/gallery.php on line 32
Fatal error: main(): Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/iwap/public_html/gallery/gallery.php on line 32
What I've done is change the filename to gallery and also the gallery folder to gallery. The template is still the same gallery2.
Code:
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
$navbits[$parent] = 'Gallery G2';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
// #######################################################################
// ###################### Begin G2 integration code ######################
// #######################################################################
$data = runGallery();
$data['title'] = (isset($data['title']) && !empty($data['title'])) ? $data['title'] : 'Gallery';
function runGallery() {
global $bbuserinfo;
require_once('../gallery/embed.php');
$data = array();
// if anonymous user, set g2 activeUser to null
$uid = $bbuserinfo['userid'] = 0 ? '' : $bbuserinfo['userid'];
// initiate G2
// you need to edit the following 4 lines to suite your VB3/G2 install!!!
// this is setup for a install that looks like:
// public_html/VB/<vb files>
// public_html/gallery2/<gallery2 files>
// and also setup for a VB3 tempalte name of 'gallery2'. if you have any
// differences, make those changes here!
// you might need to change 'loginRedirect' if you have your VB3 setup to
// where index.php is not the root page of VB3... i.e. if you've changed it
// to forums.php or something of the like.
$ret = GalleryEmbed::init(array('embedUri' => 'gallery.php',
'embedPath' => '/forums',
'relativeG2Path' => '../gallery',
'loginRedirect' => 'index.php',
'activeUserId' => $uid));
The final thing different is that the url is a sub domain. (gallery.mysite.com/gallery.php)