We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Modular Integration of Gallery2 for Expression Engine

Development and Programming

bkuberek's avatar
bkuberek
124 posts
16 years ago
bkuberek's avatar bkuberek

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.

       
bkuberek's avatar
bkuberek
124 posts
16 years ago
bkuberek's avatar bkuberek

PHP Version Compatibility

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.

PHP Settings

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.

• For the reasons given above, Gallery2 Bridge for Expression Engine will require PHP5.

Source: http://codex.gallery2.org/Gallery2:Installation_Requirements

Please visit the link above for other Gallery2 requirements such as Database and Web Servers.

       
bkuberek's avatar
bkuberek
124 posts
16 years ago
bkuberek's avatar bkuberek

SVN Repository

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)

Goal:

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}
       
Andru Edwards's avatar
Andru Edwards
330 posts
16 years ago
Andru Edwards's avatar Andru Edwards

Very cool. Will be following this 😊

       
OurITGuys's avatar
OurITGuys
12 posts
16 years ago
OurITGuys's avatar OurITGuys

This looks great! Just wondering if there’s any new news regarding this?

       
bkuberek's avatar
bkuberek
124 posts
16 years ago
bkuberek's avatar bkuberek

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.

       
Jim R.'s avatar
Jim R.
2 posts
16 years ago
Jim R.'s avatar Jim R.

I too will be following this.

       
Sasha's avatar
Sasha
85 posts
16 years ago
Sasha's avatar Sasha

Me three! Would love to see this!

       
Nico Smit's avatar
Nico Smit
48 posts
16 years ago
Nico Smit's avatar Nico Smit

Same goes for me!

       
Devot:ee's avatar
Devot:ee
2 posts
16 years ago
Devot:ee's avatar Devot:ee

Many thanks for starting this, bkuberek. 😊 Looking forward to the finished module!! 😉

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

adding my interest to this.

       
mmjaeger's avatar
mmjaeger
78 posts
16 years ago
mmjaeger's avatar mmjaeger

any progress on this one - is it working - are there other ways to integrate Gallery2 into EE.

Thanks

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
16 years ago
Erin Dalzell's avatar Erin Dalzell

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…

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.