Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • mikel2004 Friend
    #194886

    Hi!
    How can I do to convert the images articles intro to a link?
    Thanks

    Saguaros Moderator
    #523176

    Hi Mikel,

    May I know images in which you want to link? You can post your site’s URL here and illustrate screenshot so that I can assist further.

    Best

    mikel2004 Friend
    #523237

    I wish to convert article’s full image -that I upload into “Intro image box of Images and Links” tab-, to image link, with the article url, like article´s title have.
    http://veintiuno.czoom.co/cine/secciones/contemporaneo/214-mundial/3620-exhibit-a-dom-roth-2007

    Do you understand what I mean?

    Thanks!

    timtecsa Friend
    #523238

    Hi Saguaros,

    I hesitated to add this feature to my suggestion list for Teline V but it would be nice to have an option in modules to click on thumb image as well as the article title in order to navigate to the article. Low priority for me:-)

    mikel2004 Friend
    #523255

    It may also be useful in the category blog view in order to navigate to the article.

    Can we use a CSS code? How they are linked to in the titles?

    malibu63 Friend
    #523355

    I would also like this feature … I see many websites that have blogs with Intro images that link to the document!

    I tried to add an image to the document, then add a link … not very successful, and definitely not preferred method 🙂

    timtecsa Friend
    #523405

    Here is a good example: http://thebrowser.com/ This site runs on WordPress.

    Saguaros Moderator
    #523408

    I understand your point, however the images in blog view are generated with JA Thumbnail plugin so it’s a little bit complicated. I will pass this to team for further checking on this.

    In case that you don’t use JA Thumbnail plugin, you can add link to image by opening this file: templatesja_teline_ivhtmlcom_contentcategoryblog_item.php

    Look for this snippet of code:


    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
    <div class="img-intro-<?php echo htmlspecialchars($imgfloat); ?>">
    <img
    <?php if ($images->image_intro_caption):
    echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
    endif; ?>
    src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
    </div>
    <?php endif; ?>

    change it to:


    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
    <div class="img-intro-<?php echo htmlspecialchars($imgfloat); ?>">
    <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>">
    <img
    <?php if ($images->image_intro_caption):
    echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
    endif; ?>
    src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/></a>
    </div>
    <?php endif; ?>

    mikel2004 Friend
    #523434

    I use Ja Teline IV T3, What should I change?

    I found this code in /templates/ja_teline_iv_t3/html/com_content/category/blog_item.php

    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get(‘float_intro’) : $images->float_intro; ?>
    <div class=”pull-<?php echo htmlspecialchars($imgfloat); ?>”> <img
    <?php if ($images->image_intro_caption):
    echo ‘class=”caption”‘.’ title=”‘ .htmlspecialchars($images->image_intro_caption) .'”‘;
    endif; ?>
    src=”<?php echo htmlspecialchars($images->image_intro); ?>” alt=”<?php echo htmlspecialchars($images->image_intro_alt); ?>”/> </div>
    <?php else:
    $regex = “/<img[^>]*>/”;
    $image = ”;
    if (preg_match_all($regex,$this->item->introtext, $matches)) {
    $this->item->introtext = preg_replace ($regex, ”, $this->item->introtext);
    $image = implode (“n”, $matches[0]);
    }
    ?>
    <?php if ($image): ?>
    <div class=”pull-“><?php echo $image ?></div>
    <?php endif; ?>

    <?php endif; ?>

    So, can you tell me the new code for this?
    Thanks!

    mikel2004 Friend
    #524111

    I don’t use JA Thumbnail plugin, but I use Ja Teline IV T3, so the code are different… can you tell me what can I must change?

    <em>@Saguaros 412186 wrote:</em><blockquote>I understand your point, however the images in blog view are generated with JA Thumbnail plugin so it’s a little bit complicated. I will pass this to team for further checking on this.

    In case that you don’t use JA Thumbnail plugin, you can add link to image by opening this file: templatesja_teline_ivhtmlcom_contentcategoryblog_item.php

    Look for this snippet of code:


    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
    <div class="img-intro-<?php echo htmlspecialchars($imgfloat); ?>">
    <img
    <?php if ($images->image_intro_caption):
    echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
    endif; ?>
    src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
    </div>
    <?php endif; ?>

    change it to:


    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
    <div class="img-intro-<?php echo htmlspecialchars($imgfloat); ?>">
    <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>">
    <img
    <?php if ($images->image_intro_caption):
    echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
    endif; ?>
    src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/></a>
    </div>
    <?php endif; ?>

    </blockquote>

    Saguaros Moderator
    #524143

    I’m looking at this case, give me more time, I will detect the code and be back to you soon.

    Ninja Lead Moderator
    #524250

    <em>@mikel2004 412221 wrote:</em><blockquote>I use Ja Teline IV T3, What should I change?

    I found this code in the /templates/ja_teline_iv_t3/html/com_content/category/blog_item.php:

    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get(‘float_intro’) : $images->float_intro; ?>
    <div class=”pull-<?php echo htmlspecialchars($imgfloat); ?>”> <img
    <?php if ($images->image_intro_caption):
    echo ‘class=”caption”‘.’ title=”‘ .htmlspecialchars($images->image_intro_caption) .'”‘;
    endif; ?>
    src=”<?php echo htmlspecialchars($images->image_intro); ?>” alt=”<?php echo htmlspecialchars($images->image_intro_alt); ?>”/> </div>
    <?php else:
    $regex = “/<img[^>]*>/”;
    $image = ”;
    if (preg_match_all($regex,$this->item->introtext, $matches)) {
    $this->item->introtext = preg_replace ($regex, ”, $this->item->introtext);
    $image = implode (“n”, $matches[0]);
    }
    ?>
    <?php if ($image): ?>
    <div class=”pull-“><?php echo $image ?></div>
    <?php endif; ?>

    <?php endif; ?>

    So, can you tell me the new code for this?
    Thanks!</blockquote>

    @mikel2004: You can add link into image with solution below:


    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
    <div class="pull-<?php echo htmlspecialchars($imgfloat); ?>"> <img
    <?php if ($images->image_intro_caption):
    echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
    endif; ?>
    src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/> </div>
    <?php else:
    $regex = "/<img[^>]*>/";
    $image = '';
    if (preg_match_all($regex,$this->item->introtext, $matches)) {
    $this->item->introtext = preg_replace ($regex, '', $this->item->introtext);
    $image = implode ("n", $matches[0]);
    }
    ?>
    <?php if ($image): ?>
    <div class="pull-"><a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>"><?php echo $image ?></a></div>
    <?php endif; ?>

    <?php endif; ?>

    @timtecsa: Your site uses JA Thumbnail plugin in content, you can see details in the templates/ja_teline_iv_t3/html/com_content/category/blog_item.php file

    Change


    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
    <div class="pull-<?php echo htmlspecialchars($imgfloat); ?>"> <img
    <?php if ($images->image_intro_caption):
    echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
    endif; ?>
    src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/> </div>
    <?php endif; ?>

    To


    <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>">
    <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
    <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
    <div class="pull-<?php echo htmlspecialchars($imgfloat); ?>"> <img
    <?php if ($images->image_intro_caption):
    echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"';
    endif; ?>
    src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/> </div>
    <?php else:
    $regex = "/<img[^>]*>/";
    $image = '';
    if (preg_match_all($regex,$this->item->introtext, $matches)) {
    $this->item->introtext = preg_replace ($regex, '', $this->item->introtext);
    $image = implode ("n", $matches[0]);
    }
    ?>
    <?php if ($image): ?>
    <div class="pull-"><?php echo $image ?></div>
    <?php endif; ?>

    <?php endif; ?>
    </a>

    Let me know if it helps.

    mikel2004 Friend
    #524505

    I put your code in the /templates/ja_teline_iv_t3/html/com_content/category/blog_item.php file

    But not works 🙁

    Any help?

    Thanks

    Ninja Lead Moderator
    #524576

    The problem you mentioned comes from details article, not category blog. I have fixed it directly on your site. Here is my solution:

    Open the templates/ja_teline_iv_t3/html/com_content/article/default.php file

    Change

    <div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image">
    <img
    <?php if ($images->image_fulltext_caption): ?>
    <?php echo 'class="caption"'.' title="' .htmlspecialchars($images->image_fulltext_caption) .'"'; ?>
    <?php endif; ?>
    src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>"/>
    </div>

    To

    <div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image">
    <a href="<?php echo $this->item->readmore_link; ?>"><img
    <?php if ($images->image_fulltext_caption): ?>
    <?php echo 'class="caption"'.' title="' .htmlspecialchars($images->image_fulltext_caption) .'"'; ?>
    <?php endif; ?>
    src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>"/></a>
    </div>

    Please check your site again: http://veintiuno.czoom.co/cine/secciones/contemporaneo/214-mundial/3620-exhibit-a-dom-roth-2007. Let me know if it helps.

    mikel2004 Friend
    #524673

    <em>@Ninja Lead 413677 wrote:</em><blockquote>The problem you mentioned comes from details article, not category blog. </blockquote>

    Well, sorry, I meant just that… I wanted to have the image link in category blog.
    So… sorry again, can you make your solution works to category blogs too?
    Your code works perfect to articles.

    So, thanks a lot

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

This topic contains 15 replies, has 5 voices, and was last updated by  mikel2004 10 years, 8 months ago.

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