Gallery2 required to be in subdir of Drupal - why?

kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Fri, 2005-10-14 21:50

I'm revamping the gallery.module for Drupal again and in the code and the installation instructions is the following (written by bharat or walkah):

"Gallery2 should be *inside* your Drupal installation so that it's accessible by the same website."

I do not understand why this is needed. Here are some examples to show my understanding:

Example 1: G2 in subdir with Drupal in DocumentRoot
DocRoot = /var/www/html (http://www.example.com)
Drupal Dir = /var/www/html (http://www.example.com)
Access Point = /var/www/html/gallery (http://www.example.com/gallery)
G2 base directory = /var/www/html/gallery2 (http://www.example.com/gallery2)
embedURI = gallery
embedPath = /
relativeG2Path = gallery2

Example 2: G2 in subdir with Drupal not in DocumentRoot (normal urls)
DocRoot = /var/www/html (http://www.example.com)
Drupal Dir = /var/www/html/drupal (http://www.example.com/drupal)
Access Point = /var/www/html/drupal/gallery (http://www.example.com/drupal/?q=gallery)
G2 base directory = /var/www/html/drupal/gallery2 (http://www.example.com/drupal/gallery2)
embedURI = "?q=gallery"
embedPath = "/drupal"
relativeG2Path = "gallery2"

Example 3: G2 not in subdir with Drupal not in DocumentRoot (clean_urls)
DocRoot = /var/www/html (http://www.example.com)
Drupal Dir = /var/www/html/drupal (http://www.example.com/drupal)
Access Point = /var/www/html/drupal/gallery (http://www.example.com/drupal/gallery)
G2 base directory = /var/www/html/gallery2 (http://www.example.com/gallery2)
embedURI = gallery
embedPath = /drupal
relativeG2Path = ../gallery2

The last example should work with the settings shown, no? If so then just setting the $relativeG2Path = $galleryDir; should be OK.

What am I missing here?

Thanks.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-10-14 22:45

well, it's certainly no limitation of GalleryEmbed / G2. if it's a limitation, then by the specific drupal integration code. but i don't know the code or drupal, so i can't really help you.

 
kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Fri, 2005-10-14 22:56

Thanks Valiant. Unless Bharat happens to answer (he wrote the install instructions that included it) I'll just play with it and see. Are my examples correct?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-10-14 23:23

walkah should know better, since he's the author of the drupal integration. bharat may as well.

all i know is that drupal has it's own way to deal with URLs and also has aomething like short urls etc. and i have no idea how it works. so i can't tell you what the correct embedUri, embedPath, relativeG2Path are if drupal has activated its short urls.