Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • amedien Friend
    #195721

    Hello!

    I just managed to link the images in the newspro-modul on the frontpage on our website http://www.prost-magazin.at.
    But if i go to a category, like this one the images are still not linked.

    Can anyone point me out where to change that? Please 🙂 I cant find it..

    Thank you!

    Pankaj Sharma Moderator
    #526631

    @amedien
    Please PM me the URL, Admin credential of your site, I will have a closer look.

    timtecsa Friend
    Pankaj Sharma Moderator
    #526676

    Glad you solved it 🙂
    If you any problem you can post Here.

    Nazario A Friend
    #526697

    @amedien,

    By default, when you go to a category, it will show the article in this category, not in the News Pro module. This image was loaded from the article. If you want to click the image, it will go to the article that you can add the <a> tag in the article.

    Add the code in red red as follows:
    <blockquote><div><a href=”index.php/sport/sport-news/football/120-834956731″><img class=”caption” src=”images/stories/demo/sport/football-7.jpg” border=”0″ alt=”Sample image” title=”Sample image” align=”left” /></a></div></blockquote>

    Hope this helps.


    1. teline1
    amedien Friend
    #526730

    Nazario, you are right, if i link the image in the article, it also links the image in the category.
    But that would be a lot of work to do that manually for every article…
    Does anyone have an idea how to integrate that automatically?

    Thanks timtecsa and pankajsharma21 – i tried the suggestions in the other thread, but nothing changed..

    Nazario A Friend
    Pankaj Sharma Moderator
    #527014

    @amedien I have fixed it directly on your site.
    in templatesja_teline_iv_t3htmlcom_contentcatego ryblog_item.php
    I replaced this code [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 endif; ?>[/PHP]
    Into
    [PHP]<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>[/PHP]

    amedien Friend
    #527103

    superb! thank you so much pankajsharma21 – works like a charm! :):):)

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

This topic contains 9 replies, has 4 voices, and was last updated by  amedien 10 years, 1 month ago.

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