-
AuthorPosts
-
mikel2004 Friend
mikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
February 17, 2014 at 8:54 pm #194886Hi!
How can I do to convert the images articles intro to a link?
ThanksSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 18, 2014 at 9:34 am #523176Hi 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 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
February 18, 2014 at 2:23 pm #523237I 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-2007Do you understand what I mean?
Thanks!
timtecsa Friendtimtecsa
- Join date:
- October 2009
- Posts:
- 1382
- Downloads:
- 86
- Uploads:
- 327
- Thanks:
- 197
- Thanked:
- 132 times in 34 posts
February 18, 2014 at 2:27 pm #523238Hi 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 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
February 18, 2014 at 4:01 pm #523255It 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?
February 19, 2014 at 7:48 am #523355I 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 Friendtimtecsa
- Join date:
- October 2009
- Posts:
- 1382
- Downloads:
- 86
- Uploads:
- 327
- Thanks:
- 197
- Thanked:
- 132 times in 34 posts
February 19, 2014 at 10:37 am #523405Here is a good example: http://thebrowser.com/ This site runs on WordPress.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 19, 2014 at 10:57 am #523408I 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 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
February 19, 2014 at 2:38 pm #523434I 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 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
February 24, 2014 at 1:13 pm #524111I 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 24, 2014 at 3:30 pm #524143I’m looking at this case, give me more time, I will detect the code and be back to you soon.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
February 25, 2014 at 8:56 am #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.
1 user says Thank You to Ninja Lead for this useful post
mikel2004 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
February 26, 2014 at 7:12 pm #524505I 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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
February 27, 2014 at 6:26 am #524576The 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 Friendmikel2004
- Join date:
- January 2012
- Posts:
- 201
- Downloads:
- 0
- Uploads:
- 51
- Thanks:
- 24
- Thanked:
- 3 times in 1 posts
February 27, 2014 at 9:55 pm #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
-
AuthorPosts
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