I want to work on a full modular integration of Gallery2 for Expression Engine.
Now some of you may ask why I would want such module when EE is very flexible.
We all have something we are really good at. We can’t be the best at everything. Now I think EE is one of if not the best CMS and framework. I believe the same regarding Gallery as a Media Manager.
Why not combine the best of the two worlds? I am a photographer and like other photographers we can have a pretty large collection. I may want to sell my photos. I may want to restrict access to clients only. Whatever the reason is, Gallery2 is specialized in managing your assets. It is its whole purpose. It was made to be integrated within other applications.
Now I need it. And I’m going for it. May take me a long time but I really want this integration and I see that if I want to wait for someone else to do it, it won’t be done.
This is a call to those who want to contribute.
Here are the docs: • Embedding and Integration of Gallery 2 • Event-Based Loose-Coupled Integration • Integration Aspects • Development Roadmap • Configuring URL Rewrite for Embedded G2
• Class:// GalleryCoreApi • Class:// GalleryEmbed
Expression Engine already has all hooks necessary. Its only a matter of writing the bridge.
Gallery requires at least version 4.x (4.1.0 or more recent; Gallery 2.2 requires 4.3.0 or more recent) or 5.x (5.0.4 or more recent) to function properly. Note: Gallery 2 has problems with PHP 5.0.5 due to a bug in PHP.
Notes:
• PHP 5 is highly recommended - PHP will not release any security updates for PHP 4 after 2008/08/08. If your webhost is still running PHP 4, please ask them to switch to PHP 5 as soon as possible for security reasons (not just for Gallery, but for all PHP applications). • Gallery 2.4 (due in 2008) will require PHP 5.2 or later, announcement: Gallery 2 Requiring PHP 5 in February 2008 • PHP 6 is incompatible with Gallery 2.0 - 2.3. Gallery 2.4 (first release in 2008) is planned to be compatible with PHP 6 though.
In addition to a basic PHP installation, Gallery requires certain PHP settings to be setup correctly in order to function optimally.
PHP settings can be changed in php.ini, as described in the PHP documentation
• safe_mode safe_mode must be disabled in order for Gallery to work correctly • disable_functions The disable_functions directive must not include the function set_time_limit. • file_uploads file_uploads must be set to On if Gallery is to be able to upload files from your computer • upload_max_filesize and post_max_size These configuration parameters control the maximum file size that can be uploaded. Adjust these from the default 2M setting to something larger if you have problems uploading pictures from higher resolution cameras. • If you want to use the localization feature then PHP should be configured with the gettext option enabled.
alindeman has created a script to check your Gallery for potential problems due to PHP settings. Download the script and upload it to your host. Open the script in your browser (http://www.example.com/gallery/ghcc.php). If any tests fail, you may need to adjust your settings before trying to install Gallery.
Source: http://codex.gallery2.org/Gallery2:Installation_Requirements
Please visit the link above for other Gallery2 requirements such as Database and Web Servers.
https://bkuberek.springloops.com/source/ee_g2bridge
There is an anonymous user with read only access. Contributors must request write access.
Log:
• r3: Control panel file is predefined. Needs more work, specially using Gallery2 API, in order to make gallery2 work but most required methods are in place.
Todo:
Build module file. Build methods for dealing with Gallery2 API. Build method for Synchronizing Users. Add listeners for member register and login hooks to auto sync new and updated users. (requires ext.g2bridge_ext.php)
CP has three tabs, “Gallery2”, “Configuration”, “Documentation”.
Gallery2 - Displays the Admin Pages of Gallery2. (*not yet working. needs to improve on API) Configuration - Displays a form with settings required to make g2bridge work. May also have sync tasks here. Documentation - How to configure and a usage example.
I have in mind that all other settings can be passed to the module via the template tags. This may be a sample gallery2 page:
{exp:g2bridge:gallery theme="matrix" detach_sidebar="yes" detach_admin_sidebar="yes" max_blocks="2"}
{embed="includes/_html-header" loc="gallery" title="{gallery_title}" extra_css="{gallery_css}" extra_header="{gallery_js}"}
{embed="includes/_html-nav" loc="gallery"}
{if gallery_sidebar}
<div id="gallery_sidebar">
{gallery_sidebar}
{gallery_blocks image_type="random" images="3" image_data="heading|title|date|view_count" thumb_max_size="150"}
</div>
{if:elseif gallery_admin_sidebar}
<div id="gallery_sidebar">
{gallery_admin_sidebar}
</div>
{/if}
<div id="content" class="gallery">
{gallery_content}
</div>
{embed="includes/_html-footer" loc="gallery"}
{/exp:g2bridge:gallery}
unfortunately, though I really need it I cannot invest the time at this moment. I will have to wait. I started off laying out the module and the extension. I need to do work on the G2 side. It will take me a little while to digest the Gallery 2 Core classes. I am basing the bridge on Drupal’s G2 Bridge. It is simple and works. Once we get something stable we can play around with possibilities.
This module might provide the ultimate workflow for me.
Originally I used Gallery (then G2) for my photos. This allowed my wife to upload photos easily from iPhoto.
However, I didn’t like that customizing it to fit my look was v. difficult, so I moved the photos into EE’s Gallery Module. This meant it looks nice, but now my wife couldn’t upload to the gallery very easily (especially taking the title, description, EXIF info).
Now I am using Flickr to host my photos as my wife can upload easily and it shows up in my gallery the way I want it to.
However, no one can comment on each photo, unless I figure out a way to have each photo be a blog entry.
Sigh…
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.