Gallery2 module: Is this really all it does?

Zach Harkey - May 21, 2005 - 03:38

I've installed and set up the Gallery2 module (and the Gallery2 application) and it seems to be working fine. The problem is that all it seems to do is give me choices for importing a single image in a side-block. Is this really all it does?

Is there no way to, say, embed an album into the body of a node? I love administering my images/albums outside of drupal, and not having to create a node for each one. But I do want it to display within my Drupal site.

Is there any way to have a node that just acts as a shell for a gallery2 album? So that in the body of my node is a list of thumbnails, and when I click on one of them I get the larger view, but still stay in the same node? It seems like this kind of thing is supported on gallery2's side -- I just have no idea how to implement it on the drupal side; that's really what I was hoping this module would do.

I'm really hoping someone will point out the obvious options that make this possible( the ones that I am somehow missing) and make me feel stupid.

trying the same thing

kilolima - June 21, 2005 - 00:53

Hi,

I was also hoping this gallery2 plugin did a little more than add a block, and would like to incorporate a thumbnail gallery view within a node, or a popup window directly to a specified gallery from a node...

I need to read the gallery2 docs, it may be just a matter of figuring out the url variables.

I've looked at a few other gallery modules for drupal, anybody have any success implementing these sort of features with them?

Please let me know if you've had any success.

cheers

kilolima

I would be interested

laura s - June 21, 2005 - 03:56

...to know if the photo album module does not fit your needs.

===
Laura
pingV

the photo album is nice, but

kilolima - June 24, 2005 - 04:24

the photo album is nice, but kind of bulky. There's really no need on my website to have each image as it's own node. I really would just like some way to link a gallery of images to a drupal node. I've recently checked out Gallery v1, and it seems a bit easier to use than the beta v2. Drupal integration would be nice, like having the ability to upload new images to a gallery from within drupal, but otherwise, I think I'm just going to have to throw something together here, maybe use the image upload code from the htmlarea module.

The gallery2 module is awesome

Zach Harkey - June 24, 2005 - 05:43

Now that I have figured out how to use it, I can honestly say the gallery2 module is absolutely awesome. I would highly recommend you give it a spin. I had some experience with Gallery 1 and I was always so dissapointed in all the crusty, non-compliant code that was impossible to get rid of.

Gallery 2 creates compliant xhtml strict code out of the box. It is real clean. The install process is clean and the way it stores images is to my liking. As far as managing image galleries go, image.module can't touch it.

With Gallery 2 you can auto-crop square thumbnails, easily reorder images in galleries, even offer the ability to print out the image on shutterfly. There are many other great options.

This new version of the gallery.module is simply a shell for Gallery 2. At first, I was confused because there really isn't a lot of documentation. For instance, I had to figure out for myself that to actually access the gallery, and unleash the full capabilities of the module, I had to navigate to /gallery on my site. That may seem obvious, but it isn't documented.

The biggest advantage to me is that I can bulk upload pies of photos without bogging down my drupal site with endless image nodes. It also allows me to choose the name of the directory the images will be stored in — and stores each gallery in its own directory.

At this point, the only thing I could ask for would be clean URIs on the embedded version. The standalone Gallery 2 seems to use clean images fine.

-zach

harkey design

What about ordering pictures ?

muergano - July 22, 2005 - 16:01

Zach,

Have you tried ordering pictures (via shutterfly or photoaccess) while having gallery2 (CVS in my case) embedded in Drupal ?. I bet you will think it still needs some work. ;)

Let me know if you also experience the error most of us are experiencing.

random picture

insomoz - September 23, 2005 - 09:57

I had the same problem embedding gallery2, as I also didnt realise you need to navigate to /gallery instead of /gallery2

However with the image block, I still havent figured out a way, to display links instead of random picture

Dumb question

venkat-rk - September 23, 2005 - 13:49

When you say gallery2 module, do you mean the one with drupal integration or the download on the gallery2 site? Or, is the latter what you mean by the 'Gallery2 application'?

Want a different look on my pictures

Wiggles - September 23, 2005 - 17:04

