-
AuthorPosts
-
jayatunge Friend
jayatunge
- Join date:
- July 2011
- Posts:
- 94
- Downloads:
- 0
- Uploads:
- 41
- Thanks:
- 16
- Thanked:
- 8 times in 1 posts
March 22, 2012 at 1:46 am #175272Currently, content slider articles are automatically linking to itself. Is there any way I can override these links? In other words, is it possible to direct all links in the contentslider to a separate one article I prefer?
Any help would be really appreciated.And also, even if I disable the Title Link and Read more, still the image is linking to the article. How do I disable the image link?
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
March 23, 2012 at 8:11 am #445283Hi jayatunge,
That’s strange, you can try as following steps
1) Create a module parameter in the module back-end to put the link there, open the file of modulesmod_jacontentslidermod_jacontentslider.xml looking for this xml tag<field
type=”text”
name=”text_heading”
default=””
label=”TEXT_HEADING”
description=”TEXT_HEADING_DESC” />Adding right below it this new tag
<field
type=”text”
name=”alinks”
default=””
label=”Link For all articles”
/>2) you open the file of modulesmod_jacontentsliderhelper.php at about line 411 you would see this line of code
[PHP] $data[$i]->link = modJacontentsliderHelper::articleLink($row);[/PHP]replace it by this block of code
[PHP]
if($params->get(‘alinks’,”) !== ”){
$data[$i]->link = $params->get(‘alinks’);}else{
$data[$i]->link = modJacontentsliderHelper::articleLink($row);
}
[/PHP]Also if you want to disable the links for images you can achieve it right on this file , looking for this line of code and just removing it
[PHP] $image = ‘<a href=”‘ . $link . ‘” title=”” class=”ja-image”>’ . $image . ‘</a>’;[/PHP]I hope those changes make sense !
1 user says Thank You to Sherlock for this useful post
jayatunge Friendjayatunge
- Join date:
- July 2011
- Posts:
- 94
- Downloads:
- 0
- Uploads:
- 41
- Thanks:
- 16
- Thanked:
- 8 times in 1 posts
March 25, 2012 at 6:12 pm #445578No one to help? Even JA staff or techie?
Almost 05 days with out an answer………………..:((Please help.
swissa Friendswissa
- Join date:
- November 2011
- Posts:
- 1955
- Downloads:
- 7
- Uploads:
- 277
- Thanks:
- 175
- Thanked:
- 717 times in 572 posts
March 25, 2012 at 6:57 pm #445586<em>@jayatunge 309990 wrote:</em><blockquote>No one to help? Even JA staff or techie?
</blockquote>Well, I’m neither! I can show you how to turn the link off on the image. Pay attention to my signature because it means hacking a file in joomlaroot/modules/mod_jacontentslider/helper.php
If you take a back-up of the file then you’ll have a fall back.
@ line 576 or thereabouts you need to edit out this line
$image = '<a href="' . $link . '" title="" class="ja-image">' . $image . '</a>';
so make it like this with the double ////$image = '<a href="' . $link . '" title="" class="ja-image">' . $image . '</a>';
Much like a child who knows how to take things apart but not put them together that’s about all I can help you with! 😀
Bestens
*This works for my content slider v2.5.2
swissa Friendswissa
- Join date:
- November 2011
- Posts:
- 1955
- Downloads:
- 7
- Uploads:
- 277
- Thanks:
- 175
- Thanked:
- 717 times in 572 posts
March 25, 2012 at 7:38 pm #445592Actually, thinking it about and anyone is welcome to correct me if they think I may be wrong.
You maybe could just use the link part to link to the article I think. Of course this will only work if this is the only instance of content slider you intend to use in the site without copying it completely and you would have to manually edit it if you want the link to change…..
But if you feel adventurous and as you have a backup file, you could play to see if it works…
$image = '<a href="your-link-goes-here"</a>';jayatunge Friendjayatunge
- Join date:
- July 2011
- Posts:
- 94
- Downloads:
- 0
- Uploads:
- 41
- Thanks:
- 16
- Thanked:
- 8 times in 1 posts
March 26, 2012 at 1:54 am #445637Hi Swissa,
You guided me in the right direction. You rock, Thank you.Commenting the whole line works, but it removes the bottom shadows from the images. So you have to leave the image class and remove the rest of the coding like this:
$image = ‘<a class=”ja-image”>’ . $image . ‘</a>’;
That really does the trick for me. Thank you!And I further went ahead and, tried your second posting by hard coding an url I want to direct the page to. Like this:
$image = ‘<a href=”index.php/showcase/item-page” title=”Sample Item Page” class=”ja-image”>’ . $image . ‘</a>’;That really works! Once again thanks. :-*
swissa Friendswissa
- Join date:
- November 2011
- Posts:
- 1955
- Downloads:
- 7
- Uploads:
- 277
- Thanks:
- 175
- Thanked:
- 717 times in 572 posts
March 26, 2012 at 6:54 am #445662Glad I was able to shine a light. Thanks for coming back and sharing the full solution – I’ll log this one for my own future reference!!
Merci!
jayatunge Friendjayatunge
- Join date:
- July 2011
- Posts:
- 94
- Downloads:
- 0
- Uploads:
- 41
- Thanks:
- 16
- Thanked:
- 8 times in 1 posts
March 29, 2012 at 4:38 pm #446320Hi Dat Hoang,
I have tried your method too. I think that this is the safest method to achieve the objective of directing all to one external article. So, no need to hard code the link in to the helper.php
Super! Big thank to you Hoang for the clear instructions. :-*1 user says Thank You to jayatunge for this useful post
kidi Friendkidi
- Join date:
- March 2009
- Posts:
- 134
- Downloads:
- 0
- Uploads:
- 44
- Thanks:
- 28
- Thanked:
- 2 times in 1 posts
October 7, 2012 at 6:52 pm #469332Hello,
I’m not very well in english but understand how change the code (I hope).
So in the modules/mod_jacontentslider/helper.php files I change the line :
} else {
$image = '';
}$image = '<a href="index.php/showcase/item-page" title="Sample Item Page" class="ja-image">' . $image . '</a>';
// clean up globals
return $image;
}But, sorry for my question, after, how add a different link to an external url for each image (or text) under each content on the content slider ?
It’s certainly an easy question, but I doesn’t know the answer :-[
Thank you for your help.
Have a good evening.
Stork11 FriendStork11
- Join date:
- March 2011
- Posts:
- 2273
- Downloads:
- 0
- Uploads:
- 142
- Thanks:
- 55
- Thanked:
- 431 times in 393 posts
October 8, 2012 at 8:45 am #469412<em>@kidi 341356 wrote:</em><blockquote>Hello,
I’m not very well in english but understand how change the code (I hope).
So in the modules/mod_jacontentslider/helper.php files I change the line :
} else {
$image = '';
}$image = '<a href="index.php/showcase/item-page" title="Sample Item Page" class="ja-image">' . $image . '</a>';
// clean up globals
return $image;
}But, sorry for my question, after, how add a different link to an external url for each image (or text) under each content on the content slider ?
It’s certainly an easy question, but I doesn’t know the answer :-[
Thank you for your help.
Have a good evening.
</blockquote>
Hello kidi,What do you mean as you mentioned “different link”? Would you like to append another anchor tag to image (or text)? Is it below code you wanna?
$image = ‘<a href=”index.php/showcase/item-page” title=”Sample Item Page” class=”ja-image”>’ . $image . ‘</a>’ . ‘<a href=”another-link”>Another-Link</a>’;Regards.
October 22, 2012 at 1:43 pm #470766What if I want a unique link to each image. I don’t just want every image to link to the same. Much like you are able to do in Ja Slideshow where you are able to define link on each image in slideshow..
Any suggestions how to achieve this?
Stork11 FriendStork11
- Join date:
- March 2011
- Posts:
- 2273
- Downloads:
- 0
- Uploads:
- 142
- Thanks:
- 55
- Thanked:
- 431 times in 393 posts
October 23, 2012 at 3:51 am #470836<em>@ditmedie 343241 wrote:</em><blockquote>What if I want a unique link to each image. I don’t just want every image to link to the same. Much like you are able to do in Ja Slideshow where you are able to define link on each image in slideshow..
Any suggestions how to achieve this?</blockquote>
Hello ditmedie,JA ContentSlider only gets links from articles. You can’t define links by manually.
Regards.
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
October 23, 2012 at 3:51 am #470837Hi Ditmedie
You should get a good developer from http://joomlancers.com to do this feature.Regards,
October 25, 2012 at 9:58 am #471083Okay, thanks.. Would be a nice feature to have in the future:)
AuthorPostsViewing 14 posts - 1 through 14 (of 14 total)This topic contains 14 replies, has 7 voices, and was last updated by ditmedie 12 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum