Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-12-23 19:35:56

nighthawk
Archived Plugin Author
From: Frankfurt, Germany
Registered: 2005-11-05
Posts: 87
Website

[plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

Important notice: Should you have troubles installing this plugin with one of the newer versions of MySQL, please read this post.

Original post:
Besides a good menu manager based on categories (check wow_menu), Textpattern IMHO lacks the ability to manage multiple images and image galleries. Yes, you can upload single images, but the options to alter them, to have multiple thumbnails of each image at your disposal, etc. were not available with Textpattern.

wow_gallery is a complete gallery manager for Textpattern and lets you
  • import images from a folder on your server (on-the-fly thumbnail preview)
  • upload single images manually (handy if you’re on the road)
  • flip/mirror/resize single and multiple images
  • auto-create up to three thumbnails per image
  • use JPG/GIF/PNG-formatted image files
  • auto-detect and fix image orientation based on EXIF data, if present
  • manage multiple galleries
  • move images between galleries
  • add caption texts for each image
  • display these galleries through a powerful TXP tag on your site
  • display single images or their thumbnail equivalents through the same tag
  • open gallery images in a new window, or display them inline
  • browse galleries and images
  • format the image viewer window and the gallery through CSS
  • alter the image viewer window text and behaviour through an extra template page

Current version: 0.6, released 02.01.2007
Download URL: http://www.shadowplanet.com/downloads.html
Please read the readme.txt file included in the ZIP archive!

New with v0.6:
  • Easy image ordering: Change image order by simply selecting one or multiple images, then moving them up/down in the image list
  • Renaming galleries
  • Raw image data stored in separate table which you can exclude from regular backups
  • Plugin split into wow_gallery and wow_gallery_lib (both must be installed for the functionality to work)

Upgrading to 0.6 from 0.4:

Since the database structure has changed with v0.5, the plugin will automatically convert your tables and move their contents. Please be patient when you access the gallery admin page for the first time after the upgrade, allowing the conversion to run.

Some words about technology:

All images are stored in a database (created automatically for you), and thus the plugin should be safe-mode-compatible (I know that many users on multi-account servers face this problem). GDlib is required for the image transformations; it won’t work without it. Also, the plugin backend has been tested against Firefox only – IE people, please use at your own risk and let me know if there’s something terribly wrong with the interface (minor glitches in design won’t be fixed due to IE’s lack of standards compliance).

Changelog:

0.4 – First public beta version
0.5 – Added image ordering functionality based on DOM-tree manipulation (Firefox strongly recommended!). Image data (except thumbnails) now stored in separate table (txp_wowgallery_imgs), image metadata resides in txp_wowgallery. Added migration script for users of v0.4, also creates new field for image order. Added gallery renaming functionality. Fixed path bug in wow_image.php. Added creation date info to gallery admin screen. Code clean-up, UI clean-up, minor bugfixes. Not publicly released.
0.6 – Split into two plugins (wow_gallery, wow_gallery_lib) due to size limitations in TXP, minor bugfixes.

Feature request list: [status/planned release]

  • Image data storage in separate table to be excluded from regular backups [done]
  • Renaming galleries [done]
  • Change image sorting/order [done]
  • Upload images via ZIP file [hopefully 0.7]
  • Recovery script after db crash for raw image data [not scheduled]
  • Pagination for images not displayed in a pop-up window [0.7]
  • Ability to link images to external URL instead of pupup [not scheduled]
  • Ability to add HTML code in captions [0.7]
  • Ability to add custom tags to image links [0.7]
  • Select between table or unordered list for gallery display [0.7]
  • Pagination for galleries in “edit” mode [0.8]
  • Additional field which works like a “free-text category” (FTC) to allow selection of images by that criteria, without the need to create a new gallery. This would enable wow_gallery to replace the current image management of TXP [0.8]
  • Pagination when viewing images selected by FTC (do not paginate over entire gallery) [0.8]
  • Fix path to helper scripts when accessing them from subdirectories (use absolute instead of relative paths) [0.7]
  • Pass on javascript parameters for image viewer window (scrollbars, resize, …)
  • Keep original filename for “save as” procedure (will have to look into this first, not sure if it’s possible)

Tentative release time for 0.7: End of March. Will include a feature freeze, so please request everything you’d be interested in seeing in the final version of the plugin now.

{Edited to add the note re MySQL. – Uli}

Last edited by uli (2012-05-12 12:27:22)

Offline

#2 2006-12-23 19:52:02

aba
Plugin Author
Registered: 2004-04-14
Posts: 119

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

care to change the “coming soon” message on your site to a download links for christmas?

thanks in advance

Offline

#3 2006-12-23 20:02:32

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

2nd that. I wanna see.

Offline

#4 2006-12-23 20:04:15

nighthawk
Archived Plugin Author
From: Frankfurt, Germany
Registered: 2005-11-05
Posts: 87
Website

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

Sorry, you’ve been too quick for me! I was just updating the page… the download link is active now. :) Thanks for your interest!

Offline

#5 2006-12-23 21:15:13

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

Wow, impressive features like the orientation via Exif data, no more rotating before upload.

If I may ask, keeping the images in a database, what was the deciding factor for this? It’s a different approach than most galleries, just curious.

Thanks for the present :)

Offline

#6 2006-12-23 21:43:37

nighthawk
Archived Plugin Author
From: Frankfurt, Germany
Registered: 2005-11-05
Posts: 87
Website

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

You’re right… my first approach was storing the files in the filesystem – seemed to be the easiest way. The plugin was complete, then I realized that with safe-mode on, my plugin was able to create folders and store files in them, but not allowed to move, rename or delete any of them. Argh! I had to rewrite everything related to file storage to establish a db solution, as this is the only way a user can be certain that the plugin works regardless of the server environment (I hope). Especially the safe-mode can be tricky to deal with if you don’t have full admin rights on a machine.

Of course, using a db has several disadvantages. MySQL limits the size of a query to 1MB (I think) as default, and you will hit this limit once in a while if you’re uploading large images which then get base64-encoded, further increasing the query size. If the upload fails, this most likely is the reason. If you have access to the MySQL config, you can try adding this setting: “max_allowed_packet=8M”. More information on this can also be found here .

In addition, the db is not as fast as the webserver accessing the filesystem. Also, more storage space is required because of the encoding, and you need to execute a query everytime a page with gallery pictures is being accessed.

OTOH, storing files in a db is a very tidy thing, and it prevents people from causing problems by accidentally deleting files from the server which are still being used or referenced in some gallery. Also, all data related to an image is stored in the same place (caption, size, etc.).

I think it’s still an acceptable way of tackling the problem, and I’m looking forward to get some feedback on how it works for you guys. :)

Merry Christmas!

Last edited by nighthawk (2006-12-23 21:45:16)

Offline

#7 2006-12-23 23:03:28

joel
Member
Registered: 2004-11-26
Posts: 162

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

Hey there. This is just what I’ve been looking for. Very nifty I must say. However I can’t seem to get the gallery display correctly. I get the following error-msg:

tag_error <txp:wow_gallery tn="2" name="aston" captions="1" /> -> Warning: Division by zero on line 1025

Any ideas?

I also have a couple of suggestions for the future:

It would be very nice to globally define a parent cat in which the new galleries are automatically assigned. In this case the non-technical-client can create new galleries without messing around with txp-code.

Some kind of language-control would be nice. I can contribute with a swedish translation.

Finally, I really miss the ability to change the names of the galleries.

Once again, kudos on a really nice plugin! I’m really looking forward to the next version :)

Merry Christmas! :)

Last edited by joel (2006-12-23 23:04:07)

Offline

#8 2006-12-23 23:26:59

nighthawk
Archived Plugin Author
From: Frankfurt, Germany
Registered: 2005-11-05
Posts: 87
Website

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

Hi joel,

I think you’re missing the rows/cols attributes in the tag call. Without those, the pagination routine seems to screw this up. Try to add those and let me know if it works for you. With the next version, I’ll add some default values for those two attributes.

Renaming galleries: Good point, will add this in 0.5. As a workaround, you can just create a new gallery with the right name and then move all images into it, then delete the old one.

Language control: Wow… let’s keep this in mind for when we know the plugin itself is stable. Thanks for offering the Swedish translation, though – we’ll come back to that. :)

