Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2009-12-14 13:03:21

Kreeltje
Member
Registered: 2008-12-23
Posts: 21

Re: soo_image: simple yet powerful image tags

Ah okay, Thanks for the reply!

Offline

#50 2010-01-16 13:45:42

afewimages
Member
Registered: 2009-12-23
Posts: 33

Re: soo_image: simple yet powerful image tags

Hi,

i use soo-image for showing my images but on a gallery section it does not what i want it to do.
I use this code in a form trying to display my thumbs and when i click on one, ColorBox has to do the rest. (sort of lightbox clone):

<a href="<txp:soo_image_url />" rel="example2"><img src="<txp:soo_thumbnail_url />" /></a>
example2 is the way to get ColorBox to work.
I use soo_image_select on a page to link to this form. But the href and the scr attributes are empty.

What am i doing wrong?

Steven.

Last edited by afewimages (2010-01-16 13:46:23)

Offline

#51 2010-01-16 15:08:07

afewimages
Member
Registered: 2009-12-23
Posts: 33

Re: soo_image: simple yet powerful image tags

Hi,

I solved the above issue myself!
This is the page code:
<txp:soo_image_select form="soogallery" wraptag="ul" break="li" class="gallery" ext="jpg" />

I have tried the category spec. instead of the ext. spec but that seems not did to work….

The form output is:
<txp:soo_image thumbnail="1" link="1" link_rel="example2" />

All clear but now i encountered another issue. I have my images in different categories. I have listed these categories on the gallerypage. What i want is to show only the category related images in the imagelist when i click on one of these categorylinks. This code does not the trick:
<txp:category_list type="image" this_section="1" wraptag="ul" />
Is there anyway to achieve this?

Steven.

Offline

#52 2010-01-16 17:40:39

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

Re: soo_image: simple yet powerful image tags

OK, glad you got it working at least partially — I was just typing up a reply to your first question when I saw the next one.

BTW, you can use this:

<txp:soo_image link_rel="example2" />

for your image form, because setting the link_rel attribute automatically makes the image a linked thumbnail.

Categories should work. Is there a page I can see, or a tag trace? If I’m correctly understanding what you’re trying to set up, something along these lines should work:

 <txp:soo_image_select category='<txp:category />' />

