Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2009-07-05 15:54:55

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

Re: soo_image: simple yet powerful image tags

Promoted from alpha to beta: now at version 1.0.b.1

Important This is a major upgrade, because the underlying library has been overhauled. Use care when upgrading an existing soo_image site; I don’t expect issues but YMMV. If you run Multidoc you will need to upgrade it at the same time.

New features include:

  • New link_to attribute for soo_image, allows you to preview a gallery on another page (demonstration)
  • soo_image_next can now be used before its associated soo_image_select tag
  • downshift to v2.0 of the GPL to match Txp license
  • Changes to the soo_image tag:
    • New attributes: title, link_class, link_id
    • New behavior: Setting any link-related attribute sets thumbnail and link to true

Full user guide, including download & installation instructions

Last edited by jsoo (2009-07-05 15:55:48)


Code is topiary

Offline

#38 2009-07-31 18:23:57

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

Re: soo_image: simple yet powerful image tags

From a question in another thread, just a reminder that the <txp:soo_image /> tag takes an optional onclick attribute, which results in a linked thumbnail, the value of onclick getting passed through to the anchor element linking the image. Hence, a handy javascript hook. Example toward the bottom of this page from the soo_image documentation.


Code is topiary

Offline

#39 2009-08-22 03:04:39

cloudcontrol
New Member
Registered: 2009-08-22
Posts: 2

Re: soo_image: simple yet powerful image tags

Hi,

Great plugin (so far)! I’ve been hunting around for an image filter/gallery plugin that will let me paginate galleries. I tried smd_gallery, but it was a little too hard for me to wade through, and also it might have some conflicts with some of the other plugins I’m using, because it kept throwing errors.

I’m integrating with Highslide, which seems to work just fine (as promised!).

I have a small issue, however:

I’m using the ‘l10n’ multi-language plugin, and I’m guessing this may be what’s causing an error with the page links – see here:

http://www.projectbump.com/gruppo/gallery2/ – the URL for the prev/next links give me:

http://www.projectbump.com/gruppo/en/gruppo/highslide/highslide.css?soo_img_pg=2

instead of what I’m guessing should be:

http://www.projectbump.com/gruppo/en/gallery2/?soo_img_pg=2

This second URL (immediately above) works, and the prev/next links work fine, BUT the following page linked to (e.g. http://www.projectbump.com/gruppo/en/gruppo/gallery2/?soo_img_pg=3) has added another /gruppo/ after the language structure (/en/) and again generates impossible links which lead to 404.

The relevant code:

The article (section gallery2):

<txp:soo_image_prev link_text=“Prev” class=“prev” />
<txp:soo_image_next link_text=“Next” class=“next” />
<txp:soo_image_select category=“gallery” limit=“8” />

The soo_image form:

<txp:soo_image thumbnail=“1” link=“1” onclick=“return hs.expand(this,{captionId: ‘caption1’, align:‘center’})” class=“highslide” />

Help?

I also need to place a <hr /> in between each row of 6 thumbs, and I’m wondering is it possible to nest soo_image_select tags, or have them in parallel with pagination applying to the aggregate?

Thanks!

Last edited by cloudcontrol (2009-08-22 03:06:16)

Offline

#40 2009-08-22 06:49:33

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

Re: soo_image: simple yet powerful image tags

cloudcontrol wrote:

I tried smd_gallery, but it was a little too hard for me to wade through, and also it might have some conflicts with some of the other plugins I’m using, because it kept throwing errors.

OT: Sorry to pollute this thread but if you are getting errors with smd_gallery and finding it tricky (it is a mind-bender for sure!) please would you post your findings on that plugin’s forum thread or send me an email with as much detail as you can so I can address them. If there are bugs I’d like to squash them, and if I can find better ways of doing things or making it easier to use then I’d like to do that too.

We now return to our regular broadcast…


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

Offline

#41 2009-08-22 12:27:19

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

Re: soo_image: simple yet powerful image tags

cloudcontrol wrote:

I’m using the ‘l10n’ multi-language plugin, and I’m guessing this may be what’s causing an error with the page links

That may well be the problem — I don’t know enough about MLP Pack to say just now. I’ll have a look later today. Is there anything else you are doing to manipulate URLs?

Edit: Having had a preliminary look, I think the incompatibility depends on having both MLP Pack and installing Txp in a subdir. Still looking for a solution …

Last edited by jsoo (2009-08-22 20:08:17)


Code is topiary

Offline

#42 2009-08-22 20:08:34

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

Re: soo_image: simple yet powerful image tags

Inline help for the l10n plugin states:

It does not support subdirectory installations.

I don’t know if this is still the case or not, but am I correct that you are trying this with a subdir install? Any other issues?


Code is topiary

Offline

#43 2009-08-23 00:28:22

cloudcontrol
New Member
Registered: 2009-08-22
Posts: 2

Re: soo_image: simple yet powerful image tags

Yes, it’s a subdir installation, I guess… I wonder if I subdomain it instead, if that would make a difference? Thanks for the tip – I’ll follow up on it and report back! :)

