Article images caption

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Feb 05, 2014 11:41 pm
Reply with quote
Report this post
Hello,

We have upgraded our website from j2.5 to j3.2 .. everything went fine but we had one issue; the caption not showing under images in the articles.

Example:

http://www.kuwaitnews.com/world/intl/58 ... 5-17-45-18

Regards,

Bashar
User avatar
Junior Boarder

teitbite
Thu Feb 06, 2014 12:27 pm
Reply with quote
Report this post
Hi

I think captions are resolved differently in J3.2, please send me an access to joomla panel, I'll see if there is no some additional configuration needed.
User avatar
Moderator

GK User
Sat Feb 08, 2014 2:54 pm
Reply with quote
Report this post
Hi Teibite

I have PM you the login/pass

Regards;

Bashar
User avatar
Junior Boarder

teitbite
Mon Feb 10, 2014 8:10 pm
Reply with quote
Report this post
Hi

I do not see an option for such plugin or in the article settings, please try add this code to have a quick made caption plugin :) Add it to /layout/blocks/head.php

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
    $('.img-fulltext-none img.caption').each(function(){
        $(this).append('<h5>'+$(this).attr('title')+'</h5>');
    });
});})(jQuery)</script>


It's not tested, so if will not be working please send me an access to FTP.
User avatar
Moderator

GK User
Tue Feb 11, 2014 11:41 am
Reply with quote
Report this post
didn't work :(

Will send you the FTP details PM.

Regards;

Bashar
User avatar
Junior Boarder

teitbite
Wed Feb 12, 2014 8:47 pm
Reply with quote
Report this post
Hi

I've replaced my code with a different one for test and looks like all jQuery scripts are not working becuase of an error in bootstrap file. I think it's just a problem of a wrong jQuery version used. Please install easyJquery plugin and select jQuery 1.8 version, than set it to be first in the list of plugins. This should fix the problem and I'll be able to test my script.
User avatar
Moderator

GK User
Thu Feb 13, 2014 2:36 am
Reply with quote
Report this post
Hello;

jQuery installed as you requested.

Regards;

Bashar
User avatar
Junior Boarder

teitbite
Fri Feb 14, 2014 9:02 pm
Reply with quote
Report this post
Hi

Great :)

A small modification to my code and it works fine now.

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
    $('.img-fulltext-none img.caption').each(function(){
        $(this).parent().parent().find('div').append('<h5>'+$(this).attr('title')+'</h5>');
    });
});})(jQuery)</script>
User avatar
Moderator

GK User
Sat Feb 15, 2014 7:49 pm
Reply with quote
Report this post
hello

yes, the caption is working fine now .. thank you :)

but its not under the image only .. its every where in the page!

check the attached image. We have cleared the cache and its still the same.

Regards;

Bashar
User avatar
Junior Boarder

teitbite
Mon Feb 17, 2014 2:53 pm
Reply with quote
Report this post
Hi

Tell me exact URL to a page where this screen was made. Looks like the layer can be shown more than once.
User avatar
Moderator

GK User
Mon Feb 17, 2014 4:07 pm
Reply with quote
Report this post
hello

here is an example:

http://www.kuwaitnews.com/kuwait/locals ... 7-13-08-13


Regards;

Bashar
User avatar
Junior Boarder

GK User
Wed Feb 19, 2014 1:47 am
Reply with quote
Report this post
bump
User avatar
Junior Boarder

teitbite
Thu Feb 20, 2014 9:09 pm
Reply with quote
Report this post
Hi

I've changed the script to this:

Code: Select all
<script type="text/javascript">(function($) {$(document).ready(function() {
    $('.img-fulltext-none img.caption').each(function(){
        $(this).parent().parent().find('.img-fulltext-none').append('<h5>'+$(this).attr('title')+'</h5>');
    });
});})(jQuery)</script>


Looks to be ok right now. Sorry for the mistake.
User avatar
Moderator

GK User
Sat Feb 22, 2014 2:24 pm
Reply with quote
Report this post
Great!! thank you very much :)

PS: from where we can change the CSS for the caption to look like the default demo?

Regards;

Bashar
User avatar
Junior Boarder

teitbite
Tue Feb 25, 2014 8:40 pm
Reply with quote
Report this post
Hi

Just add new style to override.css file (override needs to be enabled in template settings) with a selector like:

Code: Select all
.img-fulltext-none h5 {}
User avatar
Moderator


cron