when you are on a category page (i.e., a page with a URL such as http://mysite.com/category/foo).


Code is topiary

Offline

#53 2010-01-17 09:34:18

afewimages
Member
Registered: 2009-12-23
Posts: 33

Re: soo_image: simple yet powerful image tags

Hi jsoo,

thanks for the quick response.
I have this on my page:
<txp:soo_image_select form="soogallery" wraptag="ul" break="li" class="gallery" category="winter" />
The category works. But i have much more image categories. Do i have to put them all in the above code?
Another question was: I have a categorylist on the same page:
<txp:category_list type="image" this_section="1" wraptag="ul" />
But when i click on a cat-link it does’nt show the category-only related thumbs. It does nothing. Is there a way to achieve this?

Thanks,

Steven.

Offline

#54 2010-01-17 15:57:45

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

Re: soo_image: simple yet powerful image tags

afewimages wrote:

I have this on my page:
<txp:soo_image_select form="soogallery" wraptag="ul" break="li" class="gallery" category="winter" />
The category works. But i have much more image categories. Do i have to put them all in the above code?

Lots of ways you can create a gallery that spans categories. If you want to include all image categories, do this:

<txp:soo_image_select category='<txp:category_list type="image" break=","><txp:category /></txp:category_list>' />

(I left out the form and other attributes; add as desired.)

Another question was: I have a categorylist on the same page:
<txp:category_list type="image" this_section="1" wraptag="ul" />
But when i click on a cat-link it does’nt show the category-only related thumbs. It does nothing. Is there a way to achieve this?

<txp:soo_image_select category='<txp:category />' />

Note that this will only show images if you are on a category page, with a URL such as http://mysite.com/this_section/?c=winter. If you want a gallery to show when not on a category page, you could use an if_category conditional to add this.

BTW you want to add break="li" to your category_list tag.


Code is topiary

Offline

#55 2010-01-17 20:14:09

afewimages
Member
Registered: 2009-12-23
Posts: 33

Re: soo_image: simple yet powerful image tags

Hi jsoo,

I tried your solutions. The display of all image-category images works well with:
<txp:if_category> <txp:soo_image_select form="soogallery" wraptag="ul" break="li" class="gallery" category='<txp:category />' /> <txp:else /> <txp:soo_image_select form="soogallery" wraptag="ul" break="li" class="gallery" category='<txp:category_list type="image" break=","><txp:category /></txp:category_list>' /> </txp:if_category>

But <txp:soo_image_select category='<txp:category />' /> for the catlist did not work. The existing <txp:category_list type="image" this_section="1" wraptag="ul" break="li" /> works just fine!

So thanks for your help,

Steven.

Offline

#56 2010-01-17 20:18:25

afewimages
Member
Registered: 2009-12-23
Posts: 33

Re: soo_image: simple yet powerful image tags

BTW:

what does the break=”,” do? Without it i can’t see any thumbs?

AND:

in the sourcecode on the html page i see:
<li><a href=“site.com/image” rel=“example2”><img alt=”“ src=“site.com/image” />
</a>
</li>

Why the last two breaks (the a-tag and the li-tag)?

Steven.

Last edited by afewimages (2010-01-17 20:29:31)

Offline

#57 2010-01-17 21:47:23

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

Re: soo_image: simple yet powerful image tags

afewimages wrote:

But <txp:soo_image_select category='<txp:category />' /> for the catlist did not work. The existing <txp:category_list type="image" this_section="1" wraptag="ul" break="li" /> works just fine!

Right, I didn’t mean to suggest you needed to change your category list code, rather that you want both on the page, as you have now worked out.

what does the break=”,” do? Without it i can’t see any thumbs?

Gets category_list to produce a comma-separated list, which is what soo_image_select needs in its category attribute to show multiple categories. The default behavior of category_list is to output links to category pages separated by <br /> tags, which soo_image_select wouldn’t be able to understand. So it’s not just the break="," but also turning category_list into a container tag holding just the plain <txp:category /> that turn this into the right format for this purpose.

in the sourcecode on the html page i see:
<li><a href=“site.com/image” rel=“example2”><img alt=”“ src=“site.com/image” />
</a>
</li>

Why the last two breaks (the a-tag and the li-tag)?

The line break at the end of the img tag is put there by the library plugin (soo_txp_obj). It’s there to fit the general case of one tag holding several other tags; I’ll see about fixing it (I hate extra whitespace in the HTML, as I guess you do too). The line break after the </a> must be in your image form.


Code is topiary

Offline

#58 2010-01-18 07:46:49

afewimages
Member
Registered: 2009-12-23
Posts: 33

Re: soo_image: simple yet powerful image tags

Jsoo,

thanks for all the help. I Do like a clean sourcecode! But i suppose anyone does working with TxP? ( i hope so..)

thanks for this great plugin. I am building a large photo(archive) site together with all sorts of other things i am interested in and i only use your plugin for all my (photo)needs! (gallery, jquery, javascript, paging, ….)
Thanks,

Steven.

Offline

#59 2010-01-18 18:16:07

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

Re: soo_image: simple yet powerful image tags

Sounds great — I’d like to see it when you’re done.

BTW have uploaded an updated version of soo_txp_obj to remove the extra line break. Version number unchanged.

(Also updated soo_image, mainly a documentation update, so again no version number change.)


Code is topiary

Offline

#60 2010-01-18 18:56:36

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: soo_image: simple yet powerful image tags

Trying installing the soo_image without activating the soo_txp_obj first, I’ve got this error:

Errore nel caricare il plug-in: soo_image -> User_Error: Unable to include required plugin “soo_txp_obj” on line 498

Obviously, after activating the soo_txp_obj all went fine but, if I remember well, the prevous version of soo_image could be installed without activating the soo_txp_obj. I wanted only let to know you this.

Last edited by candyman (2010-01-18 18:57:02)

Offline

Board footer

Powered by FluxBB