Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#193 2008-03-30 08:27:53

fangonk
Member
Registered: 2007-07-12
Posts: 44

Re: hak_article_image

Ooopps sorry. Take a look.
<txp:hak_article_image link=“1” linktype=“page” offset=“1” linkclass=“thumb”/>

Offline

#194 2008-03-30 15:34:54

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

Re: hak_article_image

if you look at the generated page what does the HTML for that part look like? The image and link tag. I’m trying to see if there is some glitch in the html its generating.


Shoving is the answer – pusher robot

Offline

#195 2008-03-30 23:17:02

fangonk
Member
Registered: 2007-07-12
Posts: 44

Re: hak_article_image

<div id=“thumb”>
<a href=“http://richardmagnus.com/articles/pigeon-burn/?p=11” class=“thumb”><img src=“http://richardmagnus.com/images/11.jpg” width=“450” height=“150” alt=”“ /></a>
</div>

It looks like the class is being applied to the link and not the image.

Offline

#196 2008-03-31 01:24:25

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

Re: hak_article_image

That’s right. linkclass gets applied to the link. If you want to apply a class to the image you have to use a form.

<txp:hak_article_image offset="1" form="article_image_form" />

then in article_image_form

<txp:hak_article_image_link type="page">
       <txp:hak_image class="thumb" />
</txp:hak_article_image_link >

this should get you what you want.


Shoving is the answer – pusher robot

Offline

#197 2008-03-31 03:36:47

fangonk
Member
Registered: 2007-07-12
Posts: 44

Re: hak_article_image

I think this is getting closer, however now the images have disappeared entirely. Here is all the html is outputting:

</txp:hak_article_image_link >

Last edited by fangonk (2008-03-31 03:57:39)

Offline

#198 2008-03-31 04:55:54

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: hak_article_image

fangonk, remove the space between </txp:hak_article_image_link and >:

<txp:hak_article_image_link type="page">
       <txp:hak_image class="thumb" />
</txp:hak_article_image_link>

Last edited by jm (2008-03-31 04:56:20)

Offline

#199 2008-03-31 05:25:33

fangonk
Member
Registered: 2007-07-12
Posts: 44

Re: hak_article_image

That did it! Thanks guys, the textpattern community is really lucky to have so many experienced developers who are willing to work other users. Thank you.

Offline

#200 2008-04-02 19:20:36

conspirator
Member
From: Chicago
Registered: 2007-03-31
Posts: 35
Website

Re: hak_article_image

What am I doing wrong?

I’ve put the following code in my article form, but it doesn’t seem to work. Why is that?
[code]
<txp:hak_article_thumb class=“img” />
[/code]

Offline

#201 2008-04-02 19:43:31

Mike Montgomery
Member
Registered: 2005-11-28
Posts: 29
Website

Re: hak_article_image

Are those plain old quotation marks, or “smart & curly quotes”?

Offline

#202 2008-04-02 21:41:11

conspirator
Member
From: Chicago
Registered: 2007-03-31
Posts: 35
Website

Re: hak_article_image

plain ol’ quotation marks

Offline

#203 2008-04-03 02:35:53

Mike Montgomery
Member
Registered: 2005-11-28
Posts: 29
Website

Re: hak_article_image

Just to confirm a few things:

  • This works as expected? <txp:hak_article_thumb />
  • This does not work? <txp:hak_article_thumb class=“photo” />

Just to be certain, I copy/pasted an example from the hak_article_image site:

<txp:hak_article_thumb limit="5" wraptag="ul" break="li" class="wrapclass" breakclass="breakclass" />

…and noticed that those quote marks look slightly different than these:

<txp:hak_article_thumb class=“img” />

Offline

#204 2008-04-03 10:51:16

hanz
Member
From: de
Registered: 2006-02-11
Posts: 23

Re: hak_article_image

Hi,

maybe i have the same a problem but can specify it a bit more.

When I’m using:
<txp:hak_article_thumb link="0" />
Everything is working fine.

But when I’m using:
<txp:hak_article_thumb />
or
<txp:hak_article_thumb link="1" />
i get:

tag_error <txp:hak_article_image_link type="image" anchor="" section="" category="" popup="0" popwidth="0" popheight="0" rel="" class="" title=""> ->  Notice: Undefined variable:  attribs  on line 146
textpattern/lib/txplib_misc.php(574) : eval()'d code:146 hak_article_image_link()
textpattern/publish.php:970 hak_article_image_link()
processtags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/lib/txplib_misc.php(574) : eval()'d code:72 parse()
textpattern/lib/txplib_misc.php(574) : eval()'d code:4 hak_article_image()
textpattern/publish.php:970 hak_article_thumb()
processtags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/publish/taghandlers.php:2480 parse()

conspirator, you get kinda the same?
I thought on default link is “0” but now it seems to be “1”.
I’m using version 0.6.3

Cheers, Hannes

Last edited by hanz (2008-04-04 15:55:15)

Offline

Board footer

Powered by FluxBB