Edit: I changed it over to a subdomain

http://gruppo.projectbump.com/en/gallery/

and the linking works fine! Thanks for the hint with MLP.

Do you have any advice on the nesting of soo_image_select tags? I tried it, but it seems to repeat the same images over and over, as there’s no offset attribute. Also, I’m guessing it will wreack havoc with the pagination?

What I’m trying to achieve is:

Row of thumbs (x 6)

—————————— ( <hr / > )

Row of thumbs (x 6)

—————————— ( <hr / > )

Row of thumbs (x up to 6)

One more thing – is there any way of detecting how many pages the gallery will have, and generating a “page 1 / 5” output?

Thanks!

Last edited by cloudcontrol (2009-08-23 05:36:07)

Offline

#44 2009-09-10 22:33:10

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

Re: soo_image: simple yet powerful image tags

cloudcontrol wrote:

Do you have any advice on the nesting of soo_image_select tags? […] is there any way of detecting how many pages the gallery will have

Sorry I missed this one when you posted it. At present soo_image does not offer either of these features. I will give it some thought. In the meantime, you might be able to accomplish the first by counting images with <txp:variable />.


Code is topiary

Offline

#45 2009-09-11 02:00:25

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

Re: soo_image: simple yet powerful image tags

cloudcontrol: just brainstorming your request. For the page count, I could easily add a tag analogous to the soo_page_count tag in soo_page_numbers. That would allow output such as “Page x of y”, customized as you wish.

For splitting output into rows, while I could add an attribute to control this, I’d prefer not to because I want to avoid attribute bloat. However, I have an idea for a generalized tag (would be a separate plugin) for counting things and inserting text/markup at designated points. I’m envisioning something like this:

<txp:soo_count_stuff limit="6" break="hr"><txp:soo_image /></txp:soo_count_stuff>

So the above code would go into the image form and add an <hr /> after every sixth image.

Edit: Brilliant — I think I’ve just invented zem_nth!

Last edited by jsoo (2009-09-11 02:17:01)


Code is topiary

Offline

#46 2009-09-18 14:11:57

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

Re: soo_image: simple yet powerful image tags

Version 1.0.b.2 just released.

  • Fixed bug in soo_image_date (was displaying incorrect date or time zone in some cases)
  • New tags:
    • soo_thumbnail_url
    • soo_thumbnail_height (Txp 4.2.0 or higher)
    • soo_thumbnail_width (Txp 4.2.0 or higher)
    • soo_image_page_count
  • Changed behavior: now uses (optionally) soo_plugin_pref. The old soo_plugin_prefs is no longer supported.

soo_image_page_count is in response to the request from cloudcontrol, above.


Code is topiary

Offline

#47 2009-12-08 14:32:55

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

Re: soo_image: simple yet powerful image tags

Is it possible to use this without thumbnail? So with the original image resized like this:

<txp:soo_image width="220" link_rel="shadowbox" />

The output is now the resized thumbnail..(so blurry).

Thank you

Offline

#48 2009-12-12 16:47:05

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

Re: soo_image: simple yet powerful image tags

Sorry for the delayed reply. Using the link_rel attribute will always cause soo_image to output a linked thumbnail, so currently this is not possible directly. You could “manually” assemble the HTML, as in:

<a href="<txp:soo_image_url />" rel="shadowbox"><img src="<txp:soo_image_url />" width="220" alt="" /></a>

Code is topiary

Offline

Board footer

Powered by FluxBB