Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • huypl Friend
    #383930

    Hi obliat,
    To make the image linkable in com_content&view=category do the following:
    1. Open templatesja_teline_ivhtmlcom_contentcategoryblog_item.php and find this line
    [PHP]<?php echo $this->item->text; ?> (line 125)[/PHP]
    then replace with
    [PHP]<?php echo ‘<a href=”‘.$this->item->readmore_link.'”>’. $this->item->text. ‘</a>’; ?>[/PHP]
    Now it’s not done, next you need to change the css.
    2. Open pluginssystemjat3base-themesdefaultcsstemplate.php
    Find these line
    [PHP].img_caption.left { margin-right: 10px; }[/PHP]
    And replace with these lines:
    [PHP].img_caption.left { margin-right: 10px; margin-top:0px; }
    .article-content a:link, a:visited, a:hover{ color:#000; text-decoration:none;}[/PHP]

    Remember to clear cache or disable cache in the template manager to see the result.

    Sherlock Friend
    #383937

    <em>@micflic 230677 wrote:</em><blockquote>Where do I have to change the code when I want to have the link on images in

    a) category
    and
    b) section

    ??? Thx</blockquote>

    Dear micflic,

    if you want have links on images of category,section.. just go to your articles content and adding the A href tag wrap around those images,you can link to any urls you want.

    obliat Friend
    #385316

    <em>@huypl 231042 wrote:</em><blockquote>Hi obliat,
    To make the image linkable in com_content&view=category do the following:
    1. Open templatesja_teline_ivhtmlcom_contentcategoryblog_item.php and find this line
    [PHP]<?php echo $this->item->text; ?> (line 125)[/PHP]
    then replace with
    [PHP]<?php echo ‘<a href=”‘.$this->item->readmore_link.'”>’. $this->item->text. ‘</a>’; ?>[/PHP]
    Now it’s not done, next you need to change the css.
    2. Open pluginssystemjat3base-themesdefaultcsstemplate.php
    Find these line
    [PHP].img_caption.left { margin-right: 10px; }[/PHP]
    And replace with these lines:
    [PHP].img_caption.left { margin-right: 10px; margin-top:0px; }
    .article-content a:link, a:visited, a:hover{ color:#000; text-decoration:none;}[/PHP]

    Remember to clear cache or disable cache in the template manager to see the result.</blockquote>

    Well this seems unrelated – I am talking about K2 – those changes didn’t produce linked images in my K2 frontpage blog.
    Still looking for solution.

    obliat Friend
    #385318

    Firebug shows my image is handled by ‘catItemIntroText’ class and I guess this is because K2 articles (they come this way with the demo) start with <img …. code – and this way image gets defined with the aforementioned class.

    But templates/ja_teline_iv/html/com_k2/templates/teline_iv_blog/category_item.php has ‘catItemImage’ which sets the iamge to be linked by

    <span class="catItemImage">
    <a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>">
    <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
    </a>

    So how do I set images to get defiend by ‘catItemImage’ instead of ‘catItemIntroText’ ?!?

    (Of course I can add <a href to every article, but it’s defined with the code so want to find a way and use it)


    1. k2-fp-linked-images
Viewing 4 posts - 16 through 19 (of 19 total)

This topic contains 19 replies, has 6 voices, and was last updated by  obliat 13 years, 7 months ago.

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