• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: What's the best way to add an image caption in CMSMS 2.+?
PostPosted: Fri Feb 17, 2017 9:44 pm 
Offline
Forum Members
Forum Members

Joined: Thu Aug 28, 2008 7:45 pm
Posts: 147
Location: Minneapolis, MN
How are people adding image captions -- or more accurately allow their clients to easily add image captions -- these days?

I don't see how it can be done easily in MicroTiny. In TinyMCE, there's a caption checkbox, but I've not been able to get this to behave when floating a photo to the right (either the photo doesn't float correctly, or the caption jumps away from the photo).

Is there some plugin, tag, module that everyone but me is using? Seems like a basic thing to have clients be able to do.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: What's the best way to add an image caption in CMSMS 2.+
PostPosted: Sat Feb 18, 2017 2:54 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7936
Location: Fernie British Columbia, Canada
tinymce (the underlying javascript editor) does not have good support for the figure/figcaption element.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: What's the best way to add an image caption in CMSMS 2.+
PostPosted: Sat Feb 18, 2017 11:12 pm 
Offline
Forum Members
Forum Members

Joined: Thu Aug 28, 2008 7:45 pm
Posts: 147
Location: Minneapolis, MN
Yes, I'm finding that out. I'm wondering what other designers using CMSMS are doing to allow their clients to add captions to photos placed on pages.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: What's the best way to add an image caption in CMSMS 2.+
PostPosted: Sun Feb 19, 2017 1:53 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Sat Apr 18, 2009 10:09 pm
Posts: 1420
Location: Maidenhead, UK
One option would be to use this sort of thing in your template:

Code:
<figure>
    <img src='image.jpg' alt='missing' />
    <figcaption>Caption goes here</figcaption>
</figure>

and use the content tags appropriately:

Code:
<figure>
    <img src='{content_image block='image1' urlonly='true'}' alt='' />
    <figcaption>{content block='caption' label='Image caption' wysiwyg='false'}</figcaption>
</figure>

and style with CSS, but the specifics depend on your requirements.

_________________
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: What's the best way to add an image caption in CMSMS 2.+
PostPosted: Tue Feb 21, 2017 9:26 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Dec 09, 2005 12:36 pm
Posts: 222
Location: Marlow, UK
It's not ideal, but in the past we've used javascript to pull out the title tag from an image and display it as a tooltip. I'm sure it wouldn't be too difficult to grab the title text and add it to a caption tag or div underneath an image. A couple of lines of jQuery and some fiddling with CSS.

A quick Google got me this snippet which should give you an idea
Use jQuery to display an image alt tag as a caption overlay


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting