Integration authors are welcome to take part in the discussion of this roadmap, add their own ideas or even help implementing solutions in G2. We need to coordinate and discuss the specific features, to make sure that the resulting solutions are useful for all integrations.
Don't forget to add your username in front of your comments / sections on this page.
valiant: How to develop a new integration. Explain all aspects and a step by step guide. The current docs could be improved considerably, but they are a start. Also, a general document about all aspects of integrations should be written.
valiant: The google SoC project (by _dv) resulted in a embed module which provides an API to do the initial user synchronization. It can also be used to be run periodically by integrations that can't use create / update user hooks / events.
We need to add this to the official G2 repository and maybe change a few things before. You can already experiment with the code: cvs module "embed" in project gallery-contrib.
valiant: relativeG2Path is less intuitive than a absolute g2Path. And with an absolute g2Path that optionally includes the host string, we can offer embedded G2 support also if the external application is on another subdomain.
Try to keep support for relativeG2Path if g2Path isn't provided.
ozgreg:This is a hot ticket item for a number of people, right now embedded applications do not support multisite installs and the concept of relative paths just confuses the heck of most people. The ultimate goal would be two URL paths, one to the embedded application, the second to Gallery2
valiant: WPG2, joomla/G2, mediawiki etc. continue to impress by means of fantastic embedding ideas and features. But for some of those features, too much coding is required. We need to try to port those features back to the G2 embedding API or to modules.
ozgreg: all thanks to you Valiant for the time and effort you spent in the initial API code..
Goal: Integrations should be able to offer such embedded features with much less code and with less work.
valiant: Embedded album / photo browser à la mediawiki -> picking images, e.g. for articles / blogs.
ozgreg: some kind of mini browser on the WPG2 radar, it would make life a LOT easier if instead it was a module in G2 that I could call via API.
valiant: Maybe with special themes, maybe by special module pages or by other means. We'll see.
valiant: Powerful support for simplifying picking / showing a single image by name, path, id, or an album etc. -> show images/ albums in blogs / articles of the external application. See mediawiki, wp, mambo, drupal, ...
ozgreg: WP utilises tags which as a concept works well, the biggest issue we continuous run into is WP and the way it is helpful in cleaning up blog entries :(
valiant: Drupal, joomlo, ... offer their own menus for G2 albums etc. e.g. by assembling them from theme variables. We need to offer an API for that or at least document how this can be done.
eads: The ability to seal off your G2 site from the public via a common authentication mechanism (like HTTP auth) but pass G2 the correct authentication information from the calling app.
valiant: Not sure if what you want is already implemented. When G2 is embedded, it is accessed through the embedding application. If you deny access to G2 in the embedding application, you can't access G2. Plus, when embedded, G2 trusts the embeddeding application. G2 doesn't do any authentication when embedded, it just accepts the activeUserId. Regarding apache / HTTP authentication: No, this isn't possible yet (forwarding the user id from apache to G2), but you can block access to G2 in the embedding application by securing the embedding application by HTTP auth.
valiant: What else could be ported to the G2 API side to make the life of integration authors easier?
eads: Turn off linking in image blocks.
eads: Specifying sizes and having them autogenerated in G2. ozgreg: I have a RFE already open for this -> 1256288
valiant: Extend the initial synchronization API to do synchronization in batches of 100. If you have to synchronize a large (100k+) userbase, it might be a good idea to synchronize it in smaller batches and then refresh the webbrowser for the next batch or something like that. Since our PHP/webserver platform depends on too many external factors, we need to keep the risk for corruption as small as possible.
valiant: Extend the initial synchronization API to support group synchronization too. Extend the initial synchronization API to support group membership synchronization too.
Since group management differs between the various external applications more than basic user management, we'll have to make it general enough / add enough optional switches in the sync code etc.
valiant: Should the complete integrations approach be changed? How can the complexity be hidden? Or are there details that could be improved?
valiant: Currently, we output in UTF-8 and input is expected to be UTF-8. UTF-8 support is a strict requirement for the external application. We need to introduce a variable input / output character encoding handling. At the samme time, it's quite sure that we keep the internal handling pure UTF-8.
Input should be easy, as we already run all HTTP input through GalleryUtilities.class.
Output is more difficult, since there's nothing like a output filter yet. Some data comes from the database, some is generated and some is from the templates. In the end, all output comes either from $gallery->translate (all template g->text runs through this too) or from the database. So the question is: what do we do about the db output? And of course set the HTTP header(); and the <meta html header accordingly. See: running Gallery2 (g2) in the non-UTF-8 environment
valiant: The theme documention should also address embedded themes and what to look for. E.g. css issues, relative font size, page width, no sidebars, ... Maybe tag (user contributed) themes also whether they are suited for embedded G2.
MichelleC: Bharat had a theme going for Drupal that got rid of the sidebars but the enhanced Gallery module mostly does away with the sidebars automatically so a special theme isn't needed. I much prefer that approach. Then we don't have to worry about whether a theme is suitable at least as far as the sidebars go. It needs some work, though, because sidebars still show up in site admin. Maybe some sort of global setting where "if embedded=true then all sidebars=off"?
dmolavi: Dariush Molavi has created EmbeddedGallery.com (right now it simply links to NukedGallery.net) to be used as a single source of Gallery embedding support. Ideally, this site would evolved into something similar to OpenSourceCMS, enabling users to view sample integrations for all the currently supported CMS/portal/blogging systems. Shameless plug: If you are a web designer and would like to design the new site, please contact Dariush Molavi via PM at NukedGallery.net for more information.
valiant: Wouldn't it be cool if there was a single G2 module or java applet with a short, intuitive step-by-step guide to integrate your G2 in another application. We'd have to introduce some standardized methods in all integrations, but it's feasible. See: G2 task: integrations manager
valiant: Currently, we can integrate G2 only in PHP-based applications. Once the XMLRPC module is offcially part of G2, we can expose GalleryEmbed methods to the XMLRPC interface too and enable integrations into any application and they don't even need to be on the same webserver. Session / cookie management will surely be challenging.
eads: You could also do simple non-PHP integrations using XML/OPML feeds that are retreived without remote calls (except the HTTP GET request, I suppose) to pass an album into an app like Dominey's SlideShowPro.
valiant: We could provide a G2 module which makes integrations easier where G2 is the master in the master-slave relationship between G2 and the external application. This module would listen for GalleryEntity::save/delete events (user/group create/update/delete) and it would offer a plugin structure such that a integration writer just has to write a 1-2 file G2 module to implement a few methods: initiate the external application, create/update/delete external user.
Pbearne: This idea I would to see devopled as many sites are/start as just photo albums but the find there need some extra functions contact us form , mail members ,etc. there don't need a whole CMS and don't what to go away from the gallery themes
eads: Pbearne, you need both -- the flip side of your point is that some users (myself included, haha) want an open source digital asset management solution that integrates with this or that CMS but doesn't provide a public frontend itself and is reserved for internal use.
ozgreg: The fact the rewrite modules requires additional configuration steps for embedded support is just confusing (not going into the fact that some rewrite configurations prevent access to admin thus you cannot configure the rewrite to correct this error). What is required is the API extended to interact with the G2 Rewrite module so the external embedded applications can manage the configuration of the rewrite module.
As it is, G2 is a stand alone application that can play nice with others, but it still likes to be in control as much as possible. For my uses, I would like the ability to make G2 into a puppet with the main application pulling the strings. Other people may want G2 to have more control. To satisfy a range of needs, I propose a set of easy for the end user integration functions. These are ordered from giving G2 the most control to giving the caller the most control.
DisplayGallery() - This would drop the whole G2 into your page along the lines of http://www.plogger.org/docs/config/#integration .
DisplayFullAlbumPage(ID) - Given an album ID, this would display the whole G2 page, sidebars and all.
DisplayFullItemPage(ID) - Given an item ID, this would display the whole G2 page, sidebars and all.
GetAlbum(ID,Override) - Given an album ID, this returns just the meat of the album with no sidebars or header. The override would be a boolean to override any user permission settings so that's controlled by the calling code.
GetItem(ID,Override) - As above
GetSidebar(ID) - Given an album or item ID, this gets the sidebar that would have been displayed with it.
GetBreadCrumbs(ID) - As above
GetItemLinks(ID) - Returns an array with links to the thumb, resized, and full images. No HTML is returned. Just the URL.
GetItemInfo(ID) - Returns an array with information about the item such as whether it's an album, what sizes are available, etc.
GetNextItem(ID) - Returns the item that comes after this one in the album
GetCustomFields(ID) - Returns an array of the custom fields for an item.
... there's many more that can go here to really dice up G2 to put it in the controlling app just how you want, but this is a start.