By InterceptPoint on
Wondering if anyone has managed to patch the 4.7 version of Flash Gallery to version 5.0. I don't see any action on this really excellent image gallery module on the 5.x nodes but I'm hoping that the 4.7 to 5.0 migration is easy enough that someone will tackle it.
Check out the demo here: http://www.endymios.com/fgallery and use your scroll wheel if you have one. Very slick image viewer module that works great with 4.7. Now we need it ported to 5.0.
Comments
Let me know!
I'd like to know when this is ported. For now, I will try to work with drupal5-gallery2 integration
-Steve
I Managed to Get Flash Gallery Working on Drupal 5.0
You need to do 3 things to port flash_gallery from 4.7 to 5.0:
1. Add a flash_gallery.info file (Drupal 5.0 won't see the module without this file.)
2. Edit flash_gallery.module to fix the 4.7 path bug.
3. Edit flash_gallery.module to update two function calls that are changed in 5.0
You can generate the .info file by editing any Drupal 5.0 module .info file.
The 4.7 path bug is well known and is fixed as follows:
add "/" at end of line 175 and 176. These lines should read as follows:
$op[] = 'imagePath="'. flash_gallery_image_url() .'/"';
$op[] = 'thumbPath="'. flash_gallery_image_url() .'/flash/thumbs/"';
The two function calls that need to be modified are:
theme_add_style() --> drupal_add_css()
module_exist() --> module_exists()
Just replace every instance of theme_add_style() and module_exist() with the 5.0 calls and you should be home free.
Worked for me
-- InterceptPoint
But You Can't Access the Settings Page
The 4.7 code to access the Flash Gallery Settings page is broke in 5.0. I've had a go at re-writing it but no joy. The page executes but the standard 4.7 settings page form is not there.
Hoping someone with more experience than me can sort it out. The module is actually pretty much usable with the default settings but it really needs this fixed.
Fix for Access to the Settings Page
The problem with the settings page lies in the way Drupal 5.0 handles forms. It is different that the method used in 4.7 and requires the following changes to the flash_gallery.module code:
1. Rename function flash_gallery_admin()
Was: function flash_gallery_admin()
Is: function flash_gallery_admin_form()
2. Replace the last line in the renamed flash_gallery_admin_form:
Was: return system_settings_form('flash_gallery_admin', $form);
Is: return system_settings_form($form);
3. Create a new function flash_gallery_admin():
function flash_gallery_admin() {
$output=drupal_get_form('flash_gallery_admin_form', $form);
return $output;
}
To make thumbnail rebuilding work
In order to make the thumbnail rebuilding option work you also have to change line 356 in flash_gallery.module from:
to
Hey, I have a question, and
Hey, I have a question, and I guess I may have to make a new thread - but I want to know if it would be possible to use this flash gallery and:
a)rate each photo - using AJAX stars
b)comment on each photo
c)only people logged into the site can rate or comment.
Just asking since I don't know about this stuff. Thanks.
urlencode missing / problems with umlaute and spaces
Here is a little patch to make this great module work with Images that have "special characters" (for example german umlaute äüö or white space) in their names :
Line 135:
$node = node_load($nid);
$images = $node->images;
if (flash_gallery_is_jpg(file_create_path($images['preview']))) {
$xml .= '';
$xml .= urlencode(basename($images['preview']));
Just the obvious urlencode is added and it works!
Views and image
I have a question about integrating this with Views and image. What I am looking to achieve is... adding a view to the user profile page that brings up the simple player with images from a views query; such as images post by this user. any thoughts on the best way to do this? I don't have a huge budget fr this, but am willing to throw out a bounty.