Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: hak_article_image
Thank you for your help Patrick, that works perfectly.
One final thing while I’m about it, to add a caption to the main image I thought I should use the linktitle='txp:caption', but this doesn’t seem to be its purpose. Is there another way of achieving this?
Offline
Re: hak_article_image
There’s no way to do it with this plugin. I’d have to implement some sort of form handling for it which I keep thinking of doing but I can’t decide if it’s a good idea or if it would complicate the plugin too much
I wrote a little plugin that pulled captions for the image currently being passed by the URL awhile ago that should work. But it won’t work for the first image unless you pass the id in the url. It was designed to work with <txp:image_display /> but it should work with this setup too.
I might be able to make an update that will make that work a little better. I haven’t checked this guy in awhile as it was never a really distributed plugin so let me know if it spits out any errors or anything (it was written for RC3)
Shoving is the answer – pusher robot
Offline
Re: hak_article_image
Thanks again.
Of course, if hak_article_image had a caption display ability built in it would be pretty much perfect! I installed the hak_image_display_caption plug-in, it displays the caption but throws out the following error:
tag_error <txp:hak_image_display_caption/> -> Warning: Missing argument 3 for dowrap() on line 2308
Offline
Re: hak_article_image
Ok I forgot to update the distribution, I have a fix for that but let me see if I can come up with something more elegant. That plugin does an extra DB query which should be unnecessary if I set things up right.
Shoving is the answer – pusher robot
Offline
Re: hak_article_image
Great, thanks for your time.
Offline
Re: hak_article_image
Excellent, thanks :¬)
Offline
Re: hak_article_image
Just to keep you all in the loop. I decided to finally bite the bullet and make this puppy use forms. This requires a bit of a rewrite so it’s taking a little longer. In the end I think it will be worth it though.
I’m planning on this next version being fully backwards compatible so you don’t have to use the forms if you don’t want to.
However, I’m planning on taking this work into a more general purpose hak_image tag (Ideally implementing a lot of these ideas) that will probably not be backwards compatible.
Shoving is the answer – pusher robot
Offline
Re: hak_article_image
>hakjoon wrote:
bq. I’m planning on taking this work into a more general purpose hak_image tag
You go girl :)
Seriously though, thanks, a more powerful image tag (with forms) is something I’ve been looking for, for a long time. Let me know if you want me to help test.
Offline
Re: hak_article_image
Hakjoon,
That’s great news!
I’ll be glad to help test as well.
Cheers,
Tom
Offline
#100 2007-03-05 08:39:37
Re: hak_article_image
Excellent news – thanks!
Offline
#101 2007-03-17 01:46:55
Re: hak_article_image
This took a little longer then I expected.
- Can now use forms (not as extensive as upm_image but it’s easily extendable).
- Access to image caption.
- Creates a global
$hak_thisimagevariable if anyone wants to create more form tags. - should be fully backwards compatible with old non-form syntax.
I tried to test this as best I could but eventually it just needs to go out. It’s a fairly big re-implementation so I migth have missed things so please report any problems.
Last edited by hakjoon (2007-03-17 01:49:23)
Shoving is the answer – pusher robot
Offline
#102 2007-03-19 12:53:20
Re: hak_article_image
Hi Patrick,
Sounds great, thanks. I’ve downloaded the file but it still seems to be version 0.5.2, have I gone to the wrong URL?
Offline
#103 2007-03-19 13:50:44
Re: hak_article_image
Not sure what happened there but somehow the new upload didn’t take. It should be working now.
Shoving is the answer – pusher robot
Offline
#104 2007-03-19 15:29:56
Re: hak_article_image
That’s working fine now, thanks.
Just one question. I’ve read through the help file but I’m not quite sure how to add a caption to the main image – this is my code:
<div class="columns-2-A">
<txp:hak_article_image urloverride=‘1’ limit='1' break="br" linktitle="txp:caption" wraptag="ul"/>
<txp:hak_article_thumb link='1' linktype="page" urlhide='0' />
</div><!-- end of columns-2-A -->
I tried adding the <txp:hak_image_caption /> tag beneath the <txp:hak_article_image/> but nothing appeared.
Last edited by decoderltd (2007-03-19 15:30:44)
Offline
#105 2007-03-19 15:47:03
Re: hak_article_image
To use <txp:hak_image_caption /> you need to use a form. It was the only way I could think of to allow the multitude of placements etc people would want.
When using a form <txp:hak_article_image /> works somewhat like the <txp:article />@ tag.
So you do:
<div class="columns-2-A">
<txp:hak_article_image urloverride=‘1’ limit='1' break="br" wraptag="ul" form="form_name" urlhide='0'/>
</div><!-- end of columns-2-A -->
notice the form attribute and that urlhide has been move here. Then in you form you do.
<txp:hak_article_image_link type="page">
<txp:hak_thumbnail />
<txp:hak_image_caption wraptag="p" />
</txp:hak_article_image_link>
I’m not sure that you want to use urlhide and urloverrid in the same set. Normally I use urlhide in the image index call. Something like
<txp:hak_article_image urlhide="1" form="index_form" />
<txp:hak_article_image urloverride="1" limit="1" form="main_image_form" />
Sorry this is confusing. I was having a really hard time writing the docs. I welcome any suggestions in how to make it clearer.
Shoving is the answer – pusher robot
Offline