Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2005-09-01 02:19:10

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

Re: can zem_article_image be used to make linked thumbs?

I updated the plugin to Version 0.3 which add the ability to create a link that passes the image id to the page (displaylink=“1”), which can then be picked up by <txp:image_display /> or <txp:hak_article_image urloverride="1" />


Shoving is the answer – pusher robot

Offline

#32 2005-09-05 18:53:12

Jeff_K
Archived Plugin Author
From: Vancouver, British Columbia
Registered: 2005-08-19
Posts: 202
Website

Re: can zem_article_image be used to make linked thumbs?

Oh great! This sounds like it might do something of what I have been looking for. I am trying to wrap my head around the displaylink attribute. Is there some way this can be used to help generate a list of article images (ie, <code>Image <a href=“id1”>1</a>, <a href=“id2”>2</a>, <a href=“id3”>3</a>…</code>) where each is a link to an identical page displaying the appropriate image associated with a given article?

Last edited by Jeff_K (2005-09-05 18:54:04)

Offline

#33 2005-09-05 21:25:12

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

Re: can zem_article_image be used to make linked thumbs?

The displaylink attribute links the thumbnail to the same page passing the image id. That image id can then be picked up by <txp:image_display /> or by <txp:hak_article_image urloverride="1" /> The urloverride attribute tells it to use the image id in the url (?p=id).

Are you looking for something that will create text links to the full size image in another page template/section? (i’ve been thinking of adding the later since I have a different photo section page template)


Shoving is the answer – pusher robot

Offline

#34 2005-09-05 22:01:20

Jeff_K
Archived Plugin Author
From: Vancouver, British Columbia
Registered: 2005-08-19
Posts: 202
Website

Re: can zem_article_image be used to make linked thumbs?

Text links /are/ what I am looking for. Basically a given (portfolio) article would output its primary image as well as a list (as “1 2 3 4..”) of alternate images. After advice from kemie, I am thinking I might use custom fields to store the URL of each alternate image associated with an article. The trick is then how to display these images. I was thinking that I could just use a range of different forms (one for each custom field) that would only display the image urls from a given custom field.

That said, passing the image ID selected from the list of alternate images to <code><txp:image_display /></code>sounds much more attractive.

Offline

#35 2005-09-06 00:05:15

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

Re: can zem_article_image be used to make linked thumbs?

That sounds pretty doable. If the images are in textpattern you could just store the id in the custom field and use a form to build the links the way you want them. Would actually work pretty well. Then just pass the id through the url as the p parameter and <txp:image_display /> will just pick it up.


Shoving is the answer – pusher robot

Offline

#36 2005-09-08 09:26:42

Jeff_K
Archived Plugin Author
From: Vancouver, British Columbia
Registered: 2005-08-19
Posts: 202
Website

Re: can zem_article_image be used to make linked thumbs?

harkjoon, I have been attempting to implement this, with some success. I can’t seem to get image_display to pick up image ids defined through the <code>p</code>. Would this work in messy mode? I have been trying urls like http://www…..com/index.php?id=3?p=4. I have a hunch this is wrong though.

If I have id’s stored in custom fields and I want “sometext” to like to produce a link to the same page with a different p parameter (X), I would think that I could just be able to enter <code><a href=“p=X”>sometext</a></code>. After trying for a few hours, I gave up and tried to link “sometext” to the same article outputted through a different form, but that proved difficult too..

any thoughts?

Last edited by Jeff_K (2005-09-08 09:27:00)

Offline

#37 2005-09-08 14:34:25

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

Re: can zem_article_image be used to make linked thumbs?

You want to do http://www…..com/index.php?id=3<strong>&</strong>p=4 There should only be one <strong>?</strong> in the url. If you know the site will be using messy mode you can pretty safely append it with just the &p=6 as long as you are linking to a page with a query string (it has a ? already)


Shoving is the answer – pusher robot

Offline

#38 2005-09-08 19:29:40

Jeff_K
Archived Plugin Author
From: Vancouver, British Columbia
Registered: 2005-08-19
Posts: 202
Website

Re: can zem_article_image be used to make linked thumbs?

I guess this is what I get for practicing in php without a license. Thanks for the tip. I have the links working (although the set upsis a bit sluggish).

Still, I can’t seem to figure out how either to:

1. pass a p parameter to the initial page (obviously <code><txp:display_image></code> doesn’t pick up article image like <code><txp:article_image></code> does, and having both on the page gives me two images when I go to select a detail) or

2: set up a link to the same page with <code><a href=”<txp:permlink />&p=<txp:custom_field name=“image_2_id” />”>2</a></code> that relodes the page with a different form (one that swaps out <code><txp:article_image></code> for <code><txp:display_image></code>).

Offline

#39 2005-09-08 20:31:45

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

Re: can zem_article_image be used to make linked thumbs?

Use <txp:hak_article_image /> with the urloverride attribute. It’s designed exactly for this. So just drop <txp:hak_article_image urloverride="1" /> in your article form. It will pull the image specified by p if it is present otherwise it will use the first article image.


Shoving is the answer – pusher robot

Offline

#40 2005-09-08 21:25:53

Jeff_K
Archived Plugin Author
From: Vancouver, British Columbia
Registered: 2005-08-19
Posts: 202
Website

Re: can zem_article_image be used to make linked thumbs?

brilliant. much thanks.

Offline

#41 2005-09-09 06:01:52

Jeff_K
Archived Plugin Author
From: Vancouver, British Columbia
Registered: 2005-08-19
Posts: 202
Website

Re: can zem_article_image be used to make linked thumbs?

I have gotten fairly far on this. I even hacked zem_article_image to output multiple images as a list linked to the appropriate <code>p</code> values (much better then using 8 custom fields).

The only issue. The page was running upm_img_popper which gave me captions. But now that it using <code><txp:hak_article_image urloverride=“1” /></code> captions don’t seem to work. I have tried using a bit of php to call up the caption but even though I have gotten zem_article_image to output captions with <code>$caption</code> in the past, getting the page to display the caption associated with <code><txp:hak_article_image urloverride=“1” /></code> seems a bit harder. Is there any way to interface hak_article_image urloverride=“1” with the caption feature of upm_img_popper? Or otherwise a pinch of Php that would output the proper caption value?

Last edited by Jeff_K (2005-09-09 06:03:03)

Offline

#42 2005-09-09 10:21:31

Jeff_K
Archived Plugin Author
From: Vancouver, British Columbia
Registered: 2005-08-19
Posts: 202
Website

Re: can zem_article_image be used to make linked thumbs?

Okay, I figured this out. Basically gave up on urloverride in favor of a small content replacement javascript care of <a href=“http://www.alistapart.com/articles/imagegallery”>ala</a>. Re-hacked zem_article_image to output list in an appropriate way, and tada, it seems to work well (and much faster then reloading the page for each detail image).

Offline

#43 2005-09-09 12:19:49

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

Re: can zem_article_image be used to make linked thumbs?

Yeah the javascript method is much better I thought about adding that in but I was starting to think I was getting into rss_thumb_pop territory. I originally wrote the plugin just to give zem_article_image the ability to create popups from the thumbnails. Pretty much everything else was just added due to requests.

I’ll have to check about the caption though as that would make sense to make available.


Shoving is the answer – pusher robot

Offline

Board footer

Powered by FluxBB