Viewing 15 posts - 1 through 15 (of 86 total)
  • Author
    Posts
  • ssinha Friend
    #204160

    Is there some way to make captions work in this template? I put caption in the caption field in the Joomla article backend but nothing ever shows up. Thanks for any help.

    Adam M Moderator
    #560921

    Hi @ssinha,

    Please open file root_foldertemplatesja_teline_vhtmlcom_contentarticledefault.php and root_foldertemplatesja_teline_vhtmllayoutsjoomlacontentintrodefault.php then look for this code :

    defined('JPATH_BASE') or die;

    and update as below :

    defined('JPATH_BASE') or die;
    JHtml::_('behavior.caption');

    Next, please open file root_folder/templates/ja_teline_v/css/custom.css (if you don’t have this file, just create a new one) then add this code :

    .img-intro-none,
    .img-intro-left,
    .img-intro-right,
    .img-fulltext-none,
    .img-fulltext-left,
    .img-fulltext-right,
    .img_caption {
    position: static;
    }
    .pull-left.item-image {
    position: relative;
    }
    .img_caption p.img_caption {
    bottom: 0;
    position: absolute;
    }

    ssinha Friend
    #561023

    Hey Adam. Thanks for the help. However, I don’t have

    defined(‘JPATH_BASE’) or die;

    line in my root_foldertemplatesja_teline_vhtmlcom_content articledefault.php file.

    My file has the following code:
    ————
    <?php
    /**
    * @package Joomla.Site
    * @subpackage com_content
    *
    * @copyright Copyright (C) 2005 – 2014 Open Source Matters, Inc. All rights reserved.
    * @license GNU General Public License version 2 or later; see LICENSE.txt
    */

    defined(‘_JEXEC’) or die;

    $params = $this->item->params;
    $urls = json_decode($this->item->urls);

    JHtml::addIncludePath(JPATH_COMPONENT . ‘/helpers’);
    JHtml::addIncludePath(T3_PATH . ‘/html/com_content’);
    JHtml::addIncludePath(dirname(dirname(__FILE__)));
    ?>

    <?php if (JFactory::getApplication()->input->get (‘tmpl’) == ‘component’): ?>

    <?php echo JATemplateHelper::render ($this->item, ‘joomla.content.item’, array(‘print’ => $this->print, ‘item’ => $this->item, ‘params’ => $this->params)) ?>

    <?php else: ?>

    <?php if (JATemplateHelper::countModules (‘article-top’)): ?>
    <div class=”item-row row-top”>
    <?php echo JATemplateHelper::renderModules(‘article-top’) ?>
    </div>
    <?php endif ?>

    <div class=”item-row row-main”>
    <div class=”article-main”>
    <?php echo JATemplateHelper::render ($this->item, ‘joomla.content.item’, array(‘print’ => $this->print, ‘item’ => $this->item, ‘params’ => $this->params)) ?>

    <?php if (isset($urls) && ((!empty($urls->urls_position) && ($urls->urls_position == ‘0’)) || ($params->get(‘urls_position’) == ‘0’ && empty($urls->urls_position))) || (empty($urls->urls_position) && (!$params->get(‘urls_position’)))): ?>
    <?php echo $this->loadTemplate(‘links’); ?>
    <?php endif; ?>
    </div>
    </div>

    <?php if (JATemplateHelper::countModules (‘article-bottom’)): ?>
    <div class=”item-row row-bottom”>
    <?php echo JATemplateHelper::renderModules(‘article-bottom’) ?>
    </div>
    <?php endif ?>

    <?php endif ?>
    ——————————–

    I did find that line in the root_foldertemplatesja_teline_vhtmllayoutsjoomlacontentintrodefault.php and I changed it as instructed by you. Also, I added the lines in the custom.css as advised by you but the captions are still not showing.

    Any other idea? Thanks.

    sitemistic4746 Developer
    #561025

    Any changes to php files should be done in the template /local folder, not in the original code. Otherwise, your changes will be overwritten when the template is updated.

    You can find the discussion about this here:

    http://www.t3-framework.org/documentation/new-features

    Scroll down to the “Isolate template settings and customization” section

    ssinha Friend
    #561027

    Thanks for the info Sitemistic. Didn’t know that. So far I had been editing the actual php files (after backing up the originals) to make changes. This helps a lot.

    Just so to know that I understand it properly, currently there is only one folder in the template/local folder called etc. If I wanted to change the code in let’s say template-name/tpls/blocks/footer.php file, I would go to the template-name/local and create a folder (and subfolders as needed) like template-name/local/tpls/blocks; copy the original footer.php file in this folder and change it as needed. Am I right?

    Now back to the caption problem in this thread. Any idea what I am doing wrong?

    Thanks again.

    sitemistic4746 Developer
    #561029

    Yeah. You don’t have to change the php file. Just add a few lines to you custom.css file as Adam posted. Here is my custom.css file. It has some other fixes in it you might want, including the captions fix:

    /* Makes Captions work on photos */

    .img-intro-none,
    .img-intro-left,
    .img-intro-right,
    .img-fulltext-none,
    .img-fulltext-left,
    .img-fulltext-right,
    .img_caption {
    position: static;
    }
    .img_caption p.img_caption {
    bottom: 0;
    position: absolute;
    }

    /* Changes Intro Image size to 800x532px */

    .article-intro-media .item-image {
    max-height: 532px;
    overflow: hidden }

    /* Removes category names in JACM modules */

    .link-item .article-aside .category-name {
    display: none;
    }

    /* Removes other category names in JACM modules */

    .magazine-item-media .category-name {
    display: none;
    }

    /*Removes captions from thumbnails in Mega-Menu*/

    .t3-megamenu .mega-col-module .mega-inner .img_caption p.img_caption {
    display: none;
    }

    /* Removes captions from thumbnails everywhere else */

    .magazine-item .img_caption p.img_caption {
    display: none;
    }

    /* Removes double intro-text problem

    .article-full.has-article-tools blockquote.article-intro {
    display: none;
    } */

    /* Makes Thumbnails on Front Page taller – org. 48px */

    .link-item .item-image {
    float: none !important;
    margin: 0 !important;
    max-height: 80px;
    overflow: hidden;

    ssinha Friend
    #561030

    This is wonderful Sitemistic. Very nice. Great job. There are several things in this customization that I can use. Will post the results here.

    ssinha Friend
    #561032

    Sitemistic, I am still unable to get captions to work. I tried both ways – the one suggested by Adam (except I couldn’t fully implement it as my htmlcom_content articledefault.php file was not the same as in Adam’s example), and also the one you suggested. Don’t know what I am doing wrong.

    Just to be clear, I have an image in the Intro Image in the article backend. No image in the Full Article Image. In the Intro image, I have added a caption in the caption field.

    Am I doing something wrong?

    Thanks a heap for your help.

    sitemistic4746 Developer
    #561076

    I didn’t have to change the .php file at all.

    Is your site online? What’s the URL?

    ssinha Friend
    #561085

    Thanks Sitemistic but I haven’t made any change in any php file. Just added the code you provided in the custom.css. Unfortunately, the site is on localhost so can’t provide you the url. If you don’t mind, can you please post a screenshot of an image with caption on your site? I just want to see where it appears.

    Also, how about captions in image within articles? I used to be able to control them through JCE editor but now they don’t appear in TelineV. Not sure if it’s a template issue or Joomla 3 issue.

    sitemistic4746 Developer
    #561088

    O.K. Here’s a screen shot. Also, for images to work in the various areas of the site, the photo must be in the Intro text. For some reason, the developers ignored the way every other module of this type works and it can’t pick them up from the article itself.


    1. caption_example
    ssinha Friend
    #561093

    Wow! That’s perfect.

    I have all the images in the intro text. I have tried to put caption in Alt text. Didn’t work. Put it in Caption field, still no luck, put in both alt text and caption together – still a no go.

    I even installed a new demo version of the template for test purpose and applied your fix for caption and that did not work either.

    Perhaps it’s time to forget this issue until we put the site online for you or someone else to check it.

    Also, it’s a shame that no caption could be added to the images within the articles.

    Thanks for your help, Sitemistic. You have been very helpful and I learnt quite a bit from you.

    lovedigit Friend
    #561098

    <em>@ssinha 460896 wrote:</em><blockquote>Wow! That’s perfect.

    I have all the images in the intro text. I have tried to put caption in Alt text. Didn’t work. Put it in Caption field, still no luck, put in both alt text and caption together – still a no go.

    I even installed a new demo version of the template for test purpose and applied your fix for caption and that did not work either.

    Perhaps it’s time to forget this issue until we put the site online for you or someone else to check it.

    Also, it’s a shame that no caption could be added to the images within the articles.

    Thanks for your help, Sitemistic. You have been very helpful and I learnt quite a bit from you.</blockquote>

    Did you try clearing cache in the browser after applying changes in custom.css?

    sitemistic4746 Developer
    #561099

    Take a look at something for me. Go to:

    templates/ja_teline_v/html/com_content/category/blog.php

    and see if it has the following lines in it:

    defined(‘_JEXEC’) or die;

    JHtml::addIncludePath(JPATH_COMPONENT.’/helpers’);
    JHtml::addIncludePath(T3_PATH.’/html/com_content’);
    JHtml::addIncludePath(dirname(dirname(__FILE__)));
    JHtml::_(‘behavior.caption’);

    ssinha Friend
    #561100

    Yes Lovedigit, I have tried that but still can’t see the caption. Thanks.

Viewing 15 posts - 1 through 15 (of 86 total)

This topic contains 86 replies, has 6 voices, and was last updated by  willer 8 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum