-
AuthorPosts
-
abdullah canipek Friend
abdullah canipek
- Join date:
- November 2014
- Posts:
- 133
- Downloads:
- 32
- Uploads:
- 22
- Thanks:
- 52
- Thanked:
- 1 times in 1 posts
May 26, 2015 at 1:22 am #206627How can i clickable departments module images ? open this articeles only title or read more button but this is unpractical users try to click images. :-*
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 26, 2015 at 5:42 pm #571804By default it does not support that but you can customize it with my solution below
Open templates/ja_medicare/html/mod_articles_category/five-columns.php file
find and change
<div class="article-img">
<?php
//Get images
$images = "";
if (isset($item->images)) {
$images = json_decode($item->images);
}
$imgexists = (isset($images->image_intro) and !empty($images->image_intro)) || (isset($images->image_fulltext) and !empty($images->image_fulltext));if ($imgexists) {
$images->image_intro = $images->image_intro?$images->image_intro:$images->image_fulltext;
$images->image_intro_caption = $images->image_intro_caption?$images->image_intro_caption:$images->image_fulltext_caption;
$images->image_intro_alt = $images->image_intro_alt?$images->image_intro_alt:$images->image_fulltext_alt;
?>
<div class="img-intro">
<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{ ?>
<img src="<?php echo JURI::root(true);?>/images/joomlart/demo/default.jpg" alt="Default Image"/>
<?php } ?>
</div>to
<div class="article-img">
<?php
//Get images
$images = "";
if (isset($item->images)) {
$images = json_decode($item->images);
}
$imgexists = (isset($images->image_intro) and !empty($images->image_intro)) || (isset($images->image_fulltext) and !empty($images->image_fulltext));if ($imgexists) {
$images->image_intro = $images->image_intro?$images->image_intro:$images->image_fulltext;
$images->image_intro_caption = $images->image_intro_caption?$images->image_intro_caption:$images->image_fulltext_caption;
$images->image_intro_alt = $images->image_intro_alt?$images->image_intro_alt:$images->image_fulltext_alt;
?>
<div class="img-intro">
<a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>">
<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 }else{ ?>
<a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"><img src="<?php echo JURI::root(true);?>/images/joomlart/demo/default.jpg" alt="Default Image"/></a>
<?php } ?>
</div>1 user says Thank You to Ninja Lead for this useful post
abdullah canipek Friendabdullah canipek
- Join date:
- November 2014
- Posts:
- 133
- Downloads:
- 32
- Uploads:
- 22
- Thanks:
- 52
- Thanked:
- 1 times in 1 posts
May 28, 2015 at 6:16 am #572127Thank you Ninja Lead,
i changed this code but still images are not clickable 🙁Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 28, 2015 at 11:57 am #572142<em>@asccanipek 475432 wrote:</em><blockquote>Thank you Ninja Lead,
i changed this code but still images are not clickable :(</blockquote>You can pm me URL of your site and admin login. I will help you to do this directly on your site.
1 user says Thank You to Ninja Lead for this useful post
abdullah canipek Friendabdullah canipek
- Join date:
- November 2014
- Posts:
- 133
- Downloads:
- 32
- Uploads:
- 22
- Thanks:
- 52
- Thanked:
- 1 times in 1 posts
May 30, 2015 at 6:15 am #572387i have sent p.m.
My Best.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 3, 2015 at 2:52 pm #572746<em>@asccanipek 475772 wrote:</em><blockquote>i have sent p.m.
My Best.</blockquote>
I fixed the problem directly on your site and you can see my solution in red color below
Open templates/ja_medicare/html/layouts/joomla/content/intro_image.php file
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/defined('_JEXEC') or die;
$params = $displayData->params;
if (empty ($displayData->catslug)) {
$displayData->catslug = $displayData->category_alias ? ($displayData->catid.':'.$displayData->category_alias) : $displayData->catid;
}
$url = JRoute::_(ContentHelperRoute::getArticleRoute($displayData->slug, $displayData->catslug));?>
<?php $images = json_decode($displayData->images); ?>
<?php if (isset($images->image_intro) && !empty($images->image_intro)) : ?>
<?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?><div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image"> <a href="<?php echo $url ?>" itemprop="url" title="<?php echo htmlentities($displayData->title); ?>"> <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); ?>" itemprop="thumbnailUrl"/></a> </div>
<?php endif; ?>
1 user says Thank You to Ninja Lead for this useful post
-
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by Ninja Lead 9 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum