Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-08-23 18:51:55

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

Re: can zem_article_image be used to make linked thumbs?

If you have everything worked out with the rest of the layout my modification of zem_article_image should take care of the popup issue for you. I added a second image to the example article so you can see. This is just a comma deliniated list in the article image input, and then <zem_article_image pop="1" limit="5" /> in the article form.

I’m curious about how you are separating the “Featured Image” from the others?

I can send you a php file you can cut and paste into the plugin edit screen right now if you want. Otherwise I can package it up as a plugin tonight (don’t have TXP at work)


Shoving is the answer – pusher robot

Offline

#14 2005-08-23 18:53:36

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

Re: can zem_article_image be used to make linked thumbs?

oops those two replies came up while I was typing my reply. I’ll package it up as a plugin and post it tonight.


Shoving is the answer – pusher robot

Offline

#15 2005-08-23 18:58:47

cpk
Member
Registered: 2005-08-07
Posts: 62

Re: can zem_article_image be used to make linked thumbs?

awesome… thanks hakjoon

< waiting patiently >

;-)

cpk

Offline

#16 2005-08-23 19:00:31

rajo
Member
Registered: 2004-03-13
Posts: 43

Re: can zem_article_image be used to make linked thumbs?

thanks so much.

Offline

#17 2005-08-23 19:34:01

cpk
Member
Registered: 2005-08-07
Posts: 62

Re: can zem_article_image be used to make linked thumbs?

> hakjoon wrote:
> I’m curious about how you are separating the “Featured Image” from the others?

Apparently, when using zem_article_image, the first image listed in the Article image text field can be called with the tag: <code>< txp:zem_article_image /></code> I use this in a form that is then called within a section page. the form I use is shown below:

<pre>
<code>
< div id=“desc_l”>
< h2>< txp:title />< /h2>
< txp:zem_article_image />
</code>

table displaying custom fields goes here

</code>
< h3>Additional Views< /h3>
< txp:zem_article_thumb limit=8 wraptag=“div” />
< h3>Description< /h3>
< txp:body />
< /div>
< hr />
</code>
</pre>

rss_suparchive list showing specific category goes below this form in the section page

In the category listing of the section page that displays the featured image thumb (first image indicated in the image article text field) and the excerpt, I use the following form using this code <code>< txp:permlink>< txp:zem_article_thumb />< /txp:permlink></code> to call the thumb. Full form example below:

<pre>
<code>
< div class=“desc_s”>
< h2>< txp:permlink>< txp:title />< /txp:permlink></h2>
< txp:permlink>< txp:zem_article_thumb />< /txp:permlink>
< txp:excerpt />
< /div>
< hr />
</code>
</pre>

I then wrap the first form in a pair of <code>< txp:if_individual_article></code> tags and the second form in a pair of <code>< txp:if_article_list></code> tags on the section page.

This seems to work very well for all but the linking of thumbs on the individual article page to larger images. Of course, you will want to eliminate the leading space in the tags above to get it to work ;-)

cpk

Offline

#18 2005-08-23 19:41:33

cpk
Member
Registered: 2005-08-07
Posts: 62

Re: can zem_article_image be used to make linked thumbs?

hakjoon,

I just looked at the code on your site showing the second image example with the popup…exactly what I was looking for! Thanks! I do have one question about the generated code though: Is the <code>< div></code> tag wrapping around your images created by the altered zem_article_image plugin or is it created in a form?

cpk

Last edited by cpk (2005-08-23 19:42:00)

Offline

#19 2005-08-23 20:06:20

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

Re: can zem_article_image be used to make linked thumbs?

cpk wrote:
I do have one question about the generated code though: Is the <code>< div></code> tag wrapping around your images created by the altered zem_article_image plugin or is it created in a form?

That’s hardcoded in my article form. <txp:zem_article_thumb limit=8 wraptag="div" /> should work the same way it works now.

Does the call to <txp:zem_article_thumb limit=8 wraptag="div" /> not include the first article image also?

I’ll probably call mine hak_article_image so zem isn’t expected to offer support for any mistakes in my code :) I actually ran this by Alex a long time ago when he first released the plugin and I offered him my code. He said he had another version of it coming but then he became a dev and went on to produce bigger and better features.


Shoving is the answer – pusher robot

Offline

#20 2005-08-23 21:09:35

cpk
Member
Registered: 2005-08-07
Posts: 62

Re: can zem_article_image be used to make linked thumbs?

> hakjoon wrote:

>Does the call to <code>< txp:zem_article_thumb limit=8 wraptag=“div” /></code> not include the first article image also?

Yes, it does but I can live with that unless you have a method to exclude it. I also have this problem using rss_suparchive_bycat in my “other products” link lists since it includes a link to the individual article in which the list displayed but I can live with these issues if there is no fix for them.

Is there a method to exclude the first image in the list of thumbs? Asking for a method to exlclude the displayed article link from the rss_suparchive_bycat list might be asking too much since your already working to fix one of my major problems ;-)

>hak_article_image so zem isn’t expected to offer support for any mistakes in my code :)

hak_article_image has a certain ring to it, doesn’t it?

Thanks,

cpk

Offline

#21 2005-08-24 02:10:21

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

Re: can zem_article_image be used to make linked thumbs?

Alright It’s up I added an offset attribute while I was in there which should help with your double first image issue so you can just do <txp:hak_article_thumb poplink="1" offset="1" limit="8" wraptag="div" />

hak_article_image-01

I’d like to repeat that this is an extension of zem_article_image. The bulk of the code, the concept and base functionality all comes from zem. I don’t want to take credit for the work of others.


Shoving is the answer – pusher robot

Offline

#22 2005-08-24 02:28:46

rajo
Member
Registered: 2004-03-13
Posts: 43

Re: can zem_article_image be used to make linked thumbs?

this is perfect, thanks so much. sorry to bother but is there a way to customize the popup window?

Offline

#23 2005-08-24 02:39:14

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

Re: can zem_article_image be used to make linked thumbs?

> rajo wrote:
… is there a way to customize the popup window?

Not really right now. What are you looking to do?

This is fairly basic, I really was just looking to make zem_article_image do what dca_pop did, but I’m open to other functionality people would like to see.


Shoving is the answer – pusher robot

Offline

#24 2005-08-24 02:47:49

rajo
Member
Registered: 2004-03-13
Posts: 43

Re: can zem_article_image be used to make linked thumbs?

I’m looking to style it, add a “close” button. also, for some reason when I click on another thumbnail, it doesn’t switch the image in the popup window on safari and firefox on os x. I don’t mean to hassle you about adding a bunch of stuff as well but would there possibly be a way to have each thumbnail link to just the larger image on the same page? thanks again, this plugin saves the day.

Offline

Board footer

Powered by FluxBB