Closed (fixed)
Project:
Gallery
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
17 Jan 2006 at 18:28 UTC
Updated:
4 May 2006 at 04:15 UTC
Jump to comment: Most recent file
Has anyone modified the Integration code to reflect what is coming with G2.1. They have made changes on the gallery side for the integration to make it where g2 and the host app (drupal in this case) can be on seperate domains.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | patch_33 | 7.08 KB | darius |
| #20 | patch_32 | 4.63 KB | darius |
| #16 | gallery_3.module | 13.87 KB | fazizi |
| #14 | gallery_2.module | 16.56 KB | fazizi |
| #11 | gallery_1.module | 13.34 KB | Stardog |
Comments
Comment #1
walkah commentedi have actually begun some work on it yes... i will post here when complete.
Comment #2
profix898 commentedHi!
I modified the gallery.module to work with G2.1 (CVS). Some code needed
to be changed in order to comply with new EmbedAPI and error handling.
The module works perfectly on my server with Drupal 4.6.5 and G2.1 CVS
for a few days now. Create/modify/delete user works without modifications.
BUT at the moment I was unable to put it to work with short URLs enabled
in G2. But I 'm not sure this is a gallery.module issue, because I cannot
have short urls activated in standalone mode (on my multisite/multigallery
installation) either.
I think the code needs some review and extension, but it works so far.
Regards Thilo
Comment #3
phildu commentedi'm interest , by the evolution of gallery integration;
but does you project to develop the essential (in my opinion,) feature
- the possibility to select a photo in the rich editor.
does the 2.1 permit this ?
where do you fin the version 2.1 i just found the 2.02 ?
thanks
Comment #4
profix898 commented- The module is simply a modification of the "original" one to make it
compatible with new G2.1 API. But it does NOT introduce any new
features.
- Gallery 2.1 is not yet released. You can find the beta versions at
http://gallery.menalto.com/downloads > Gallery2 > Nightly snapshots
(As far as I know G2.1 will be released end of February at the earliest)
- @ the possibility to select a photo in the rich editor.
Some people are working on that. At the moment you can only
use g2_filter. When you type [G2:item_id] in your editor, this tag is
replaced by the photo (with index item_id) on your page.
For more information look at http://drupal.org/node/40465
(This feature is (in my opinion) not limited by G2 API, but needs
much more work on the module.)
Comment #5
kiz_0987 commentedAlso check out http://drupal.org/node/41590 for TinyMCE support for Gallery2. Seems to work OK.
Comment #6
Canadrian-1 commentedJust wondering what the status of this is? With Gallery 2.1 RC1 out, I was wondering if 2.1 support is going to be made more a priority.
Comment #7
dthiessen commentedMaybe it's about time someone set up a wiki so that all the small questions about intergration with different versions and such can be answered. It's confusing to keep track of where this module is in terms of development. If anyone is interested, I can host it or I'm sure almost anyone else could also.
Comment #8
kiz_0987 commentedThere is already a G2 codex page for drupal embedding (http://codex.gallery2.org/index.php/Gallery2:How_to_Embed_Gallery2_in_Dr... ) which deals with some of this. I suggest that we use a section in that or a new page on the codex site (if it gets too much).
Comment #9
Johnyp commentedI've just tried the gallery_0.module posted above and it didn't work.
It seems that without someone getting paid for integration of G2 and Drupal, the 2 will always be out of synch. One app introduces a change, and the whole thing stops working. As soon as it gets fixed, there is another update or bug fix that puts it all back into non-functioning state.
Comment #10
tHeDoc-1 commentedAlso tried the gallery_0.module posted here with no success. I'm using a very recent Gallery from CVS (with the API changes).
The error I get when activating the gallery block is:
Hope this helps...
Comment #11
Stardog commentedHere is the module I hacked up to work with my bleeding edge Drupal setup. This is for 4.7 (using with beta 4), and G2.1 RC 1b currently.
One thing not working yet is the URL rewrite. The rewrite module has changed in G2.1 and I haven't had time to figure it out yet.
Be sure to set access to the gallery in access control.
Comment #12
alexis commentedI'd also like to use G2.1 with Drupal 4.7 but before applying the patch I would like to know Walkah's opinion about it, I have a live site and wouldn't want to play with the gallery once my users are using it.
Comment #13
dasalvagg commentedGood work on the module. I have it mostly working right now. Viewing the album works, but I am getting an error on a block.
the offending code...
*note-line number will be different. i've been playing with it.
Comment #14
fazizi commentedHey all, I've never contributed to drupal before, in fact, just started installing it late last week.
But I like it so much and am in so in need of Gallery integration, that I decided to debug this myself.
The fix was pretty straightforward, after doing some digging.
As per
http://fisheye.gallery2.org/viewrep/gallery/gallery2/upgrade/index.php
1.23.2.1 annotated / raw | Diffs: previous, other | Lines: 264 ( +8, -8 )
Eliminate success(), isError() and isSuccess() from GalleryStatus.
The new pattern for error handling is:
$ret = someOperation();
if ($ret) {
return $ret->wrap(__FILE__, __LINE__);
}
I removed the offending isError() methods in gallery.module
Now it seems to work perfectly with Gallery 2.1 when creating and updating user accounts through drupal (i.e. they synchronize with the gallery users).
I based this on the gallery_1.module #11 submitted by Stardog on February 28, 2006 - 18:07
I am using Drupal 4.6 and the head of Gallery 2 CVS as of around the end of February, 2006 (so pretty much the Gallery 2.1 RC1 release)
Notes:
1) I had at least one user who could not see their equivalent gallery albums... I couldn't figure out why, but probably had something to do with the user being created before enabling the gallery module. I finally just changed the users username (in the user edit screen), created a new user, then updated the database to keep their nodes (update node set uid=
where uid=
), then deleted the old user
2) I disabled gallery's mod rewrite and also drupal's clean urls, since it didn't seem to work with them on
There doesn't seem to be a drupal gallery navigation block with this version though :( Maybe someone can patch it up.
Hope this works for you!
p.s. I would appreciate someone designing a nice drupal-friendly gallery theme :)
Comment #15
euphi commentedThere is an extra line at the end of file, so installing the module will result in empty pages and "headers already sent" warnings.
Just remove the last (empty) line of gallery_2.module.
Euphi
Comment #16
fazizi commentedI fixed the newline thing and also added the search patch from http://drupal.org/node/34301.
thanks,
Fi
---------------------------------------
Fairiz "Fi" Azizi http://www.fairizazizi.com
Comment #17
fazizi commentedFYI, there are some additional improvements on the gallery module on this thread http://drupal.org/node/32393
However, it doesn't seem to have 2.1 support.
We should merge these two "branches" of code together... Maybe I'll do it someday when I have time... but I would suggest Walkah since he was the original author.
Comment #18
michellefazizi:
My understanding of the issue is that Walkah would like the enhancements as individual patches instead of a forked module as kiz_0987 has provided. If you have the time and ability to break kiz_0987's module up into patches that Walkah could use, there are a lot of us that would love you forever. :)
Thanks,
Michelle
Comment #19
sethcohn commentedThe above module code are _not_ 4.6 compatible, so I'm setting the version to cvs (as there is no 4.7 option).
Is there a working Drupal 4.6 + Gallery 2.1 module at this time?
Comment #20
darius commentedI am attaching a patch for the *official* CVS version of gallery.module to make it work with Gallery 2.1.
Comment #21
Whazz commentedI'd like to get a working Drupal 4.6 + Gallery 2.1 module too. :(
It would be greatly appreciated!
thx in advance!
Comment #22
darius commentedUpdated patch for the CVS version of gallery.module. Incorporated changes to GalleryEmbed::init detailed in http://codex.gallery2.org/index.php/Gallery2:Integration_Howto
Please note that you will probably have to go to the settings and add a starting slash to the location of gallery2 installation.
Please review!
Darius
Comment #23
muchio commentedHi, I'm not sure if it is related to the patch, but I've noticed, that if you try to load gallery with the trailing slash at the end (i.e. drupal.site/gallery/ ), css gets messed up.
Comment #24
Johnyp commentedSo Gallery 2.1 is officially out. Drupal 4.7-beta_6 is current with a good chance of official 4.7 in a month and a half. Any update on making 2.1 and 4.7 working together and living happily ever after?
Comment #25
kiz_0987 commentedGallery2.1 with Drupal 4.7 (cvs) committed to CVS HEAD. Please let me know of any issues and provide any relevant patches to this version. Note that the gallery-cvs.tar.gz (from http://drupal.org/project/Modules/cvs/) will be regenerated automatically later today. In the meantime you will need to go to the Drupal CVS to download.
Features:
- Compatible with Gallery2.1 and Drupal 4.7 (ONLY!)
- Autoconfiguration of settings (only 1 parameter is needed) with checking
- Drupal Role & Gallery2.1 Group support (with automatic sync)
- Improved user information (can check Drupal-G2 sync status) with Full-Name support (via profile.module)
- Improved URL rewrite - any rule can now be used, not just the view rule.
- Can change number of images in sidebar and they can be different types
- Can add photo frames and link target
- Support for Gallery2 Navigation menu in sidebar (including Album Select)
- Adds breadcrumb
- Adds css file to improve default Gallery2.1 Matrix theme for embed.
- Improved search, with thumbnails and paging
- Includes g2_filter functions
- Includes support for g2image (http://g2image.steffensenfamily.com/) both Standalone and with TinyMCE
Comment #26
alexandreracine commentedfazizi, your module on comment #16, does not work.
For example, in the config area, there is nothing.
Also, the gallery works within drupal, but all pictures are not there...
Comment #27
karens commentedRan into one small problem. The nice message telling me that my users are or aren't synched with Gallery is visible to anonymous users. I think the following will fix it (works for me)
In gallery_user.inc, around line 159
Comment #28
kiz_0987 commentedCommitted the user access change. Thanks KarenS.
Comment #29
karens commentedOne more change to recommend:
I have a multi-site installation and not all the sites need Gallery. At the same time, I am using very close to the maximum amount of memory for some sites. To control memory, I need to turn off some modules that use a lot of memory (like Gallery) but because other sites are using the module, I need to keep it in the modules directory.
I ran out of memory for one of my sites and started turning off some modules, including Gallery. To my surprise, I started getting out of memory errors from the Gallery module! I did some digging and the offender is the very beginning of the module which is loading gallery_init if the gallery module is in the directory, whether or not it is enabled. First I added a clause to load it only if the module was enabled, but then I started getting several "function does not exist" errors for functions in the module, so I had to add some stub functions if I didn't load gallery_init. The fix I finally came up with was to change the beginning of the module as follows (and this solved my memory problems on the sites that had it turned off:
Comment #30
karens commentedWhen I talk about loading gallery_init I mean gallery_base. Also, you may wonder why it is doing anything with the module when it is not enabled (so did I) but on the admin > modules page, at least, it gets loaded anyway and creates my problems.
Comment #31
nydrupalfan commentedThanks for the work on the module! I can't seem to get the user role <-> group integration working. The drupal roles do not appear in the gallery group list (even after making changes to the roles) using drupal cvs and gallery 2.1. Could someone describe how this feature is supposed to work and what I might be doing wrong?
Comment #32
kiz_0987 commentedThe role/group sync between Drupal and G2.1 does not happen when a role is added/deleted, but instead when a user is edited to be in that role (in fact on any user edit). So edit a user to include them in the new role and see if it works then.
Comment #33
nydrupalfan commentedThanks for the quick response. I'll try editing a user tonight. Do you only need to edit one user from each role? Or do you need to edit every user on the site for the sync to work correctly?
Comment #34
kiz_0987 commentedThe way it works is:
- When a user is modified, *all* the roles defined in Drupal are sync'd (add/delete) with Gallery2. Note that groups defined in Gallery2 are not carried over into Drupal (ie it's unidirectional). The G2 group membership for those groups/roles now includes this user.
- There is no global sync of all users in the Drupal code, so the other users are not yet part of the Gallery2 groups until they are also modified.
Comment #35
alexandreracine commentedFor a working Gallery 2.1, Drupal 4.6.x, and gallery.module 4.6 , go at this address.
http://drupal.org/node/57321
Comment #36
bharat commentedHere is a patch against DRUPAL-4-6 to bring gallery.module up to the code that we use on the Gallery website itself (http://gallery.menalto.com). It works with Drupal 4.6.6 and Gallery 2.1. Note that this *will not* work with Gallery 2.0. I don't know how Drupal typically versions something like this -- perhaps it makes sense to ship two versions of gallery.module and let the user decide which one to use depending on which version of Gallery they have installed.
http://www.menalto.com/.outgoing/gallery/Gallery2.1-with-Drupal4.6-patch...
Comment #37
kiz_0987 commentedBharat's patch has been committed into the CVS for version 4.6. There is now gallery.module (G2.0) and gallery.module.G2.1 (G2.1). When using Gallery2.1 you have to remove/rename gallery.module and rename gallery.module.G2.1 to gallery.module, as explained in INSTALL.txt.
Thanks Bharat.
Comment #38
bharat commentedThat was mighty fast. Thanks, Kieran!
Comment #39
(not verified) commented