Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#253 2009-06-05 01:28:17

Wet_Sponge
New Member
Registered: 2009-06-04
Posts: 3

Re: hak_article_image

Clearly I have done something fundamentally wrong, as the ‘Expand +’ still hyperlinks to http://snackondesign.com/images/

this is my current image form;

<div class="image">
<txp:hak_article_image form="link_expand" />
<div class="caption">
<h1><txp:permlink>_<txp:title /></txp:permlink></h1>
<h2>in <txp:category1 this_section="1" title="1" link="1" /> &amp; <txp:category2 this_section="1" title="1" link="1" /></h2>
<h3>posted by <txp:author /> on <txp:posted format="%d %b %Y" /></h3>
<txp:body />
</div>
</div>

which references link_expand

<txp:hak_article_thumb />
<div class="tinycaption">
<p>
<txp:hak_article_image_link linktype="image" rel="lightbox" class="light-box-expand">Expand +</txp:hak_article_image_link>
</p>
</div>

Thankyou for you assistance so far and a tremendously useful plug-in.

Offline

#254 2009-06-05 02:19:58

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

Sorry I had some stuff wrong in the form I gave you. It needs to be <txp:hak_thumbnail /> in a form not <txp:hak_article_thumb /> that causes the whole tag to get called again resetting the global. I need to add a check for that.

This form is working for me.

<txp:hak_thumbnail />
<div class="tinycaption">
<p>
<txp:hak_article_image_link type="image" rel="lightbox" class="light-box-expand">Expand +</txp:hak_article_image_link>
</p>
</div>

linktype also becomes just type in a form.

Last edited by hakjoon (2009-06-05 02:20:21)


Shoving is the answer – pusher robot

Offline

#255 2009-06-05 03:44:53

Wet_Sponge
New Member
Registered: 2009-06-04
Posts: 3

Re: hak_article_image

Perfect, thankyou.

Offline

#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

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

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

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

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

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

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

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 206
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
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
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: 206
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,254
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

Board footer

Powered by FluxBB