Have tried the gallary2, the albume modul and everything else I have found but do not get the look I want on my galleries. What I want are a gallery that present the pictures with thumbnails but enables you to click next and prev. to see the other pictures in the gallery without going back and forth all the time. Gallery2 does this but if I could make it look like an integrated part of my site I would be happy.

Well i figured out that you

insomoz - September 23, 2005 - 20:02

Well i figured out that you can configure the image block, but really there wasnt anything I was after, so instead I created menu items links to the gallery sections I need.

here is sample of integration
http://www.footballclips.net/gallery?g2_view=core.ShowItem&g2_itemId=716

Looks good

Wiggles - September 29, 2005 - 11:02

I think that was a good way to do it and have done the same at my site. But I noticed that you had modified the look of gallery2 and made it look more like your primery site. How did you do that?

New and improve.

alexandreracine - September 29, 2005 - 13:33

Get the latest download from the gallery moduel page.

http://drupal.org/project/gallery

It will only link your Drupal and Gallery2 in a seamless way. But you can now use G2 and Drupal easely together!

Tried the gallery module

Wiggles - September 29, 2005 - 15:10

but get this error in the admin. log." Unable to initialize embedded Gallery" does anyone know what I have done wrong. Tha gallery works seperatly so it is correct installed I guess. THX.

Directory Settings

susej - July 11, 2007 - 20:24

Please follow the help on 'Directory Settings' and check the example which suits your installation, for me Example 1 worked for errors just like yours and the case of Memory has been settled.

__________________________
Directory Settings
"URI of Gallery2" is the URI of the Gallery2 standalone location. Path from docroot to the directory main.php is located. Protocol / host name are both optional. Examples: /gallery2/, /sub/gallery2/, http://photos.example.com/, www.example.com/photos/main.php
"Location of Gallery2" is the path of your gallery2 installation, either absolute (starts with "/") or relative to your Drupal installation directory. Normally this is auto-detected, but in case this fails you can turn off auto-detection and manually enter a value.
"Embed URI" is the URI needed to access Gallery2 through Drupal. This will end in '?q=gallery' (non-clean URLs) or 'gallery' (clean URLs). Normally this is auto-detected, but in case this fails you can turn off auto-detection and manually enter a value.
Some examples:

Example 1: If your directory structure and website structure is
• Drupal dir: /var/www/web/html/
• Gallery dir: /var/www/web/html/gallery2/
• Website URL: http://www.example.com
• Standalone Gallery2 URL: http://www.example.com/gallery2/
• Then
- "URI of Gallery2" = "/gallery2/" or "http://www.example.com/gallery2/"
- "Location of Gallery2" = "gallery2/" or "/var/www/web/html/gallery2/"
- "Embed URI" = "?q=gallery" or "http://www.example.com/?q=gallery"

Example 2: If your directory structure and website structure is
• Drupal dir: /var/www/web/html/drupal/
• Gallery dir: /var/www/web/html/gallery2/
• Website URL: http://www.example.com/drupal
• Standalone Gallery2 URL: http://www.example.com/gallery2/
• Then
o "URI of Gallery2" = "/gallery2/" or "http://www.example.com/gallery2/"
o "Location of Gallery2" = "../gallery2/" or "/var/www/web/html/gallery2/"
o "Embed URI" = "/drupal/?q=gallery" or "http://www.example.com/drupal/?q=gallery"

Example 3: If your directory structure and website structure is
• Drupal dir: /var/www/web/html/drupal/
• Gallery dir: /var/www/web/html/someotherdir/gallery2/
• Website URL: http://www.example.com/
• Standalone Gallery2 URL: http://www.anotherexample.com/gallery2/
• Then
o "URI of Gallery2" = "http://www.anotherexample.com/gallery2/"
o "Location of Gallery2" = "/var/www/web/html/someotherdir/gallery2/"
o "Embed URI" = "/drupal/?q=gallery" or "http://www.example.com/drupal/?q=gallery"

__________________________
Susej

link your Drupal and Gallery2 in a seamless way

Simon Hui - September 30, 2005 - 00:04

Can you please expand on this?
I like to know to what extent Drupal and Gallery2 are linked. For example, does Gallery2 use the same user table as Drupal so that no duplicate login is required?

