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)

kompakt 05-11-2005 04:22 AM

Well I searched around and upped the memory limit from within the gallery2.php file it self to 12mb. So the gallery2.php file now shows me the gallery embedded with the forum. Its just showing the album names.

But, I cant login to the gallery with either the G2 users or my VB3 Forum users. I've tried both from gallery2.php and the normal /gallery2

-EDIT
Its working now. The short-url mod that wasnt working with the embedding, I took it off and it worked. Howevery, only people who do not have a previous account registered with G2 can log into the new embedded gallery using their VB accounts.

Thanks...

JimBeam 05-13-2005 07:14 AM

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)

jugo 05-13-2005 11:57 AM

Quote:

Originally Posted by JimBeam
require_once('./global.php');


Change that to

Code:

require_once('/full/path/to/forum/global.php');

whodah 05-13-2005 01:26 PM

Quote:

Originally Posted by kompakt
Well I searched around and upped the memory limit from within the gallery2.php file it self to 12mb. So the gallery2.php file now shows me the gallery embedded with the forum. Its just showing the album names.

But, I cant login to the gallery with either the G2 users or my VB3 Forum users. I've tried both from gallery2.php and the normal /gallery2

-EDIT
Its working now. The short-url mod that wasnt working with the embedding, I took it off and it worked. Howevery, only people who do not have a previous account registered with G2 can log into the new embedded gallery using their VB accounts.

Thanks...

sorry, didn't notice this reply until just now!!

glad to hear you got it worked out!!

as for the user issue: hrm.. i wonder if this directly stems from the known issue in the first post... i didn't come across this issue, but all of my gallery users were embedded in postnuke and now are embedded from G2. i.e. i had no G2 users other then the admin prior to the install of G2...

JimBeam 05-15-2005 12:18 PM

Quote:

Warning: main(./includes/init.php): failed to open stream: No such file or directory in /home/iwap/public_html/forums/global.php on line 54

Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/iwap/public_html/forums/global.php on line 54
The above was found after I specified the path. Can't find what's wrong I hope you can help me point it out.

whodah 05-20-2005 08:16 PM

heya!

a big step forward! :)

just thought i'd let you (others) know that i've installed G2b3, enabled/setup the mod_rewrite module (on the G2 Site Admin), copied the .htaccess file out of my G2 base dir (www/gallery2/.htaccess) and put it into my vB base dir (www/.htaccess), and it's workin!

we can now use bbcode [ i m g ] tags out of our gallery install again! (the pictures now retain their .jpg extension or whatever instead of a long database name)

w00t!

no changes to any files/templates other then the .htaccess files.

now we just gotta get that random block working...

MrToasty 05-21-2005 07:59 PM

Cheers Whodah... I've been meaning to look into this for a very very long time, as i love gallery, and love vbulletin... it looks like you've taken a lot of the hard work for me yourself, and have made it easy for us.

I'm uploading G2 as we speak, have the vb3 gallery2.php file and template at the ready.. I'll let you know how i go here...

Whodah - you da man... this installation does everything i ever hoped and dreamed for in a gallery setup linked to the forums...

I'm extremely impressed...

My only thoughts are, I slipped up with that side menu thing as well... perhaps edit the code in the first post? Other than that, you're a miracle worker!

Also, can anyone tell me what's the easiest way about adding "Viewing Gallery" to the who's online page? Looks a bit ugly at the moment?

ZED28 05-22-2005 04:19 AM

Quote:

Originally Posted by whodah
just thought i'd let you (others) know that i've installed G2b3, enabled/setup the mod_rewrite module (on the G2 Site Admin), copied the .htaccess file out of my G2 base dir (www/gallery2/.htaccess) and put it into my vB base dir (www/.htaccess), and it's workin!

Hey Wodah, I've just implemented this and it works nicley! However, clicking on any of the thumbnails takes the Gallery out of embeded to stand-a-lone mode. I took the liberty of checking your version out and it seems to do the same.

Do you have any idea how to retain the rewrite capabilities and have the images displayed while integrated/nested in VB?

Thanks bud. BTW, Gallery2 gets better with each release!!!

whodah 05-22-2005 05:12 AM

heya!

MrToasty: good idea - i've edited the first post commenting out the 'disable sidebar' line...

ZED28: yes, this was brought to my attention by a couple users as well.

the issue is in our vB .htaccess file... it's skipping our integration php file...

not sure how to fix it just yet, but it should be fixable w/ the current version (G2b3) i.e. we shouldn't have to wait for the next release on this one, woot! talking to one of the programmers, it looks like the next release will skirt this issue w/ a cookie/session setting. but for now, we gotta fix our .htaccess file.

i'll probably visit this issue in the next couple of days.

i got the random block working - kinda... getting some access errors on that so i disabled it. but i'll be working on that soon too.

ZED28 05-22-2005 01:06 PM

Quote:

Originally Posted by whodah
heya!

MrToasty: good idea - i've edited the first post commenting out the 'disable sidebar' line...

ZED28: yes, this was brought to my attention by a couple users as well.

the issue is in our vB .htaccess file... it's skipping our integration php file...

not sure how to fix it just yet, but it should be fixable w/ the current version (G2b3) i.e. we shouldn't have to wait for the next release on this one, woot! talking to one of the programmers, it looks like the next release will skirt this issue w/ a cookie/session setting. but for now, we gotta fix our .htaccess file.

i'll probably visit this issue in the next couple of days.

i got the random block working - kinda... getting some access errors on that so i disabled it. but i'll be working on that soon too.

Thanks for the update Whodah! That's GREAT news on the random block too, that will be the "cherry on the cake" for me!


All times are GMT. The time now is 04:55 AM.

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.02729 seconds
  • Memory Usage 1,760KB
  • 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
  • (3)bbcode_code_printable
  • (5)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