-
AuthorPosts
-
huypl Friend
huypl
- Join date:
- February 2011
- Posts:
- 162
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 20 times in 20 posts
March 30, 2011 at 3:42 am #383930Hi 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 FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
March 30, 2011 at 4:49 am #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 Friendobliat
- Join date:
- December 2010
- Posts:
- 416
- Downloads:
- 12
- Uploads:
- 64
- Thanks:
- 108
- Thanked:
- 31 times in 1 posts
April 7, 2011 at 8:06 pm #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 Friendobliat
- Join date:
- December 2010
- Posts:
- 416
- Downloads:
- 12
- Uploads:
- 64
- Thanks:
- 108
- Thanked:
- 31 times in 1 posts
April 7, 2011 at 8:32 pm #385318Firebug 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)
AuthorPostsThis 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