seamless way...

alexandreracine - October 2, 2005 - 14:52

I can't really tell you about all the users. I only use my gallery2 with two roles : admin and others. For example, I have not try if a logged user can create his own gallery.

You can install g2 and g1 on the same server, so you could give it a try.

Linking Drupal and Gallery2 seamlessly

JingJo - October 9, 2005 - 20:00

I am a newbie to both these products but I've got a seamless link working on my site. You need to click on the random image to see the seamless link in operation.

These are the broad steps to do it:
Instal Drupal (I use version 4.6)
Instal Gallery2
- this should be installed inside Drupal
- eg www.your-site.com/gallery2
- If you need to move your Gallery2 inside Drupal there are instructions on how to do it on the Gallery2 site
Download and instal the Gallery module of Drupal
Activate the Gallery module in Drupal by going to Administer / Modules and ticking Gallery
Go to Administer / Blocks and put the Gallery block on your front page, either right or left side

You must go into admin mode of your Gallery2 site (not Drupal) and instal the ImageBlock module. I didn't have this installed; it took me a couple of days to figure out that I needed it

When a new user is created in Drupal it automatically creates the same user in G2 and passes all the info (name, password etc) to G2 so that it includes it in its database. Password changes etc through Drupal will change the G2 info. Note that you have to go through Drupal to do this, not G2. (this bit by kiz_0987)

I hope that I haven't missed anything important or got things around the wrong way!

Now after all that +ve karma, I have 2 questions:

The Image Block on my site ALWAYS shows a random image. I have changed the selection in the gallery module configuration options but my change doesn't stick; it always reverts to Random Image. How can I have, say, a Daily Image?

I would like the image in the gallery block to link to the top level (root) of my gallery. Does anyone know how to do this?

The link to my Photo Album in my links on the left hand side always starts my gallery unembedded. How can I have a link that starts my gallery embedded? (if I get a solution to the above problem then this one disappears!)

Some answers...

alexandreracine - October 10, 2005 - 21:15

For the image block that is always a random image : Download the latest cvs gallery.module "Revision 1.11" or more. In the header of the file, open the file with a text editor and you will see this:

// $Id: gallery.module,v 1.11 2005/09/29 14:04:51 walkah Exp $

If that does not solved that problem, I know that there is something about that in the forum, but I just can't find it back. It is in the forum that I found the solution at first.

http://drupal.org/project/gallery

To link to gallery embedded, for most of all modules in Drupal, simply add the name of the module after the URL. So like this :

http://www.example.com/gallery
http://www.example.com/article

etc.

Hope this help.

Excellent, it's all good, thanks

JingJo - October 11, 2005 - 02:37

Thx a lot Alexandre. It's all good now. Super stuff

the solution...

alexandreracine - October 17, 2005 - 03:20

ah... there is the article I found the other day to fix the random picture issue.

http://drupal.org/node/31398

Alexandre Racine

www.gardienvirtuel.com Sécurité informatique conformité, consultation et plus

Just putting myself in here

Blackguard - September 15, 2007 - 22:05

Just putting myself in here for tracking

How Do I Use or Link to Embedded Gallery2?

Stephen Winters - February 18, 2006 - 16:28

Hi,
I'm having a similar problem. I have Gallery2 imbedded (installed inside of Drupal) and have installed activated the Gallery.module. Gallery2 shows to be embedded within Drupal, see here: Winters Sewing: Picture Gallery. However, when I click on any picture in the Gallery, it takes me to out of Drupal to the unembedded Gallery2 installation. Also, if I click on the Random picture block in the upper left corner of my Drupal webpage, it does the same thing; it also takes me out of Drupal to my unembedded Gallery2 installation. This is not what I want it to do. When users click on the pictures, I want them go to the imbedded gallery albums. How do correct this?

I ready your instructions:

To link to gallery embedded, for most of all modules in Drupal, simply add the name of the module after the URL. So like this :

http://www.example.com/gallery
http://www.example.com/article

