Gallery2 CCK-field with Embedded-Media-Field

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
true-pal's picture

Hello,

I wounder if someone has already ported the Embedded-Media-Field to Gallery2?
http://drupal.org/project/emfield

Background information:
The emfield is a cck-field to integrate media types like images from providers like Picasa, Flickr, ..
or videos from youtube, myspace, ..
There are two integration types: as reference or import.

The emfield provides an API to embed further providers

My Idea:
Interprete Gallery2 as provider.
After porting the emfield to Gallery2 it should be possible to reference the images and thumbs
from the local installed gallery.
I think using references to the images is better than importing them to the gallery-node-type, isn't it?

So I imagine to
- handle and store the images in Gallery2
- have a tighter integration in Drupal (Theme)
- use the G2image to integrate the image link to the emfield
- have a Drupal-Gallery with a clean structure in the background/ file system with different folders
- have the possibility to extend the content type with other cck fields.

What do you think about this? There are any drawbacks in using references/ links in cck types?

Thanks in advance for your feedback
true-pal

see also my makeshift example for the above mentioned using of Gallery2, CCK and Thickbox: http://www.opush.com (upper right corner: Gallery)

Comments

gallery_content to your help (in 2 months, I hope)

profix898's picture

I think using references to the images is better than importing them to the gallery-node-type, isn't it?

That greatly depends on your use case. Without a dedicated node type for G2 images in Drupal you dont benefit from all the buildin (or contributed) features available for nodes, such as support for comments, views, etc. However if you only want to embed images in your posts or integrate them with your content type a reference field makes sense.

I'm currently working on a gallery_content module as part of the gallery package for Drupal 6. It implements both possibilities, a content type for G2 images and a cck reference field. Read http://drupal.org/node/138400 and http://gallery.menalto.com/node/70299 for details. Not everything mentioned there will be implemented 1:1 in the final module as I refine the ideas while developing the module, but you can grab the idea. Also some details are outdated (havent had time to update yet), i.e. there will be support for adding images to G2 through the Drupal UI and similar stuff ...

Remarks:
-1- It should be noted that providing a node type for G2 images doesnt mean to import images into Drupal. Internally the node type references G2 similar to the proposed cck field, although with much more context (needed for -3-).
-2- Using a field to point at a G2 url isnt that easy. We need a modified version of the G2Image browser to select the images in G2 and we also need a way to render the references with frames or additional markup, such as exif info, etc.
-3- Integration with the Views module is not possible without a dedicated node type, because the views query builder operates on the {node} table. (I think Views2 will no longer have this restriction, but not sure)
-4- The main purpose of the whole 'tighter integration' discussion is 'Theming'. We need a clean way to theme G2 items natively in Drupal. That requires the gallery_content module to provide a basic infrastructure adapted to the G2 schematics. A cck field can heavily benefit from that as well.

Sorry for the brief and slightly confused answer, I'm currently moving and therefore dont have internet connection at home (for the next 2-3 weeks).

what do you think about the "Embedded Media Field"?

true-pal's picture

wow, thank you for the very fast answer.

sorry but what do you think about the "Embedded Media Field" CCK-Module?
especially regarding your above mentioned remark 2 I could imagine that this CCK-Module could
support your work pretty much.

best regards und viele Grüsse aus München
true-pal

Views 2

Michelle's picture

I realize this post is very old but it just got bumped up so I saw this comment:

"-3- Integration with the Views module is not possible without a dedicated node type, because the views query builder operates on the {node} table. (I think Views2 will no longer have this restriction, but not sure)"

Views 2 can not only work on non node tables but I just checked with merlinofchaos and it can non Drupal tables "As long as something has told it about the data". It's been a looooong time since I've looked into the G2 tables so I don't know if this will be of use, but I thought I'd mention it since it opens up at least the possibility of views of G2 images without any sort of node wrapper. Of course, there's other benefits to a node wrapper such as native Drupal comments, but it's still an idea. :)

Michelle


See my Drupal articles and tutorials or come check out the Coulee Region

Thanks for the pointer

profix898's picture

I realize this post is very old but it just got bumped up so I saw this comment

Yep. I added a new comment about emfield module below (feel free to comment on it ;)). There are plans to eventually add G2 support to this module.

Views 2 can not only work on non node tables but I just checked with merlinofchaos and it can non Drupal tables "As long as something has told it about the data".

Thanks for the pointer. I checked Views2 the last days and I am aware that it no longer requires "node" table as base table. However for G2 the situation is more difficult: Most users install G2 to use a separate database. AFAIK there is no way of telling Views2 about that extra db and even if it was possible Views2 couldnt do JOINs, etc. on tables across db borders, right? Even worse Drupal ususally doesnt even have rights to access the G2 db directly, but only through the GalleryCoreApi "wrapper".
I already refined my ideas and the vision of tighter integration (one reason why it takes so long) due to the new design and ongoing development of CCK, Views2 and Panels2. But I still think a node wrapper is the easiest way to do it ...

P.S. I recently created a new project "GalleryAddon" where add-on modules for tighter integration of G2 will be maintained. We decided to have a separate project for these modules, so that we can keep the main gallery module stable while working on extra functionality in these modules.

P.P.S. Please let me know if I can be of help to improve G2 integration in profiles (especially for your new advanced_profiles module). Didnt have time to try myself, but it looks promising and exactly what many people have looked for :)

...

Michelle's picture

I've never used emfield so no comments there.

I didn't realize most people installed G2 in a separate db. Yeah, that would kill that idea.

GalleryAddon module is a good idea.

