Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2010-09-29 21:22:32

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

Re: [howto] Using the new image tags in Txp 4.3.0

Dragondz wrote:

Hi Stef may be you can use article_image like this:
sort='FIELD(ID,<txp:custom_field name="article_image" />)'

Undocumented feature. I tested it and confirmed that this outputs the raw value of article_image.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#38 2010-11-16 02:55:58

damienbuckley
Member
From: Brisbane, QLD, AU
Registered: 2006-02-24
Posts: 138
Website

Re: [howto] Using the new image tags in Txp 4.3.0

Any progress on the txp:images offset problem?

Offline

#39 2010-11-16 11:35:35

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [howto] Using the new image tags in Txp 4.3.0

damienbuckley wrote:

Any progress on the txp:images offset problem?

Just encountered this problem… Maybe this bug fix should go in release?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#40 2010-11-16 11:45:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: [howto] Using the new image tags in Txp 4.3.0

the_ghost wrote:

Maybe this bug fix should go in release?

What bug?

If you mean that you can’t specify an offset without setting a limit, we should probably fix <txp:linklist /> as well, which functions in exactly the same way (I modelled <txp:images /> on <txp:linklist />). Nobody’s complained about that and it’s been like that since the tag was first written! Either way we should take this discussion off Jeff’s thread.

Last edited by Bloke (2010-11-16 11:46:01)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#41 2010-11-28 09:54:25

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: [howto] Using the new image tags in Txp 4.3.0

Is there anything like txp:if_first_image and txp:if_last_image functionality in conjunction with txp:images?

I did try replicating the corresponding functions for article/category/section with $thisimage and assert_image(); but they did not function as I expected them to. I guess there’s a reason for that.

In the end I achieved what I wanted with a combination of jmd_count and txp:variable but it was a roundabout way of getting there.


TXP Builders – finely-crafted code, design and txp

Offline

#42 2010-11-28 10:16:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: [howto] Using the new image tags in Txp 4.3.0

jakob wrote:

Is there anything like txp:if_first_image and txp:if_last_image functionality in conjunction with txp:images?

No. The same holds for links and file downloads. Only articles have the notion of first and last at the moment.

I did try replicating… with $thisimage and assert_image(); but they did not function as I expected them to.

$thisimage, $thislink and $thisfile don’t have entries for is_first and is_last so the only way to do it is via a plugin or some brief counting PHP. If jmd_count and txp:variable are the most efficient way of doing it then perhaps this should be a TXP tip?

Last edited by Bloke (2010-11-28 10:17:13)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#43 2010-11-28 11:21:07

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: [howto] Using the new image tags in Txp 4.3.0

Thanks, Stef, for shedding light on that.

perhaps this should be a TXP tip?

Well I think this use case was a bit specific as most of the time you can simply place the closing statement after the closing </txp:images> tag.

In my particular case I wanted to wrap every set of three images in a div (e.g. insert close ul + div and open a new div + ul after each third image) but not in the final case (which also happens to be divisible by three). The solution was find the total number of images from the category, then compare the current incrementing image number against that (like using {counter} and {totalimages} with smd_if / smd_gallery in the not-so-old-days).


TXP Builders – finely-crafted code, design and txp

Offline

#44 2011-02-22 14:37:39

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: [howto] Using the new image tags in Txp 4.3.0

j_soo i tried your gallery example and i get this error:

Tag error:  <txp:image_list form="gallery_demo_1" break="" /> ->  Textpattern Warning: tag does not exist  on line 1183

Wonder what I’m doing, i am using the latest version of txp…
-thanks


its a bad hen that wont scratch itself.
photogallery

Offline

#45 2011-02-22 14:58:59

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: [howto] Using the new image tags in Txp 4.3.0

kvnmcwebn wrote:

tag does not exist…

<txp:image_list> was renamed to <txp:images> at the last minute.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#46 2011-02-22 15:58:47

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [howto] Using the new image tags in Txp 4.3.0

Sorry about that; example code updated.


Code is topiary

Offline

#47 2011-02-22 16:32:50

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: [howto] Using the new image tags in Txp 4.3.0

oh thanks guys. jsoo that example is great btw.


its a bad hen that wont scratch itself.
photogallery

Offline

#48 2011-02-23 10:53:32

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: [howto] Using the new image tags in Txp 4.3.0

hi jsoo, in this example

http://gallery.ipsedixit.net/category/image/fear/

How are you getting the images not to the page?
When I try it the selected image reloads on it’s own blank page without the thumbs.
Thanks
Kevin

edited to ask:
what is the image context?

Last edited by jsoo (2011-04-10 16:26:47)


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB