Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#256 2009-06-18 14:46:10
- MattE
- New Member
- Registered: 2008-06-04
- Posts: 7
Re: hak_article_image
Hi There. I’ve been using hak_article_image on a site for some time, but i’m in the process in bettering the accessibility.
What is the best way for me to use the article title as the alt text on thumbnails outputted by the plugin?
Offline
#257 2009-06-18 18:43:17
Re: hak_article_image
I don’t think there is a way to do it at the moment. Internally it uses the txp:image function which sets the alt attribute to the value from the DB. I’ve been meaning to remove that dependency but it’s still there.
All the image properties are present in in $hak_thisimage global that you can access inside a form if you want to build the tag by hand.
Shoving is the answer – pusher robot
Offline
#258 2009-06-24 19:26:57
- MattE
- New Member
- Registered: 2008-06-04
- Posts: 7
Re: hak_article_image
I’ll have a play about at some point, thank you for the support and the incredible usefulness of the plugin.
My other option is to spend a fair few hours spring cleaning, and adding alt text to the image library that is now around 1030 images in size.
Slow but probably the better method.
Offline
#259 2009-06-25 02:02:13
Re: hak_article_image
I have a replacement for txp:image that I never finished enough to release that I should just integrate into this. I wanted it to be a whole new image tag that would work like the article tag, but I should probably make my plans a little smaller.
Shoving is the answer – pusher robot
Offline
#260 2009-07-30 23:11:07
Re: hak_article_image
Hi to all! I want to show just the address of an image. How could I do this? I mean in <txp:article_image />.
When I use <txp:article_image /> this give me: <img src="http://www.site.com/image.jpg" alt="Alt" />, what I want is just: http://www.site.com/image.jpg
Any ideas?
Thanks in advance!
Offline
#261 2009-07-31 04:19:41
Re: hak_article_image
ok, then how could I do this: <a href="../images/image.jpg" class="highslide" onclick="return hs.expand(this)"><img src="../images/image-t.jpg" alt="Alt" title="Image" /></a> with this plug in?
What this does is: An image (thumbnail) is a link to another image (large). How could I do this?
Regards,
Offline
#262 2009-07-31 16:10:28
Re: hak_article_image
Robhert,
To get just the url there is no way to do it in the current version. I have a full re-write that I use on a few sites that allows that but it has not been thoroughly tested. I can post a copy if people want to try it out. It’s rough and has no docs, but it lets you pull images form custom fields among other things.
As for the second request that one is easy, just use <txp:hak_article_thumb class="highslide" link="1" linktype="image" /> you can use rel or linktitle to set the title or rel attribute of the link to something you can target with JS.
Shoving is the answer – pusher robot
Offline
#263 2009-07-31 17:06:23
Re: hak_article_image
Hi, thanks for your answer. I tried it out, but onclick function is required. How could I put “onclick” inside <txp:hak_article_thumb /> ?
And yes, please send me the plugin you have to do tha first question I made.
Thanks!
Last edited by robhert (2009-07-31 17:07:02)
Offline
#264 2009-07-31 17:48:37
Re: hak_article_image
robhert wrote:
Hi, thanks for your answer. I tried it out, but onclick function is required. How could I put “onclick” inside <txp:hak_article_thumb /> ?
And yes, please send me the plugin you have to do tha first question I made.
Thanks!
You could add the onclick using jquery. Something like (untested)
$(".highslide").click(function () {
hs.expand(this);
});
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#265 2009-09-16 22:20:02
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: hak_article_image
I am going crazy with a problem that doesn’t seem to make sense. Maybe I am not implementing it correctly but I have used that following code to output a list of thumbnails to work with thickbox but it seems that hak_article_thumb is not passing the class to the anchor tag even though I have assigned one.
I have even recreated an entirely new form to test this so I have a feeling that I may be doing something wrong. But I am not seeing it. The following code is contained within a div and is outputting everything else correctly. It will pass a rel successfully if I add that attribute but not a class.
Doesn’t hak_article_thumb not support classes? I thought it would pass a class to the containing anchor tag if link=“1” is defined. Or is there some stupid syntax error that I am blind to here?
<txp:hak_article_thumb class="thickbox" link="1" linktype="image" limit="8" offset="1" />
Thanks,
cpk
Offline
#266 2009-09-17 00:05:57
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: hak_article_image
I have done some further testing and discovered that the hak_article_image tag will not pass the class attribute I have assigned to it.
I have reviewed the instructions on this and made sure that I included the link=“1” attribute/value pair. In theory it should pass on whatever class I have assigned to the anchor tag wrapping the image (or thumbnail image as the case may be). I have included a rel attribute as a “control” and in each case the thumbnail AND the full size image called from the form the rel attribute is honored but the class attribute is not.
I am using both the hak_article_image and hak_article_thumb tags within a form. I have even reinstalled the plugin. Running on a Txp 4.20 install.
Thanks,
cpk
Offline
#267 2009-09-17 00:24:35
Re: hak_article_image
class gets attached to the wraptag. It’s a convention so I didn’t want to change it. Use linkclass to attach a class to the link.
It’s a little confusing because when you use hak_article_image_link in a hak_article_image form it takes class instead of linkclass, sorry about that.
Shoving is the answer – pusher robot
Offline
#268 2009-09-17 01:00:48
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: hak_article_image
Thanks Patrick! That was it.
cpk
Offline
#269 2009-12-03 22:48:39
Re: hak_article_image
Not sure <txp:hak_image_alt /> is working in TXP 4.2.0 … I get zero output from this in a form at the moment.
Last edited by Cantide (2009-12-03 22:49:17)
Offline
#270 2009-12-04 03:31:36
Re: hak_article_image
It works for me. What does your tag and form look like?
Shoving is the answer – pusher robot
Offline