Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-05-17 17:49:05

Gulfcoast
Member
Registered: 2009-04-12
Posts: 76

Re: yab_image (display floating image+caption/subtitles)

Forgive my ignorance here. I’m trying to understand where the placement of the <span class> goes. I’m currently using it as such:
<span class=“img-caption-center”><txp:yab_image id=“34” /></span>
I’m trying to center the caption under the image. Will the span class perform that? Thank you very much.

Offline

#14 2009-05-18 08:35:17

trenc
Plugin Author
From: Amsterdam
Registered: 2008-02-27
Posts: 571
Website GitHub

Re: yab_image (display floating image+caption/subtitles)

Hi Gulfcoast,

Forgive my ignorance here.

it doesn’t matter, you’re welcome. :)

I’m currently using it as such:
<span class=“img-caption-center”><txp:yab_image id=“34” /></span>
I’m trying to center the caption under the image. Will the span class perform that?

You don’t need to place the span manually. The <span class="img-caption-{left|center|right}"> will automagically appear if you use the plugin with an align attribute as the following:

<txp:yab_image id="34" align="center" />

In your example without the align attribute the span will not generated. But the this span is not needed for centering the caption.

In your example (<txp:yab_image id="34" />) you only need an additional CSS statement to center the caption:

small.caption {
  text-align: center
}

Last edited by trenc (2009-05-18 08:36:53)

Offline

#15 2009-05-18 12:01:31

Gulfcoast
Member
Registered: 2009-04-12
Posts: 76

Re: yab_image (display floating image+caption/subtitles)

Thank you very much Trenc.

Offline

#16 2009-10-20 11:38:55

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

Re: yab_image (display floating image+caption/subtitles)

Niconemo wrote:

;-) But, for those who use upm_image (and upm_img_popper) you can do that this way for a long time in the Custom form (it’s an example)…

<div class="img-with-caption" style="width <txp:upm_img_full_width />px" > <img src="<txp:upm_img_full_url />" alt="<txp:upm_img_alt />" /> <br /><span class="img-caption"> <txp:upm_img_caption /></span> </div>

could anybody make me this chapter and verse. i’m using upm_image and upm_image_popper but i can’t do it. where to put this code, how to use custom form for that?

Offline

#17 2009-10-20 13:35:16

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: yab_image (display floating image+caption/subtitles)

Gallex wrote:

could anybody make me this chapter and verse. i’m using upm_image and upm_image_popper but i can’t do it. where to put this code, how to use custom form for that?

Answer: the documentation of upm_image. It clearly states that both, upm_image and upm_article_image have form attribute and both can also be used as containers. The code goes into your article context page.

Offline

#18 2010-09-24 13:21:34

trenc
Plugin Author
From: Amsterdam
Registered: 2008-02-27
Posts: 571
Website GitHub

Re: yab_image (display floating image+caption/subtitles)

New version 0.4:

  • can now handle hyperlinks in captions (Read plugin help, please!)
  • added: alt_alt attribute for alternative img alt attribute
  • added: alt_title attribute for alternative img title attribute
  • added: alt_as_title attribute for alternative img title attribute

Last edited by trenc (2010-09-24 13:22:11)

Offline

#19 2017-02-10 15:17:01

trenc
Plugin Author
From: Amsterdam
Registered: 2008-02-27
Posts: 571
Website GitHub

Re: yab_image (display floating image+caption/subtitles)

yab_image_v0.5.txt is now TXP 4.6-ready.

Offline

Board footer

Powered by FluxBB