Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • stuarta60 Friend
    #159057

    Hi,

    Is it possible to make the image of JA slideshow link when the images are taken from articles?

    Thanks

    thuanlq Friend
    #373102

    Hi @stuarta60,

    Current version of jaslideshow2 module, you can’t make the image link when the images are taken from articles. however you can change some code as following to do it.
    – Open “helper.php” on location “modules/mod_jaslideshow2/”, edit “renderImage” function as


    /**
    * render image from image source.
    */
    function renderImage( $title, $image, $params, $width = 0, $height = 0, $attrs='', $returnURL=false ) {
    ....
    }

    To


    /**
    * render image from image source.
    */
    function renderImage( $title, $image, $params, $width = 0, $height = 0, $attrs='', $returnURL=false, $item_link = "" ) {
    ....
    if(!empty($item_link))
    {
    $image = '<a href="'.$item_link.'" target="_blank">'.$image.'</a>';
    }
    // clean up globals
    return $image;
    }

    – Open “default_articles.php” file in folder “modules/mod_jaslideshow2/tmpl/”, change two line code


    <?php echo $helper->renderImage ($item->title, $item->mainImage, $params, $mainWidth, $mainHeight); ?>
    //and
    <?php echo $helper->renderImage ( $item->title, $item->thumbnail, $params,
    $thumbWidth, $thumbHeight, 'align="left"' ); ?>

    To


    <?php echo $helper->renderImage ($item->title, $item->mainImage, $params, $mainWidth, $mainHeight, "", false, $item->link );?>
    //and
    <?php echo $helper->renderImage ( $item->title, $item->thumbnail, $params,
    $thumbWidth, $thumbHeight, 'align="left"' , false, $item->link ); ?>

    stuarta60 Friend
    #373166

    Hi,

    Thanks for the reply. Can you confirm exactly where the end of the code in helper.php is where you currently have “….” because the changed helper.php code above is alot shorter than the original and when I replaced it on the site it went to a white page.

    Thanks 🙂
    Or if it would be easier can you upload the updated helper.php and default_articles.php files here for me to overwrite the originals?

    thuanlq Friend
    #373358

    Dear @stuarta60,

    Here is my helper.php, and default_articles.php files, you can replace original files.


    1. mod_jaslideshow2.zip
    stuarta60 Friend
    #373554

    That’s great, thank you!:cool:

    Is there anyway to make the whole image clickable instead of just the bottom desccription bar?

    thuanlq Friend
    #373609

    Hi @stuarta60,
    Do you want whole image clickable next & prev as the navigation bar?

    stuarta60 Friend
    #373765

    Hello,

    I have the settings not to show the description bar so the sildeshow is just my images then if you click on where the description should be then it clicks into the article.

    If possible, I want to make it so that it will click into the article no matter what part of the image you click?

    Thanks

    thuanlq Friend
    #373824

    Hi @stuarta60,

    Please provide me your website link, and your problem screenshot, i need to check it and i shall give you solution for the same.

    Thanks

    thuanlq Friend
    #373966

    Dear @stuarta60,

    I checked your website, and see your problems are due on each slide item has slide mask block,so you can mouse over on image when over on mask block. To fix there problems please add new style on end of file “mod_jaslideshow2.css” in folder “templates/pearls_of_wizdom/css/”


    .ja-slide-mask {
    display:none;

    }

    jamiemoses Friend
    #397225

    I’ve done the above and I love the way you can now click the image and it loads up the article but is it possible that by clicking the image it can go directly to a link (opened in the same window) instead of it just going straight to the article?

    Kind Regards

    Jamie

    thangnn1510 Friend
    #397287

    <em>@jamiemoses 248148 wrote:</em><blockquote>I’ve done the above and I love the way you can now click the image and it loads up the article but is it possible that by clicking the image it can go directly to a link (opened in the same window) instead of it just going straight to the article?

    Kind Regards

    Jamie</blockquote>

    Please try to change this code:

    $image = ‘<a href=”‘.$item_link.'” target=”_blank”>’.$image.'</a>’;

    to

    $image = ‘<a href=”‘.$item_link.'”>’.$image.'</a>’;

    in “helper.php” on location “modules/mod_jaslideshow2/ it will go directly to the link (open in the same window).

    jamiemoses Friend
    #397457

    Hi – I’ve tried amending the helper.php file but nothing seems to have changed – im not sure if i’m being clear but basically you click on the text or main picture – I want this to link straight to another page within the website and not to an article if that is possible.

    Kind Regards

    Jamie

    thangnn1510 Friend
    #397506

    <em>@jamiemoses 248433 wrote:</em><blockquote>Hi – I’ve tried amending the helper.php file but nothing seems to have changed – im not sure if i’m being clear but basically you click on the text or main picture – I want this to link straight to another page within the website and not to an article if that is possible.

    Kind Regards

    Jamie</blockquote>

    There’re many articles so you want all them link to one site?

    jamiemoses Friend
    #397634

    No I have a business directory and the article in the menu shows the business directory but when someone clicks onto the item in the slideshow I want it to take them straight to the business directory page instead of the article explaining about the business directory which I only created for the slideshow.

    Thanks

    Jamie

    thangnn1510 Friend
    #397753

    <em>@jamiemoses 248648 wrote:</em><blockquote>No I have a business directory and the article in the menu shows the business directory but when someone clicks onto the item in the slideshow I want it to take them straight to the business directory page instead of the article explaining about the business directory which I only created for the slideshow.

    Thanks

    Jamie</blockquote>

    OK I understand your idea clearly now: you want that when clicking to article in Slideshow it redirects to article’s category (Business).

    However I couldn’t give the best solution if I don’t know your site. Please give us the login information FTP/Admin account to your support ticket GQH-104-26447 in http://support.joomlart.com. We’ll check for you. Thanks.

Viewing 15 posts - 1 through 15 (of 16 total)

This topic contains 16 replies, has 4 voices, and was last updated by  thangnn1510 13 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum