Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
atb_image_pulldown - Easily assign article images.
This is a simple plugin that replaces the Article Image text box with a pulldown list showing all images in order by category and name. This should make it fairly easy to assign article images, assuming you use well-chosen names for images and categories.
This plugin does not seem to play nice with hak_tinymce. Hopefully, if you’re using TinyMCE, you don’t really need article images anyway. Update: This version seems to work fine with hak_tinymce.
New: Version .2 supports multiple article images, with a few simple options set inside the plugin code. I’ve tested it with hak_article_image
, but it should work with any plugin that manages multiple article images.
Last edited by atbradley (2008-06-29 01:19:51)
Offline
Re: atb_image_pulldown - Easily assign article images.
Adam, what problems does hak_tinyMCE cause? Maybe we can work them out.
Shoving is the answer – pusher robot
Offline
Re: atb_image_pulldown - Easily assign article images.
Hmm… Maybe it doesn’t. Earlier (with a pre-release version of my plugin), I was having a problem where my combo box wouldn’t load, which I thought I’d fixed by turning TinyMCE off. Trying it again now, it seems to be working fine.
Offline
Re: atb_image_pulldown - Easily assign article images.
Really nice! Thanks! Just a request: would it be difficult to allow multiple selections (to be separated with comma in the db field) using multiple=“multiple” select attributes? Some plugin manage more than one article images and that would be perfect!
Z-
Offline
Re: atb_image_pulldown - Easily assign article images.
I guess it could check to see if zem_article_image
, jk_article_images
, or hak_article_image
(am I missing any plugins that do multiple article images?) is installed, and if so provide a multi-select box instead of the pulldown menu. I’ll try that out next week.
Offline
Re: atb_image_pulldown - Easily assign article images.
atbradley wrote:
am I missing any plugins that do multiple article images?
Not sure if it counts, but both smd_slimbox and smd_gallery support multiple images in the article_image field (among other places). Whether that has any relevance to this plugin I’m not sure but I thought I’d mention it just in case.
Rather than check for the existence of a plugin, could you just check if the article_image field is delimited in some way?
EDIT: and remember it doesn’t strictly have to be a comma either ;-)
Last edited by Bloke (2008-06-17 19:13:42)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: atb_image_pulldown - Easily assign article images.
Rather than check for the existence of a plugin, could you just check if the article_image field is delimited in some way?
How would that work with a new article, where the article_image field is empty?
Maybe the best option would be to just add options to the Preferences page for “Allow multiple article images?” and “Multiple article images delimiter”.
Offline
Re: atb_image_pulldown - Easily assign article images.
atbradley wrote:
How would that work with a new article, where the article_image field is empty?
D’oh of course, sorry for sticking my beak in without thinking this through :-)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: atb_image_pulldown - Easily assign article images.
Yes, I’d also opt for a simple preference, even in the raw code. Much easier. :) So one could also modify the separator.
Thank you for considering this modification!
Offline
Re: atb_image_pulldown - Easily assign article images.
I’ve just released a new version, which allows multiple selections, with a few options in the plugin’s raw code. I’ve tested it with hak_article_image
, but it ought to work with any plugin that handles multiple article images.
Offline
#11 2008-06-29 11:46:43
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,311
Re: atb_image_pulldown - Easily assign article images.
Hi Adam,
I posted some weeks ago on your site about atb_image_pulldown not working with FF2, SAF2, and OP9 (Mac). You’ve released v.11 and asked for errors from FF’s error console. In the meantime I’ve tried both versions, .11 and .2, the menu doesn’t appear with both of them, though there are no console errors. :-S
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: atb_image_pulldown - Easily assign article images.
Uli,
I have it working with Opera 9.5 and Firefox 3 (Win) here; I actually wrote and debugged it using Opera. Unfortunately I don’t have a Mac to test on.
What version of PHP does your site use? What do you see when you go to
http://yoursite.com/textpattern/index.php?event=atb_image_pulldown_optlist
The only thing I can think of right now is that I used something specific to my version of PHP (5.2.6) and you’re using a newer/older version.
Offline