Textpattern CMS support forum

You are not logged in. Register | Login | Help

#261 2009-07-31 04:19:41

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 198
Website

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

hakjoon
Moderator
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,633
Website

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

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 198
Website

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

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,251
Website

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);
    });

My Plugins

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

hakjoon
Moderator
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,633
Website

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

Cantide
Member
From: Wellington, New Zealand
Registered: 2004-03-03
Posts: 27
Website

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

hakjoon
Moderator
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,633
Website

Re: hak_article_image

It works for me. What does your tag and form look like?


Shoving is the answer – pusher robot

Offline

Board footer

Powered by FluxBB