Over in this thread there was talk about adding gallery pictures to articles via the publish form. While a gallery folder can be added to the ‘upload prefs’ and then browsed, the desire was for something that would place gallery thumbs in entries and have them automatically link to the gallery page for that particular thumb.
Gbrowser.zip is a really quickly mod I hacked together that does basically that. It’s not really a file browser- more a gallery browser, and there’s no image manipulation/resizing. It looks pretty much like the regular image browser when used- but you browse by gallery, it just shows (and inserts) the thumbs, and I added some variables to pre-formating and image properties, so you can use things like the gallery entry id or the title or caption - thus linking from the thumb to the gallery single entry page automatically.
Unfortunately, it does require a minor hack to get a link to the browser to show up on the publish page, but once 1.4 comes out, should be easy enough to eliminate that need.
Anyway- was a quicky, and I’ll revisit it once 1.4 is out- so if anybody wants anything added- or runs into bugs- give a yell. It’s not a priority, but I figure it will be a good module to learn ‘extensions’ on, so I will be playing with it in the future.
Documentation stinks- but this one isn’t rocket science. The install instructions should be enough to get you giong.
I get bad sql for MySQL when EE tries to install it.
Description: Too big column length for column ‘gal_pre_format’ (max = 255). Use BLOB instead Query: CREATE TABLE exp_g_browse_prefs ( id int(4) unsigned NOT NULL auto_increment, gallery_id int(4) unsigned NOT NULL, is_user_blog char(1) NOT NULL default ‘n’, name varchar(80) NOT NULL, server_path varchar(100) NOT NULL, url varchar(100) NOT NULL, properties varchar(200) NOT NULL, link_gal char(1) NOT NULL default ‘y’, gal_pre_format varchar(500) NOT NULL, gal_post_format varchar(500) NOT NULL, link_img char(1) NOT NULL default ‘y’, link_med_img char(1) NOT NULL default ‘n’, img_pre_format varchar(500) NOT NULL, img_post_format varchar(500) NOT NULL, PRIMARY KEY (id) )
Oh, man. I stared at those for 5 minutes before I figured out the difference!
LOL- I’ll change it whenever I get a newer version out- post 1.4 because I want to figure out how to use extensions to hopefully remove the hack. And there have been requests for a simplified uploader (no choosing folder or no choosing where to insert it and stuff)- I figure it ought to be easy enough to ad some more config options to this module and maybe it could handle any of that. Preferably, you could have multiple configs and then display based on member group or weblog or a combo of the two or whatever. Theoretically shouldn’t be difficult.
I get an error also Robin, any ideas? I’d like to try it out.
MySQL ERROR:
Error Number: 1146
Description: Table 'db_name.exp_galleries' doesn't exist
Query: SELECT exp_galleries.gallery_id as g_id, gallery_full_name FROM exp_galleries LEFT JOIN exp_g_browse_prefs ON exp_galleries.gallery_id = exp_g_browse_prefs.gallery_id WHERE exp_g_browse_prefs.gallery_id IS NULL ORDER BY gallery_full_name
Heh- yea, you need to have the gallery installed- I didn’t put in checks for it as I couldn’t imagine folks using it otherwise.
As to full customization, I’m dinking with the gallery browser bit first and have added some ajax which was fun- would like to get that down to a single ‘page’- and show the selected thumb image without having to do the pop-up view button. After I get that squared away I’ll start on the upload and browser- and then the backend for folks to create different ‘profiles’ to display based on member group.
Basically- there just aren’t enough hours in the day.
First of all, great module!
But I’m afraid I’ve run into some problems with it now. When I first tried it out all worked fine, but now it’s no longer possible to add images. I think it might be due to the fact that I now use different folders depending on gallery category. Anyone else who’ve got it working having various album folders for a gallery? When I click the uplaod icon I can see all my uploaded imags. But when I then try to Add or View and image I get directed to my ‘uploads’ folder and the fields dropdown is blank.
Any ideas?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.