Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
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
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 theimg
tag in the form.
but why it (floating) then works in my first (nonlightbox) solution?
Offline
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
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