Could you elaborate a little bit more on the parent category thingy? I don’t really get the point I’m afraid… :/

Thanks for your feedback!

Offline

#9 2006-12-24 00:15:08

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

I could yet not get this to work ( from the front-end)
I can see the javescript block beeing inserted, but no images.
( Tried this with latest Safari and Firefox on Tiger )

From the backend averything seems to work, except, that it wasn’t clear to me how one could create multiple Thumbs, without overwriting the old ones, and wher would one see, if those exist or not.

However, I’ll see if can get this working on a local install after Christmas.

regards, marios

Last edited by marios (2006-12-24 00:15:29)


⌃ ⇧ < ⌃ ⇧ >

Offline

#10 2006-12-24 00:27:58

joel
Member
Registered: 2004-11-26
Posts: 162

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

I’ve changed the code to this:
<txp:wow_gallery name="aston" captions="1" rows="6" cols="4" browse="1" new_win_x="820" new_win_y="700" caption_cutoff="150" tn="1" />

Txp-outputs this (for every image):

tag_error <txp:wow_gallery name="aston" captions="1" rows="6" cols="4" browse="1" new_win_x="820" new_win_y="700" caption_cutoff="150" tn="1"/> -> Textpattern Warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 select * from txp_wowgallery where id = on line 84

I don’t know what I’ve missed out here… I really much appreciate your help on this :)

Yes, regarding the categories. It would be nice for me (a developer) to be able to customize the gallery-plugin so that the client (non-tech-user) can publish multiple galleries without having to work with the txp-code. I know this could be a easy copy/paste-operation but I know that some people (users) find i difficult enough to publish a regular article. Therefore I’m looking for an easy way of achieving this.

One brief Idea could be to define a “global” gallery-category in the txp-interface. This category is also stated by the developer in the <txp:wow-gallery... code. All galleries created by the client are children to this category and are therefore published in the gallery section without any hassle.

I don’t know if this is doable or not, it’s just a thought :)

Offline

#11 2006-12-24 01:01:33

joel
Member
Registered: 2004-11-26
Posts: 162

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

I got the thumbnails to show using this: <txp:wow_gallery name="aston" captions="1" rows="6" cols="4" new_win_x="870" new_win_y="700" caption_cutoff="150" tn="1" link="1" new_win="1" />

The error-msg’s are also gone.

one problem left though (as I know of at this point)
When clicking on a thumb, the image generates a 404 – the large image doesn’t show at all.

Help please… :)

Last edited by joel (2006-12-24 01:02:48)

Offline

#12 2006-12-24 01:15:42

nighthawk
Archived Plugin Author
From: Frankfurt, Germany
Registered: 2005-11-05
Posts: 87
Website

Re: [plugin] [ORPHAN] wow_gallery - A complete gallery manager for Textpattern

@joel
Well, I couldn’t make heads nor tails out of the error message anyway – I’m not doing any “select *“s, and the line number also doesn’t match. :/

If the pop-up returns a 404, please make sure that you have placed wow_tpl.php and wow_image.php in the proper folder. They must reside in your main site folder, just above “/textpattern”, where the index.php file is. Can you confirm that?

@marios
Please make sure the txp tag is correct. I will add some examples with the next version as it is quite complicated I have to admit.
Existing thumbs and their size are shown in the gallery image list, above the caption field (“thumbs -> …”). Whenever you create new thumbs, all the old ones are overwritten, that’s right. If you have 1 thumb which is 100×50, and would like to add another one which is 50×25, make sure to add both sizes to the auto-thumbnail creation block at the end of the gallery image list.

I know this isn’t 100% fool-proof (yet) – the problem is that many users will reference a certain thumb for their gallery view (e.g. tn=“1”). If different numbers of thumbs exist for each image, which may well be the case, this will lead to a lot of confusion as to which thumb actually gets displayed under tn=“1”-“3” after auto-generating additional ones. In order to prevent that, I took this less convenient, but cleaner approach.

Besides, I’m not sure if your environment could be a problem for running the plugin properly – I wasn’t able to test it on a Mac. Please let me know how you’re progressing here, and thanks for giving it a try.

Offline

Board footer

Powered by FluxBB