Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#166 2008-02-14 06:34:32

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: hak_article_image

I need a hand first time with this plugin….

I am using <txp:article_custom from=“some_form” /> and want to include the first image in the article image field comma separated list in the form so I thought I could use:

—-some_form
<txp:hak_article_thumb limit=“1” />

<rest of form stuff>
—-end some_form
form type : article

But it does not display an image. I have two image ID’s in the article field (1,2) which is displaying all the other information for the articles specified in the form other then the image…I think it is just a matter of me using the tag properly but not sure….thanks for the help

Offline

#167 2008-02-14 13:59:44

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

Re: hak_article_image

Can you post exactly what’s in your article_image field? It could be just a syntax issue or it could be a bug. What you are describing seems like you are doing everything right.


Shoving is the answer – pusher robot

Offline

#168 2008-02-14 14:29:41

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: hak_article_image

article image field : 1,2

Now I did not put the tag in the body of the article….I wanted to avoid doing that and have the form handle the image display. So the form looks like this:

—————form
<txp:hak_article_thumb limit=“1” />

<p>
<txp:body />
</p>

<dl>
<dt><span>Address :</span></dt><dd><txp:custom_field name=“Address” /></dd>

<dt><span>Sq. Ft. :</span></dt><dd><txp:custom_field name=“Sq. Ft.” /></dd>

<dt><span>Price :</span></dt><dd><txp:custom_field name=“Price” /></dd>
</dl>
——end form

called from a page template with

<txp:article_custom form=“forsale-homepage” limit=“1” />

I hope that is of more help….thanks for the quick response!

Offline

#169 2008-02-14 16:25:21

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

Re: hak_article_image

That all looks right. It just needs to be in side an article form which it seems to be. Do the images have thumbnails? Does the regular article_image tag work?


Shoving is the answer – pusher robot

Offline

#170 2008-02-14 16:41:54

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,369
Website GitHub Mastodon Twitter

Re: hak_article_image

<txp:custom_field name="Sq. Ft." />

are spaces allowed in custom field names?

Last edited by colak (2008-02-14 16:42:15)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#171 2008-02-14 16:44:51

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: hak_article_image

****Yeah a thumbnail would be helpful…..disregard my question it was user error

Thanks HAK for the humbling!!!

Offline

#172 2008-02-14 16:49:14

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

Re: hak_article_image

It’s all about knowing what questions to ask :)


Shoving is the answer – pusher robot

Offline

#173 2008-02-14 16:49:16

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: hak_article_image

colak —- spaces do work in custom fields – in 4.0.6 at least

Last edited by cuda (2008-02-14 16:53:02)

Offline

#174 2008-03-19 10:12:38

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: hak_article_image

Hi Patrick,

Is it possible to display the thumbnails of article images as search results? I have a site with tons of images, in sections and a search form with filters to find images.

I’d appreciate your advice.

Thanks!

Offline

#175 2008-03-19 13:44:11

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

Re: hak_article_image

I haven’t messed with search in a while but from what I remember it just uses an article form to display the results so I don’t see why it wouldn’t work. Just put the tag in the search_results form.


Shoving is the answer – pusher robot

Offline

#176 2008-03-25 14:24:27

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: hak_article_image

Hi!

Let’s say the TXP search results shows the article image and its title, based on the search query. But if I have 10 images in one article, will all of these images appear in the search results?

Can the <txp:article_image /> tag and hak_article_image plugin be used together (in the same article form), so that my default image appears in search results, and on the article page I can use the plugin to show the other images?

Cheers,
Husain

Offline

#177 2008-03-25 15:27:46

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

Re: hak_article_image

Sure, you might need to add an offset to hak_article_image so that you don’t get the first image twice. You can also just add a limit of 1 to hak_article_image in your search_results form which will make it only display the first image.


Shoving is the answer – pusher robot

Offline

#178 2008-03-25 21:44:34

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: hak_article_image

is it normal to see the errors during debugging mode?


<txp:Ruhh />

Offline

#179 2008-03-25 21:50:39

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

Re: hak_article_image

You shouldn’t be seeing errors. Can you tell me what they are? If you’re seeing errors I want to fix them.


Shoving is the answer – pusher robot

Offline

#180 2008-03-25 22:02:25

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: hak_article_image

ok it gave me a set of errors. this is the first one.

Tag error: <txp:hak_article_image_link type="image" anchor="" section="" category="" popup="1" popwidth="25" popheight="25" 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/lib/txplib_misc.php:1460 parse()

this is the tag i use in the default form:

<txp:hak_article_thumb link=“1” linktype=“image” popup=“1” popwidth=“25” popheight=“25” />

Last edited by Ruhh (2008-03-25 22:03:43)


<txp:Ruhh />

Offline

Board footer

Powered by FluxBB