I don't understand what you mean or how to do this. Could you explain a little more? When you say "for most of all modules in Drupal, simply add the name of the module after the URL", where do I add the "name of the module"? Do I had it in a field somewhere, or in a hyperlink somewhere? I'm sorry that I'm so dense, but I'm just not getting it.

Basically what I want to accomplish is to just keep Gallery2 embedded within Drupal, so that when visitors navigate to Winters Sewing Picture Gallery, and then click on the albums and pictures, they will be able to navigate through Gallery2 while remaining within Drupal.

I've read through all of this thread, and searched other threads, and haven't been able to figure out how to do this yet. Thanks for any help you can give.

Best Wishes,
Stephen

Winters Sewing: Upholstery Information Website
Winters Sewing: Home Website

Important Install Note

shane - October 15, 2005 - 23:17

IMPORTANT: DO NOT install your Gallery2 software as /gallery/ under your Drupal directories. The URL path of /gallery is used by the gallery.module, and this will cause serious problems.

Is there a work around?

tbendick - October 21, 2005 - 17:34

IMPORTANT: DO NOT install your Gallery2 software as /gallery/ under your Drupal directories. The URL path of /gallery is used by the gallery.module, and this will cause serious problems.

What about the people that have a Gallery 1.5 installed in /gallery/? Is there a work around yet? I have a few copies of gallery running on my site.

I think you can...

alexandreracine - October 21, 2005 - 17:47

I think you can do something like this...

1-backup all your website :)
2-install gallery2 (look at the docs)
3-import all pictures from g1 to g2.
4-remove gallery1 completly
5-use the gallery module for drupal.

But you should really backup in case that does not work :)

Alexandre Racine

www.gardienvirtuel.com Sécurité informatique conformité, consultation et plus

tried moving gallery to gallery2 but

devanl - November 8, 2005 - 06:19

Installed gallery 2 before I planned on using drupal, now I want to use drupal and the gallery module. The first problem is that I installed gallery to /gallery/ (not mutisite) so I tried to move it to ./gallery2/ something isn't quite right after this as all of the urls in gallery2/main.php seem to point to items at gallery/ (changes to .htaccess didn't fix this). Trying the gallery module anyways when I point the gallery/ now I get a 404. I guess it comes down to two questions, can someone point out the step that I'm missing in moving gallery to its new directory (I've been to the FAQ, not very clear on this) and is there anything that I will need to fix since I installed drupal(4.6.3) and the gallery module before moving the gallery directory to gallery2?

Thanks,
Devan

Have you seen this FAQ:

kiz_0987 - November 8, 2005 - 11:22

Have you seen this FAQ: http://codex.gallery2.org/index.php/Gallery2:faq#How_can_I_move_my_galle... ?

It recommends to turn off URL rewrite before doing the move. If you do not do that then I think many of the links get cached and so point to the old directory (as yours seems to). I would recommend not using clean_URLs/URL Rewrite until you have your Drupal/G2 installation working.

Moving and Drupal

shane - November 8, 2005 - 19:56

Check the FAQ that kiz_0987 posted above. Also - I cleared the cache in my Drupal database (using phpMyAdmin, clear the 'cache' table). Or manually using the mysql commandline do "DELETE FROM 'cache' ".

I also use eAccelerator, so I cleared the eAcclerator cache. If you are using any other similar PHP caching mechanisms, I'd recommend clearing them too.

Those steps allowed me to cleanly move my Gallery2 directory, exactly as you need to. Also remember that your Drupal admin username and Gallery admin username MUST be the same username.

Also check out the Gallery2 How-To for embedding G2 into Drupal:

http://codex.gallery2.org/index.php/Gallery2:How_to_Embed_Gallery2_in_Dr...

v/r
Shane

Gallery is moved to gallery2/

devanl - November 10, 2005 - 04:18

Thanks kiz, I dunno why I missed the step about uninstalling URL rewrite before.
The image block module is working in drupal now but going to gallery/ to try and see the gallery still isn't working. Could this be because clean URLs are not enabled? If this is so I can't seem to get them to enable, I know mod_rewrite is enabled and it working in gallery2 standalone but when I try to enable clean names it tells me "# It appears your host is not configured correctly for Clean URLs. Please check for ModRewrite support with your administrator." Any help with this one?

