Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-07-04 10:17:43

Gallex
Member
Registered: 2006-10-08
Posts: 1,303

floating images with lightbox effect

i’m using upm_image plugin for adding images to my content.

code (class=“left”/class=“right” is for floating images left or right):

<txp:upm_image type="popup" image_id="37" class="right" />

and all is working fine.

now, i would like to add lightbox effect for images.

did this:

<txp:upm_image type="popup" image_id="37" class="right" form="lightbox_single" />

form:

<a href="<txp:upm_img_full_url />" rel="lightbox" title="<txp:upm_img_caption />">
 <img src="<txp:upm_img_thumb_url />" alt="<txp:upm_img_alt />" width="<txp:upm_img_thumb_width />" height="<txp:upm_img_thumb_height />" />
</a>

and all is working well as well except floating – it doesn’t float images anymore.
any ideas how can i get images to float again?

Offline

#2 2010-07-04 11:47:02

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,052
Website GitHub Mastodon Twitter

Re: floating images with lightbox effect

did you try this?

<a href="<txp:upm_img_full_url />" rel="lightbox" title="<txp:upm_img_caption />">
 <img src="<txp:upm_img_thumb_url />" alt="<txp:upm_img_alt />" width="<txp:upm_img_thumb_width />" height="<txp:upm_img_thumb_height />" class="right" />
</a>

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2010-07-04 11:48:17

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

Re: floating images with lightbox effect

I’m not really familiar with upm_image, but I would say you need to move the class="right" to the img tag in the form.


Code is topiary

Offline

#4 2010-07-04 12:23:55

Gallex
Member
Registered: 2006-10-08
Posts: 1,303

Re: floating images with lightbox effect

jsoo wrote:

I’m not really familiar with upm_image, but I would say you need to move the class="right" to the img tag in the form.

but why it (floating) then works in my first (nonlightbox) solution?

Offline

#5 2010-07-04 12:45:17

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

Re: floating images with lightbox effect

Because in the first case (no lightbox) the upm_image tag is creating the output, and adds the class to the img tag. In the second case, the output comes from the form, where you are constructing the img tag by bits and pieces, and you have to add the class yourself.

Users of soo_image have a much simpler syntax for this case :)


Code is topiary

Offline

#6 2010-07-04 12:54:01

Gallex
Member
Registered: 2006-10-08
Posts: 1,303

Re: floating images with lightbox effect

jsoo wrote:

Users of soo_image have a much simpler syntax for this case :)

what kind of?

Offline

#7 2010-07-04 13:51:49

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

Re: floating images with lightbox effect

Since you asked :)

<txp:soo_image id="37" class="right" link_rel="lightbox" />

gets you the same output.

Well, almost; I never got around to getting soo_image to add in the thumbnail height and width, but will correct that shortly.


Code is topiary

Offline

#8 2010-07-05 09:26:51

Gallex
Member
Registered: 2006-10-08
Posts: 1,303

Re: floating images with lightbox effect

looks promising indeed…
and i think i will replace lightbox to slimbox2 or even shadowbox

Offline

Board footer

Powered by FluxBB