How does Gallery 2 integrate with Drupal 6?
rvan1
![]()
Joined: 2009-02-17
Posts: 2 |
![]() |
I have a multisite setup, where I want to use Gallery2 in one of the sites. I have Gallery2.3 setup in '../webroot/gallery2/' and have setup the multisite copy in '../webroot/gallery/', as well as in '../webroot/sites/gallerysite.com/gallery2/'. I've installed the Drupal 6 'gallery' module and in the settings it says this: .......... Gallery2 locations OK The Gallery2 location settings appear to be correct. Drupal Modules / Gallery2 Plugins Error You may have some loss in functionality in your embedded Gallery2 (see below for details). You should check the details and if the functionality is not important for your site you can just ignore this. Clean URL / URL Rewrite Warning Initial User Synchronization Error Sometimes it will say there's a problem with my location and that I should install gallery within Drupal. I don't have a 'drupal' folder. My setup is the kind where Drupal is installed at webroot, rather than in a sub-directory. I don't have a full understanding of mod-rewrite and htaccess rewrite rules. My phpinfo doesn't indicate that a mod-rewite module is installed, but my webhost says it is. It appears that this is so you can implement virtual URLs or have the URLs appear differently than what actually exists on the webserver. So to use this, I would need to create an htaccess file in gallery2 full of patterns for translating URLs, but I don't know what those patterns should be. This file also needs to be compatible with the htaccess file at webroot. ......... In the Gallery2 admin, the URL rewrite, Ffmpeg, ImageMagick, and NetPBM plugins are all inactive. Gallery2 seems to work OK, and I don't know if I need URL rewrite or the other plugins. So my questions are: Assuming my install is OK, how would I go about adding Gallery content into a Drupal page? Do I need to start with creating a 'gallery' content type or block? To build a site this way, I need to customize a theme and embed gallery2 into it. Why not just customize the gallery2 theme and use it directly, rather than embedding it into Drupal? Is it to give Drupal control over the theme, so with multisite, you can skin the same Gallery2 in different ways, as well as have a wider selection of themes you can use? I'm using a Linux Apache/MySQL/PHP setup. Regards, |
|
rvan1
![]()
Joined: 2009-02-17
Posts: 2 |
![]() |
After more searching I found more of the core info on integrating gallery into drupal and what happens when its all setup. When in the Gallery, the toggle 'Sidebar' link appears but doesn't work anymore. I tried to comment it out in 'theme.tpl' but is doesn't go away. I know I need that nav bar in there because it renders the 'site admin' link when logged in. So I'm looking into this issue now. |
|
fotonut
Joined: 2009-02-21
Posts: 74 |
![]() |
Let me know what you find. I am new to all this but I got to where you are by some miracle and now the sidebar is all I see that doesn't work in my implementation as well. I have Gallery2 in another subdirectory, used the simlink call from a PHP file I created only to create the simlink (don't have shell access on my host) which gave me a duplicate image From there I went to Drupal admin, Site Configuration, Gallery settings, General, Links to relavent Drupal galler2, Embedded URL..., Rules, Show Item, change to "gallery/v/%path%" by adding gallery to front of existing text. Now everything works except the side-bar, at least technically. Aesthetically I find now that my Copper theme in gallery 2.3 extends greatly beyond the boundaries it now overlays using my most recent Marinelli-Giordani Drupal 6.15 theme. Not sure where to go from here but I do know the route is a severe learning curve for me. |
|
fotonut
Joined: 2009-02-21
Posts: 74 |
![]() |
I am looking for just one person who has set up Drupal 6 with the Gallery2 module to integrate Gallery 2.3 into Drupal where Gallery is NOT a sub directory off of Drupal. Has anyone done this? I set up on my virtual hosting provider 3 directories: /MyDrupal (pointed by by www.mydomain.com) /MyGallery2 (pointed to by gallery.mydomain.com) /GalleryData (data directory accessed by MyGallery2) - Drupal and Gallery 2 work flawlessly stand alone Drupal installed: Gallery 2 module + more Gallery2 installed: URL rewrite, Image Block, Image Frame + more Linux mod: ln -s /path/to/Mygallery2 Now, I have Drupal and Gallery2 working stand-alone flawlessly. Let us check what happens when I try to access the simlinked Gallery directory from Drupal by following my URL to Drupal with the cloaked sub-directory: Which results in: Two issues: 1) From my Drupal application, when I navigate to www.mydomain.com/MyGallery2 to my delight and framed within the context of my Drupal window, within that frame I see thumbnails of all my albums and comments. I can expand comments, navigate comments, move from page to page of album thumbnails but I CANNOT NAVIGATE TO AN ALBUM BY CLICKING THE THUMBNAIL. When I click the thumbnail the URL switches to: 2) From the Gallery2 application, I was assuming that I should be auto-logged into Gallery2 once I log into Drupal. I know the feature to sync IDs is working because once I create an ID on Drupal, it also appears in the ID list on Gallery2 and I can manually log in to Gallery2 using this ID I created in Drupal. Any help would be appreciated, i.e. a look at your URL Redirect entry in the .htaccess or the Gallery2 page defining your redirects. I think this may be where my problem is. Again, this is only a request for info from a configuration where a simlink has been used to dummy up or "cloak" the /MyGallery2 being in a sub directory of Drupal /MyDrupal/MyGallery2 when in reality it is not. Thank you in advance!!! Historical note: I set up a rather large gallery on Gallery 2 before I decided to install Drupal, so thus I am not anxious to move my Gallery to a sub-directory of Drupal but that may indeed by the only answer. I seem so close to what I am looking for, I can almost smell it ;-) |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Quote:
Gallery2 installed: URL rewrite, Image Block, Image Frame + more You don't want to setup rewrite standalone when you are trying to integrate. Setup rewrite from the integrated gallery. Quote:
where Gallery is NOT a sub directory off of Drupal. Why??? its so very very easy to move the gallery directory to a sub-directory(you don't need to move the data directory) - especially if that's what Drupal requires. -s |
|
fotonut
Joined: 2009-02-21
Posts: 74 |
![]() |
Deleted due to issue with format from moderator |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
never attach that much text to any forum ever. copy it to a txt file and attach it properly. -s |
|
fotonut
Joined: 2009-02-21
Posts: 74 |
![]() |
Well in the process of messing with this, I can no longer access the Admin menu for Gallery. Not sure where to go from here. When I click on admin menu I get a 404 page, Looks like it's going to be an interesting journey from here What I did was went into the admin function of Gallery2 while I was in Drupal and disabled and reenabled the URL rewrite, then I did a refresh and could no longer get to Admin in Gallery2 from Drupal. At that point I signed directly into Gallery2 and clicked on Site Admin option and the admin menu had disappeared from there as well. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Quote:
http://www.mydomain.com/admin/?g2_return=%2Fmain.php => Error 404 NOT FOUND if you disabled rewrite, did you remove the rules from .htaccess? the rewrite rules you previously setup would no longer apply. -s |
|
fotonut
Joined: 2009-02-21
Posts: 74 |
![]() |
That link you suggest gets me now to a pure white page (no longer a 404) ..... |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
you may have to remove .htaccess from your gallery directory. -s |
|
fotonut
Joined: 2009-02-21
Posts: 74 |
![]() |
I have another gallery site that is not attached to Drupal. This one has URL redirect . I grabbed the .htaccess from it (with just straight URL redirect block in it and tired it (I get the 404 error) then I deleted the .htaccess all together and when I do that and use the admin link you suggest, I get the blank screen. Thank you. |
|
fotonut
Joined: 2009-02-21
Posts: 74 |
![]() |
I fixed it! Here is what I did; searches led to "White Screen of Death" http://drupal.org/node/158043 - added the code to turn on debugging in index.php; still got a white screen of death with no trace of error message Still had the white screen of death so I tried this: created new .htaccess file with this info: AddType x-mapp-php5 .php Options -MultiViews RewriteEngine on
Now this time when I went to this URL I got to the admin page!!!! Still no photo thumbnails and most of the links on the home page were still all wrong. I finally figured out that I could look at another gallery site and discover what the url should look like to access various services so followed that each time to find the URL rewrite setup and the plugins directory (had to manually key it in browser each time: http://www.mydomain.com/main.php?g2_view=core.SiteAdmin&g2_subView=core ). AdminPlugins displayed now and with this I was able to set off and back on the URL rewrite on the plugins page and then I re enabled the URL Rewrite and went to the URL Rewrite options from admin options panel. Here I de-configured and re-configured the tables. Now almost everything was working again, then I went to the Admin/Maintenance panel and cleared out all the caches and now my system is working again. WOW! What a nightmare. |
|