Thanks,
Devan

However, you CAN install it as /gallery2/

Senpai - July 1, 2006 - 18:30

However, you CAN install it as /gallery2/ and it will work. Just make sure that it's something OTHER THAN /gallery/.

Error with embedded Gallery2

KSA213755 - December 12, 2005 - 06:54

I've installed Gallery2 trying to get it to work with Drupal, but I'm getting an error message. Can someone help me out? I'd like to get an embedded gallery going via the link off the random image block. Here's the details of the error message I'm getting in Drupal:

Unable to initialize embedded Gallery
Error (ERROR_MISSING_OBJECT)
in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 179 (gallerystatus::error)
in modules/core/classes/GalleryCoreApi.class at line 506 (galleryuserhelper_medium::fetchuserbyusername)
in /home/rogermar/public_html/drupal/modules/gallery/gallery.module at line 345 (gallerycoreapi::fetchuserbyusername)
in /home/rogermar/public_html/drupal/modules/gallery/gallery.module at line 183
in ??? at line 0
in /home/rogermar/public_html/drupal/includes/module.inc at line 182
in /home/rogermar/public_html/drupal/modules/block.module at line 502
in ??? at line 0
in /home/rogermar/public_html/drupal/includes/module.inc at line 182
in /home/rogermar/public_html/drupal/includes/theme.inc at line 864
in ??? at line 0
in /home/rogermar/public_html/drupal/includes/theme.inc at line 194
in /home/rogermar/public_html/drupal/themes/engines/phptemplate/phptemplate.engine at line 210
in ??? at line 0
in /home/rogermar/public_html/drupal/includes/theme.inc at line 190
in /home/rogermar/public_html/drupal/modules/node.module at line 1710
in ??? at line 0
in /home/rogermar/public_html/drupal/includes/menu.inc at line 354
in /home/rogermar/public_html/drupal/index.php at line 18

NEVER MIND> I had to create a new user in Gallery2 with the same username as I use to admin my drupal site. Then I deactivated the URL Rewrite in Gallery and the embedded Gallery seems to be working just fine.

gallery2 embed in guest mode?

derby - December 17, 2005 - 04:27

this is for a multisite drupal and multisite gallery2 installation

gallery2 standalone works perfectly with site admins and registered users.

gallery2 embed with drupal 4.6.3 is viewable only. while logged in as super admin, I get the gallery2 site admin link, I can view a form, like add new album, change theme parameters, add groups, users, etc. However, when I submit any of these forms gallery2 embedded seems to think I am only a guest and kicks me back to http://sitename/gallery and no changes are made. I can make all changes in standalone mode.

same thing happens with logged in as registered user, trying to add comments. I get the form to add a comment to image, but when I submit it kicks me back to http://sitename/gallery and no comments are added. I can add comments in standalone mode. Edit permissions are set correctly in gallery2, but Site admin above shouldn't matter.

do the mysql users have to be the same or share access to both gallery2 and drupal databases?

Any ideas??

Random Image when clicked, opens up in wrong page?

jkeychan - January 9, 2006 - 21:44

Hello everyone -- I believe I successfully have Gallery2 and Drupal linked up using the Gallery module, but I have an issue with the random image block. When I click on the random image, I want the user to be directed to the main gallery2 page for my site. Instead, it seems like the gallery page opens inside the main Drupal page.

What can I change and where to get the random image to open up to a new window to the gallery2 page? Do I need to set some sort of _blank or _parent somewhere in the code?

Try it for yourself at my testsite:

http://www.ibiblio.org/jkeychan

Click on the random image and watch how the resultant page gets loaded into the main Drupal page

Thanks so much!

Where's the sidebar?

imerlin - January 10, 2006 - 15:21

I remember when the G2 was beta Drupal integrated to the Gallery sidebar and the options were added to the navigation.

Now I have to either hide it (which is bad if I need to do anything) or use up half of my screenspace for two sidebars.

Has anyone been able to integrate the menu's in gallery to drupal since the final release?

 
 

Drupal is a registered trademark of Dries Buytaert.