Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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>
</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
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
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" />
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
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
Re: can zem_article_image be used to make linked thumbs?
Hmmm.. I’m getting that to happen on Safari but not Firefox. I’ll have to see what’s going on with that.
Here’s the issue with making it so you can style the popup window to add a close button and things like that. You would have to create a section to have a plain layout to use in the popup (like say a popup section). You would then need to specify that the popup call a page in that section.
As far as making is how up on the same page it wouldn’t be very hard to make it pass a $p variable so you could use <txp:image_display /> to display the full size image.
I wonder if maybe the best thing would be to allow the user to specify a custom output_form that way you could really build whatever link scenario you want.
I’ll have to see how involved that is to do. I haven’t created a plugin that uses forms yet.
Shoving is the answer – pusher robot
Offline
#26 2005-08-24 04:42:11
- rajo
- Member
- Registered: 2004-03-13
- Posts: 43
Re: can zem_article_image be used to make linked thumbs?
well, sounds like a custom popup is out of the picture, which is fine, not that important. Getting it to work with image_display would be perfect though. It seems like all these things should be written into the article_image tags in textpattern, but I guess that’s what plugins are for.
Offline
#27 2005-08-24 05:03:29
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: can zem_article_image be used to make linked thumbs?
Patrick… YOU DA MAN!!!
Thanks so much. This works awesome! You even got more in there than I expected with the offset attribute.
Thanks again!
cpk
Offline
Re: can zem_article_image be used to make linked thumbs?
rajo wrote:
well, sounds like a custom popup is out of the picture, which is fine, not that important. Getting it to work with image_display would be perfect though. It seems like all these things should be written into the article_image tags in textpattern, but I guess that’s what plugins are for.
Let me try some stuff out. I had a couple thoughts on how to do this last night. I’ll have to see if they work.
Shoving is the answer – pusher robot
Offline
#29 2005-08-24 22:38:30
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: can zem_article_image be used to make linked thumbs?
Patrick,
How would I assign an ID or Class to a < div> or < p> wrapttag assigned within the hak_article_thumb? Wrap tag works but I can’t seem to assign an ID or Class to it.
cpk
Offline
Re: can zem_article_image be used to make linked thumbs?
I updated the plugin to allow that. It wasn’t using doWrap() before, now it is. The help will point you to how to do it.
I’m still working on something for rajo.
update: I left some debugging code in 0.2 make sure you got 0.2.1
Last edited by hakjoon (2005-08-25 01:09:27)
Shoving is the answer – pusher robot
Offline