-
AuthorPosts
-
February 19, 2010 at 12:23 pm #148823
I am trying to make the main ja-slideshow image a link to the corresponding article (where the image is picked up from).
The ja-slideshow module is set to pick up articles ‘from categories’ as the article source (module setting). Everything is working as expected. However, I would like to make this image a link back to the article.
I have tried to edit to the ‘default_articles.php’ by editing the line (line 11);
<?php echo $helper->renderImage ($item->title, $item->mainImage, $params, $mainWidth, $mainHeight );?>
and trying to to put the ‘< a href> around this code as below.
e.g. <a href=”<?php echo $item->link;?>”><?php echo $helper->renderImage ($item->title, $item->mainImage, $params, $mainWidth, $mainHeight );?></a>The image does not appear as a link. When I view the code in the ‘view source’ from the browser, the code seems to be okay but the image is still not a link. I am not sure why this is the case.
I would appreciate any ideas or help.
The site for reference is: http://www.iplatinumgroup.com/index.php
Thanks.
jamjodesign Friendjamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
February 19, 2010 at 1:19 pm #333146I posed the exact same question a few days ago and nothing in response yet. I too, would love to know how this is done – it seems a very basic requirement of any slideshow to be honest so I cannot see why it is not in the parameters – I am stuck on this now for days!! :-[
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 19, 2010 at 2:53 pm #333153Hello guys
This is a bug , i fixed it .
But In this time, the module does not update for the download package. this task ‘ll complete in the next week.
Please use the following source codes to replace the content of the default_articles.php file:
[PHP]
<div class=”ja-slidewrap<?php echo $params->get(‘moduleclass_sfx’);?> ja-<?php echo $source;?>” id=”ja-slide-articles-<?php echo $module->id;?>” style=”visibility:hidden”>
<div class=”ja-slide-main-wrap<?php echo ($navAlignment == ‘vertical_left’ ? ‘ ja-slide-right’ : ” )?>”>
<div class=”ja-slide-mask”>
</div>
<div class=”ja-slide-main”>
<?php foreach( $list as $k => $item ) :
// parse image in the article’s content.$helper->parseImages( $item, $params );
$list[$k] = $item;
?>
<div class=”ja-slide-item”>
<?php echo $helper->renderImage ($item->title, $item->mainImage, $params, $mainWidth, $mainHeight );?>
<?php if ( $showdescwhen == ‘always’ ):?>
<div class=”ja-slide-desc”>
<a <?php echo $target; ?> href=”<?php echo $item->link; ?>”>
<span><?php echo $helper->trimString( $item->title, $titleMaxChars );?></span>
</a>
<p><?php echo $helper->trimString( strip_tags($item->introtext), $descMaxChars ); ?></p>
<?php if ($showDescription==’desc-readmore’): ?>
<a <?php echo $target; ?> class=”readon readmore” href=”<?php echo $item->link; ?>”>
<?php echo $readmoretext;?>
</a><?php endif; ?></div>
<?php endif; ?>
</div>
<?php endforeach;?>
</div><?php if ( $animation==’move’ && $container ) :?>
<div class=”but_prev ja-slide-prev”></div>
<div class=”but_next ja-slide-next”></div>
<?php endif; ?><!– JA SLIDESHOW 3 MARK –>
<div class=”maskDesc”>
<div class=”inner”></div>
</div>
</div>
<!– END JA SLIDESHOW 3 MARK –>
<?php if( $showDescription && $showdescwhen != ‘always’ ) : ?>
<div class=”ja-slide-descs”>
<?php foreach( $list as $item ) : ?>
<div class=”ja-slide-desc”>
<a <?php echo $target; ?> href=”<?php echo $item->link; ?>”>
<span><?php echo $helper->trimString( $item->title, $titleMaxChars );?></span>
</a>
<p><?php echo $helper->trimString( strip_tags($item->introtext), $descMaxChars ); ?></p>
<?php if ($showDescription==’desc-readmore’): ?>
<a <?php echo $target; ?> class=”readon readmore” href=”<?php echo $item->link; ?>”>
<?php echo $readmoretext;?>
</a><?php endif; ?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?><!– JA SLIDESHOW 3 NAVIAGATION –>
<?php if ( $navigation ): ?>
<div class=”ja-slide-thumbs-wrap<?php echo $classNav;?>”>
<div class=”ja-slide-thumbs”>
<?php foreach( $list as $key => $item ) : ?>
<div class=”ja-slide-thumb”>
<?php if ($navigation==’thumbs’){?>
<div class=”ja-slide-thumb-inner”>
<?php if( $navShowthumb ) : ?>
<?php echo $helper->renderImage ( $item->title, $item->thumbnail, $params,
$thumbWidth, $thumbHeight, ‘align=”left”‘ ); ?>
<?php endif; ?>
<h3><?php echo $helper->trimString( $item->title, $titleMaxChars );?></h3>
<?php if( $navShowDate ) : ?>
<span class=”ja-createdate clearfix”>
<?php echo JTEXT::_(“POSTED DATE”). ” “. JHTML::_(‘date’, $item->date, JText::_(‘DATE_FORMAT_LC4’)); ?>
</span>
<?php endif; ?>
<?php if( $navShowdesc ): ?>
<?php echo $helper->trimString( strip_tags($item->introtext), $navDescmaxlength ); ?>
<?php endif; ?>
</div>
<?php }else{?><span><?php echo ($key+1);?></span><?php } ?>
</div>
<?php endforeach; ?>
</div><div class=”ja-slide-thumbs-mask” style=” display:none “>
<div class=”ja-slide-thumbs-mask-left”> </div>
<div class=”ja-slide-thumbs-mask-center”> </div>
<div class=”ja-slide-thumbs-mask-right”> </div>
</div><p class=”ja-slide-thumbs-handles”>
<?php foreach( $list as $item ) : ?>
<span> </span>
<?php endforeach; ?>
</p>
<!– JA SLIDESHOW 3 NAVIAGATION –></div>
<?php endif; ?>
<!– JA SLIDESHOW 3 BUTTONS CONTROL –>
<?php if ($control): ?>
<div class=”ja-slide-buttons clearfix”>
<span class=”ja-slide-prev”>« <?php echo JText::_(‘PREVIOUS’);?></span>
<span class=”ja-slide-playback”>‹ <?php echo JText::_(‘PLAYBACK’);?></span>
<span class=”ja-slide-stop”><?php echo JText::_(‘STOP’);?></span>
<span class=”ja-slide-play”><?php echo JText::_(‘PLAY’);?> ›</span>
<span class=”ja-slide-next”><?php echo JText::_(‘NEXT’);?> »</span>
</div>
<?php endif; ?></div>
[/PHP]
1 user says Thank You to Saguaros for this useful post
jamjodesign Friendjamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
February 19, 2010 at 3:01 pm #333155Tried this just now and still does not make the image linkable to the article?
February 19, 2010 at 5:15 pm #333165Many thanks for your prompt response and help.
I’ve tried this code with the modification for making the pictures a link and unfortunately it still does not work. The browser source code shows the following line (for a slideshow item):
<div class=”ja-slide-main”>
<div class=”ja-slide-item”>
<a href=”/index.php?option=com_content&view=article&id=87:ip-consultants&catid=39:activities&Itemid=93″> <img src=”http://www.iplatinumgroup.com/images/resized/images/stories/iPConsultants_510_300.jpg” alt=”iP Consultants” title=”iP Consultants” /> </a>
</div>I can’t understand why this won’t show as a link when the code clearly tells the image to link to the article. Is it some java script or css override possibly (as I am not very competent with js or css)?
The site is http://www.iplatinumgroup.com/index.php for reference.Would you have any other suggestions?
Many thanks.February 20, 2010 at 10:13 pm #333252Hi tienhc,
Many Thanks for fixing it ..
February 21, 2010 at 10:22 am #333273” Hi tienhc,
Many Thanks for fixing it .. ”Hi ‘Sasikumar’, could you be more specific to what was fixed?
The new code didn’t achieve what I was orignally trying to do which is to make the main slideshow image a link – unless you have found a solution and would be kind enough to share with us.February 23, 2010 at 12:11 am #333462Thanks tienhc, that code fixed my “read more” issue. Cheers.
chrisjclay Friendchrisjclay
- Join date:
- August 2010
- Posts:
- 26
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 17
- Thanked:
- 1 times in 1 posts
September 8, 2010 at 5:43 pm #354955Hi,
I’m using a recent version of Rasite but this functionality still doesn’t seem to be working. Clicking on the large image in the slideshow should link to the corresponding article, but for now the only way to reach the article is by clicking the “Read More” text.
I have “Source” set to “From Articles.” Is there a way to make the slides link to the related articles? Please help!
Thanks 🙂
Chris
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 9, 2010 at 4:31 am #355006<em>@chrisjclay 193265 wrote:</em><blockquote>Hi,
I’m using a recent version of Rasite but this functionality still doesn’t seem to be working. Clicking on the large image in the slideshow should link to the corresponding article, but for now the only way to reach the article is by clicking the “Read More” text.
I have “Source” set to “From Articles.” Is there a way to make the slides link to the related articles? Please help!
Thanks 🙂
Chris</blockquote>
To make the link for the slide, the slideshow must to disable the Mark Images which allow displaying 3D style in the main mask.
chrisjclay Friendchrisjclay
- Join date:
- August 2010
- Posts:
- 26
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 17
- Thanked:
- 1 times in 1 posts
September 11, 2010 at 12:51 am #355160Hi Tienhc,
Thanks for the suggestion. However, in the module options I see quite a few Mark options (height, width, transition type etc.) but I don’t see any way to disable it. Is the option there, or do I need to hack the module’s code somehow?
Best wishes,
ChrisSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 13, 2010 at 2:49 am #355299<em>@chrisjclay 193544 wrote:</em><blockquote>Hi Tienhc,
Thanks for the suggestion. However, in the module options I see quite a few Mark options (height, width, transition type etc.) but I don’t see any way to disable it. Is the option there, or do I need to hack the module’s code somehow?
Best wishes,
Chris</blockquote>now, you add the following code into the template.css file:
.ja-slide-mask {
display:none!important
}You open the file: modulesmod_jaslideshow2tmpldefault_articles.php and find the following code:
[PHP]
<?php echo $helper->renderImage ($item->title, $item->mainImage, $params, $mainWidth, $mainHeight );?>
[/PHP]
replace:
[PHP]
<a <?php echo $target; ?> href=”<?php echo $item->link; ?>”>
<?php echo $helper->renderImage ($item->title, $item->mainImage, $params, $mainWidth, $mainHeight );?>
</a>
[/PHP]1 user says Thank You to Saguaros for this useful post
sobe Friendsobe
- Join date:
- June 2010
- Posts:
- 249
- Downloads:
- 13
- Uploads:
- 20
- Thanks:
- 32
- Thanked:
- 4 times in 1 posts
August 1, 2011 at 3:44 am #403852tnhc’s solution makes the image link directly to the article.
Is there a way to create an image link to another page?
I’ve tried defining the link within the actual image in the article, but the link doesn’t function in the slideshow. That’s what I’m trying to fix.
Can anyone help?
-
AuthorPosts
This topic contains 13 replies, has 7 voices, and was last updated by sobe 13 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum