Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-01-22 21:08:05
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Image caption
Can <code><txp:image id=?? /></code> please include the caption in the way it automatically includes the alt tag please.
Offline
Re: Image caption
You can do this with the upm_img_popper plugin. It handle a lot of image things.
Offline
#3 2006-01-22 21:43:09
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: Image caption
I don’t want to train my non tech client to write out plugin tags in articles. The point of clicking “textpattern”, next to an image on the image tab, and being presented with a pop up window with the correct image tag text that can be copied/pasted into an article is imo the way it should be.
Offline
Re: Image caption
I use a modified version of zem_article_image to output alt text. It is pretty specific and there are probably better ways to do this, but here it is if you are interested:
<code> function jk_alt_text($atts) { global $thisarticle,$pfr,$img_dir, $id; if (is_array($atts)) extract($atts);
$limit = 1; if (!empty($thisarticle[“article_image”])) { $images = array_slice(split(“,”, $thisarticle[“article_image”], $limit + 1), 0, $limit);foreach ($images as $id) { $rs = safe_row(“*”, “txp_image”, “id=’$id’ limit 1”); if ($rs) { extract($rs); $out[]= “$alt”; } }
return join(“”,$out); } }</code>
Last edited by Jeff_K (2006-01-23 03:20:13)
Offline
Re: Image caption
lee wrote:
The point of clicking “textpattern”, next to an image on the image tab, and being presented with a pop up window with the correct image tag text that can be copied/pasted into an article is imo the way it should be.
upm_img_popper basically gives you the image tab as a popup in the write tab. And it will insert the code for you so your user doesn’t have to learn anything new and doesn’t even have to cut and paste. It’s worth a try.
Shoving is the answer – pusher robot
Offline
Pages: 1