Unfortunately, I can't use G2 with Drupal 5.x (see http://drupal.org/node/201137 ) so I can't do any sort of testing with panels integration. :(

Thanks for all your work on this. I look forward to checking out all the new features when our G2 versions are back in synch.

Michelle


See my Drupal articles and tutorials or come check out the Coulee Region

Embedded Media Field, the 2nd

profix898's picture

Hi true-pal!

I almost finished a GalleryField module (it will be available as part of the new GalleryAddon package) that provides a simple implementation of a reference field for G2 items. You can specify an item by itemId or title and it will be displayed as an image block on the node. More advanced options and formatting will follow once GalleryContent, which mirrors G2 into Drupal nodes, is ready.

I also started to play with the emfield module and learned about its API. However, there are some aspects of the module idea and esp. the implementation I dont agree with. But still its working and provides an easy way to reference external media from within nodes. Some thoughts about the module:

  1. In times were all the world is looking for unified media handling solutions I really wonder why emfield has separate sub-modules for images, video and audio. A simple option in the main module to select which type of content to support would do (better). This is especially bad for G2 as it forces us to implement the G2 provider 3 times (for emaudio, image_ncck, video_ckk) in an almost identical fashion and (even worse) for G2 you cant even tell from the url or itemId what type of media you are dealing with. What means we have to load the item, check for its type and return a validation error if it doesnt match.
  2. emfield is basically a wrapper to bundle multiple providers or media sources for one field. But modules (supporting emfield) must still deal low level with cck field logic and additionally with the emfield infrastructure. So it doesnt really make it easier for developers to write a media reference field for cck, but only unifies the different approaches.
  3. emfield is designed to handle external media sources (field label is 'External Image' and widget label is '3rd Party Image' in image_ncck). Not sure it is logical to reference internal images, but thats just a formal problem!? How would we specify a G2 item? Does it make sense to use the embedded url? Or a syntax similar to the G2 filter [G2:itemId] or how? The point is that the module derives the item details purely from the url, so we must be unique and simple enough for users to deal with ...

I would really love to discuss this in more detail and to get an impression on how you think this stuff should work from a user's perspective. Once I have a detailed vision of the matter its an almost trivial task to code an emfield provider for embedded G2.

Cheers, Thilo (Grusz aus Hamburg)

P.S. Sorry for the long delay. I'm very busy atm and I needed to learn emfield first to post a helpful answer.

GalleryField vs. emfield

true-pal's picture

Hello profix,

thanks for your reply. What's my vision on the matter?
I was searching for a solution with features like:
- multiple upload
- quick building of galleries (from folders or from whithin zip-files)
- reuse of images in special content types (e.g. CCK for ecommerce)
- separate physical subfolders on server for galleries or users
...

So I am not an emfield enthusiast but saw an possible solution for the above mentioned requirements.
But now I'm going to play with your GalleryField ....

greatings
Juergen (Gruss aus München)

P.S. At the moment I'm playing around and commit with/ for the asset module....

First, I'm really grateful

ergophobe's picture

First, I'm really grateful for this work. It will help so much.

reuse of images in special content types
Yes. I want to be able to integrate my Gallery images into CCK nodes.

separate physical subfolders on server for galleries or users
Another reason I don't use one of Drupal's "native" gallery solutions.

Basically, I want each image to have a hierarchical path and to be on a page with a hierarchical path, as it is in Gallery. My ideal would be a CCK field that let me drop both images and galleries into nodes. Images could be placed in nodes with or without title and description, and in any size that exists in the actual Gallery. Galleries would get dropped in as either a link or a set of thumbnails and would have the description and title imported or not.

My ultimate goal would be to be able to show Gallery thumbnails and display the large version in, say, a Smooth Gallery or Lightbox, but if Javascript were off, the link to the large image would go to the gallery page for that image. That way it degrades nicely, gets crawled effectively and allows users to see images without leaving the node page, but makes titles and descriptions of images available to both users who want them and to search engines.

I'm not sure how that relates to the question you asked, but that would be my dream setup.

Thanks again for the work you're doing on this. Can't wait to test the beta!

Thanks for feedback

profix898's picture

Thanks for the feedback. Its good to read how users expect G2 to integrate with CCK (and Views). I usually cant help to look at this with developer's eyes. But I see this time we are on the same wavelength :) Most of the features you listed above should be available once GalleryField AND GalleryContent are ready (in about 2-3 month, I think), with only GalleryField you will shortly have at least a subset of this functionality available.

I know you'll think I'm

ergophobe's picture

I know you'll think I'm kidding, but I'm not - I will literally cry with gratitude when this is done. I have been trying so many solutions, made some efforts at hacking AcidFree and G2+4.7 and other solutions to get this and just always run out of time and never make progress.

I can't believe that someone is going to do this for me and that it looks like it will happen relatively soon (by the way, anything within a year is "soon" by my standards and "relatively soon" might be 1.5 years).

As soon as I saw that someone was even working on improvements to the G2 module, I made a very small donation before even downloading the module just as encouragement. Now that I see what you're actually doing, I offer to do as much as I can to help with beta testing, bug hunting and what not. And I will definitely owe you a very nice gift!

And yes, and Views That's huge and more or less implied by having a CCK field. But if I can use Gallery info in CCK and Views, Drupal will literally have every feature I've ever wanted from it. For God's sake, I hope the big shakeups in the various APIs are done and modules won't go obsolete so fast once D6 is done.

Thanks!

Ditto

vasudevaserver's picture

I second what Rick so nicely said. Your work is very, very nice and helpful. Thank you!

Gallery2 Integration

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week