The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Gallery 2.1 and vBulletin 3.5.X integration
This tutorial will outline the steps needed to integrate your vBulletin 3.5.X and Menalto Gallery 2.1 installations. The original thread located here has become a little too scattered, and since it's original focus was on the Gallery 2.0 and vBulletin 3.0 series, I think it'd be beneficial to start this new thread so that the information is more easily found for the 3.5.X and 2.1 series. Before we begin, you should be aware that this tutorial assumes that you'll be placing your gallery in the root directory for your forums. My directory structure looks a little like this: public_html/Vbulletin Files and public_html/gallery2/Gallery Files As long as your gallery folder is located within your root vBulletin directory, this should work just fine. Step 1: Install Menalto Gallery 2.1. Remember to upload the "gallery2" folder INSIDE your root vBulletin directory! Step 2: Create a new file containing the following, and save it as gallery2.php: PHP Code:
Step 3: Find and edit the following code to suit your site setup: PHP Code:
PHP Code:
Step 4: Create a new template in your style manager called gallery2 containing the following: HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head>$headinclude $data[headHtml] </head> <body> $header $navbar <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat">Gallery</td> </tr> <tr> <td class="alt1">$data[bodyHtml]</td> </tr> </table> $footer </body> </html> You can achieve further integration by using johnmont's plugins which will:
PHP Code:
Hopefully this tutorial sparks a little more interest in this area and we can get some additional people contributing solutions to achieve tighter integration :banana: As the integration progresses, I'll update this thread to keep everything together and accessable. Enjoy! |
#202
|
|||
|
|||
Ive just installed gallery 2.1.2 on vb3.6.4 and just thought i'd share my experiences based on having vb installed under /forums and the gallery under /forums/gallery2
After following the instructions in the first post none of the g2 images/javascript/css files were being called correctly (the html was showing src="forums/gallery2.." instead of src="/forums/gallery2..") The important variables were originally set like this: require_once('/home/thrasher/public_html/forums/gallery2/embed.php'); 'embedUri' => '/gallery2.php' 'g2Uri' => 'http://www.mysite.com/forums/gallery2' i found changing these two got everything working: 'embedUri' => 'gallery2.php' 'g2Uri' => '/forums/gallery2' |
#203
|
|||
|
|||
Quote:
i still have to upgrade.. thanks for the headsup man! |
#204
|
|||
|
|||
Quote:
I've attached a pic with a dummy user I made to show you what I mean. There are no options to add pics when a new account is made automatically. Cheers Travis |
#205
|
|||
|
|||
Never mind, I figured it out.
Fatal error: Call to a member function on a non-object in /home/********/public_html/forum/gallery2.php on line ### this error is caused by deleting a user in gallery2's user db, but not removing there external id from the db. after I did that, it all works again. |
#206
|
|||
|
|||
Quote:
The problems I have so far with this integration are: - no default sub-album built for each new user - users can set own permissions and settings for albums (I don't need 5 mb raw pictures on my web server) The script needs to built a default album set off of the main gallery album permissions, then set permissions for the each user and the registered user group automatically. Is it supposed to do that now or is that something I need to add? |
#207
|
|||
|
|||
Quote:
It should go after this line (aprox line 76) 'activeUserId' => $uid)); Add this line after: ---------------------------------------- if ($vbulletin->userinfo[usergroupid] == 5 or $vbulletin->userinfo[usergroupid] == 6 or $vbulletin->userinfo[usergroupid] == 7 or $vbulletin->userinfo[usergroupid] == 39 or $vbulletin->userinfo[usergroupid] == 43) { ---------------------------------------- Change the number after the == to whatever vB usergroups ID# you want to allow Album & photo posting access to. and add a } after this line of the 2nd. else statement to make 3 } ex: Should look like this (aprox line to add in area of line 123: if ($ret) { print $ret->getAsHtml(); return false; } } else { echo '<HR>line: '.__LINE__.', G2 did not return a success status. Here is the error message from G2: <br />'.$ret->getAsHtml(); return false; } } else { echo '<HR>line: '.__LINE__.', G2 did not return a success status. Here is the error message from G2: <br />'.$ret->getAsHtml(); return false; } } } //<----- Add this } // ------------------------------------------- With the owner admin account on gallery 2 be sure edit your guest, regestered user permisions for the main gallery page. hope that helps. |
#208
|
|||
|
|||
Quote:
Basically the way I did it was I logged into the standalone login as the admin and created a gallery. I then set permissions on that gallery to allow registered users to create albums of their own. The problem arises because a register user has way to much freedom when creating their own album. I want a user to be able to create sub-albums, but force them to use the settings from the parent albums so they are not uploading 2000 pixel images. In addition, the standalone version will create a default album for the user and switch them to that album when they are first created. The integration script does not yet do that. I will probably change that here fairly soon, as soon as I can get the permissions problem figured out. |
#209
|
|||
|
|||
Hello All,
my question : Would it be possible - to have Gallery on one server and vB on another (to save bandwidth on the vB server ) and though just 1 login system ? or - to have Gallery and vB on the same server (which would share the same registration process) and store all the media files on another server ? By other server I mean another domain Thanks |
#210
|
|||
|
|||
I'm getting this error when trying to add a user in the VB Admin Control Panel after installing the plugins. I modified the paths and followed all of the directions...
User Manager Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/rjmdiam/public_html/olfaithful/forums/includes/class_dm_user.php(1657) : eval()'d code on line 10 |
#211
|
||||
|
||||
For anyone who experienced blank pages: I kept getting a normal page when every unregistered guest got a blank one. Turns out it was simply a matter of I had added the 'gallery2' template to one style set, and my default style set was something different.
Felt really stupid, but at least it was an easily fix Just something to keep in mind! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|