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

Gallery browser for the publish page....

Development and Programming

Robin Sowell's avatar
Robin Sowell
13,158 posts
19 years ago
Robin Sowell's avatar Robin Sowell

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.

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
19 years ago
Lisa Wess's avatar Lisa Wess

wiki’d

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
19 years ago
Robin Sowell's avatar Robin Sowell

;o) Yes- I am lazy. But look! I did finally get around to adding links to my sig! Oh! Shiny, shiny links.

That I copied directly from your sig.

       
Rob Lombardi's avatar
Rob Lombardi
31 posts
19 years ago
Rob Lombardi's avatar Rob Lombardi

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) )
       
Robin Sowell's avatar
Robin Sowell
13,158 posts
19 years ago
Robin Sowell's avatar Robin Sowell

Hm- I couldn’t replicate the error, which is probably a result of mysql version diffs. However, I dropped the varchar down to 250, which should still be plenty big. Just replace the mcp.gbrowser.php file with the new one and I think it should take care of the problem.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
19 years ago
Sue Crocker's avatar Sue Crocker

Hey, Robin – finally decided to try this. There’s a typing error in the description:

Gallery broswer for you publish page

Should be

Gallery broswer for your publish page

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
19 years ago
Ingmar Greil's avatar Ingmar Greil

Or, quite possibly, Gallery browser for your publish page.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
19 years ago
Sue Crocker's avatar Sue Crocker

Snicker.. you’re right. Too early in the morning here.

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
19 years ago
Robin Sowell's avatar Robin Sowell

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.

       
Bruce2005's avatar
Bruce2005
536 posts
19 years ago
Bruce2005's avatar Bruce2005

Robin,

Totally awesome! I love the choices including pre and post formatting options. Way to go, a welcome addition to EE’s already terrific functionality.

       
simplyee's avatar
simplyee
104 posts
19 years ago
simplyee's avatar simplyee

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
       
simplyee's avatar
simplyee
104 posts
19 years ago
simplyee's avatar simplyee

But it is because I don’t have the gallery installed right?

I really wanted to see if I could, or pay someone to modify it yo upload to a regular weblog.

Still trying to get a file browser I can make look like the rest of my site, if you follow me.

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
19 years ago
Robin Sowell's avatar Robin Sowell

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.

       
kingwise's avatar
kingwise
1 posts
19 years ago
kingwise's avatar kingwise

It seems cannot work and not much neccessory if Fckeditor intergrated. You can easyly copy any kind of pic from your gallery or other pages.

       
Korak's avatar
Korak
8 posts
19 years ago
Korak's avatar Korak

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?

       
1 2

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.