vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Gallery 2.1 and vBulletin 3.5.X integration (https://vborg.vbsupport.ru/showthread.php?t=111931)

extremesanity 07-29-2007 05:51 AM

For those that are getting the following error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

It has been said before on page 4, but what you need to do is fix an error in the upload plugin. Go to plugin manager > Update Gallery User and edit the following line:

Code:

require_once('/home/website/root/forum/gallery2/embed.php'');
remove the double quote at the end so it looks like:

Code:

require_once('/home/website/root/forum/gallery2/embed.php');

adnedarn 09-05-2007 03:06 AM

I'm having the problem like oldgoat above. I have installed G2 into my vbulleting forums directory. All seems to work, but there are no buttons in the navbar. If you manually browse to the gallery2.php page it's there. I thought maybe it was my skin, but looking at the "more" stock skin, I still dont' see anything in the navbar. I don't even know what to type to get someone started in helping me, sorry. But any help would be much appriciated!
Andrew

also, we're randomly getting the error: unexpected T_CONSTANT_ENCAPSED_STRING
If I remove the double quote as stated above, we cannot post or send PMs at all. We get:

Warning: Unknown(/forums/gallery2/embed.php): failed to open stream: No such file or directory in /includes/class_dm_user.php(1657) : eval()'d code on line 1

Fatal error: (null)() [function.require]: Failed opening required '/forums/gallery2/embed.php' (include_path='.:/usr/local/lib/php') in /homepages/42/d98622539/htdocs/terraforums/forums/includes/class_dm_user.php(1657) : eval()'d code on line 1


Thanks very much :)

Riccardo83 09-08-2007 04:25 AM

wouldnt it be good to release a new version of the integration working for 3.6.8 to cut all those discussion short and makes it easier for people to find the right answer.

im still confused if i just download this integration and leave it as it is, or if i have to edit it after?

RvG2 09-24-2007 01:20 AM

or better release a mod/plugin for this :)

Outrack 09-26-2007 08:59 AM

When I run this mod, I receive the message:

Code:

Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/public_html/forum/gallery2/embed.php) is not within the allowed path(s): (/home/outrack/:/usr/lib/php:/usr/local/lib/php:/tmp) in /gallery2.php on line 55

Is there anyway to get past this without having to contact my host to remove the open_basedir restriction?

rammbs 10-02-2007 02:10 AM

i got it working to a point that it's showing the header, albums, footer, etc. but it's not taking into account the css. so the albums are all over.

where is a good place to declare the css? tia!

NineVB 10-03-2007 10:14 AM

So, I decided to take a fat chance and try installing Gallery 2.2 (Latest) with vBulletin 3.6.8, and lo and behold it worked. Well, almost.:cool:

Here's what I did:
I created the gallery2 directory within the forum home, as indicated.
But then I struck a small problem. The "Your album" as well as clicking on an image, would take me to /v/<name>.:confused:
So, I then proceeded to move gallery2.php to /gallery2/gallery2.php, (didn't need to change the embed.php line or anything) and nothing came up. I then linked the file back to gallery2.php and it worked. :D No snags yet. (See minor issues below.)

I did try and add the .xml files for the two addons, and also hit a serious snag.:erm:
Trying to add it as a product said this looks like a Plugin...
Ok, so now to add a plugin.
And I had to do a quick crash course. So here goes for those that don't want to do too mouch soul or web searching:

In the add new plugin part:
  1. Select vBulletin in the first dropdown. (Mine contains vDrupal as well.)
  2. Select the Hook Location as userdata_postsave in the first one and userdata_delete in the second one.
  3. The titles are "Update Gallery User" and "Delete Gallery User" respectively.
  4. Now take the first section from "CDATA[" (Not including, in otherwords, first line starts with "require_once") up to before "]]></phpcode" and paste that as the Plugin PHP Code.
  5. Make sure you do this for both parts, that are listed within the xml file.
  6. Ensure that you have enabled the plugins, and you're done.

I am still trying to figure out, how to not pass the gallery out of the vBulletin forums, when you click on "My Gallery" and any images.

This however is not a major issue right now, as I will change the skin to allow you to go back to either the home page or the forum anyway.

Thankyou for all the work Brent. Well done.
Now I need to figure out how to do a group control from vBulletin to gallery, whereby only members of a specific forum group can add images to the gallery.

softsingapore 10-19-2007 12:26 PM

VBB - 3.6.8
vBadvanced CMPS - v3.0 RC2
Gallery - 2

http://www.soft.com.sg
http://www.soft.com.sg/forum
http://www.soft.com.sg/gallery
http://www.soft.com.sg/forum/gallery.php

Hi guys

I have set up as above but somehow I could not get the integration working.

The forum(with CMPS) and gallery are working fine on their own.

Please help me out here.

Thanks.

James





<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'gallery'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(

);

// pre-cache templates used by all actions
$globaltemplates = array(
'gallery',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

require_once('./global.php');

$navbits = array();
$navbits[$parent] = 'Gallery';
error_reporting(E_ALL );

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

$data = runGallery();
$data['title'] = (isset($data['title']) && !empty($data['title'])) ? $data['title'] : 'Gallery';

function runGallery() {
global $vbulletin, $userinfo;
require_once('/hsphere/local/home/jameswoo/soft.com.sg/gallery/embed.php');


$data = array();

// If it's an anonymous user, set the g2 activeUser to null
$uid = $vbulletin->userinfo['userid'] = 0 ? '' : $vbulletin->userinfo['userid'];


$ret = GalleryEmbed::init(array('embedUri' => '/forum/gallery.php',
'g2Uri' => 'http://www.soft.com.sg/gallery/',
'loginRedirect' => 'index.php',
'activeUserId' => $uid));

rammbs 10-28-2007 04:01 AM

@softsingapore, try using the html code (step 2) from this thread :

https://vborg.vbsupport.ru/showthrea...ry+integration


i had the same problem like you where it showed a blank page.


below are my declarations. compare it to yours and see if it will help.

Quote:


$ret = GalleryEmbed::init(array('embedUri' => 'gallery.php',
'g2Uri' => '/pg/',
'loginRedirect' => '../index.php',
'activeUserId' => $uid));


snapshotz 11-20-2007 06:01 PM

anyone figure out how to include group sync?


All times are GMT. The time now is 10:34 AM.

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.02058 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
  • (3)bbcode_code_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