rohirrim

clickable image

4 posts in this topic

Hi;

I want to show a single image with clickable. When a user click to backround image s/he should redirect another page. can we do that? Any help will be really appraciated.

Thanks

Share this post


Link to post
Share on other sites

Hi guy.

You can try this solution.

Please open file /mod_bt_backgroundslideshow/tmpl/default.php

Find this line

<img class="imgslide" src="<?php echo ($remote ? (isset($photo->remote) ? $photo->remote : $folder . $photo->file) :  (file_exists($originalPath . $photo->file) ? $moduleURI . 'images/original/'. $photo->file : (isset($photo->remote) ? $photo->remote : '') )) ?>" alt="<?php echo $photo->title ?>" />  

Change it to



<?php if (isset($photo->link) && $photo->link){?>
<a href="<?php echo $photo->link?>" target="<?php echo $photo->target?>">
<img class="imgslide" src="<?php echo ($remote ? (isset($photo->remote) ? $photo->remote : $folder . $photo->file) : (file_exists($originalPath . $photo->file) ? $moduleURI . 'images/original/'. $photo->file : (isset($photo->remote) ? $photo->remote : '') )) ?>" alt="<?php echo $photo->title ?>" />
</a>
<?php } else{ ?>
<img class="imgslide" src="<?php echo ($remote ? (isset($photo->remote) ? $photo->remote : $folder . $photo->file) : (file_exists($originalPath . $photo->file) ? $moduleURI . 'images/original/'. $photo->file : (isset($photo->remote) ? $photo->remote : '') )) ?>" alt="<?php echo $photo->title ?>" />
<?php }?>

Share this post


Link to post
Share on other sites

Thanks for your reply. But where I should put the link of the other site? Thanks, Bilgin.

Hi guy.

You can try this solution.

Please open file /mod_bt_backgroundslideshow/tmpl/default.php

Find this line

<img class="imgslide" src="<?php echo ($remote ? (isset($photo->remote) ? $photo->remote : $folder . $photo->file) : (file_exists($originalPath . $photo->file) ? $moduleURI . 'images/original/'. $photo->file : (isset($photo->remote) ? $photo->remote : '') )) ?>" alt="<?php echo $photo->title ?>" /> 

Change it to



<?php if (isset($photo->link) && $photo->link){?>
<a href="<?php echo $photo->link?>" target="<?php echo $photo->target?>">
<img class="imgslide" src="<?php echo ($remote ? (isset($photo->remote) ? $photo->remote : $folder . $photo->file) : (file_exists($originalPath . $photo->file) ? $moduleURI . 'images/original/'. $photo->file : (isset($photo->remote) ? $photo->remote : '') )) ?>" alt="<?php echo $photo->title ?>" />
</a>
<?php } else{ ?>
<img class="imgslide" src="<?php echo ($remote ? (isset($photo->remote) ? $photo->remote : $folder . $photo->file) : (file_exists($originalPath . $photo->file) ? $moduleURI . 'images/original/'. $photo->file : (isset($photo->remote) ? $photo->remote : '') )) ?>" alt="<?php echo $photo->title ?>" />
<?php }?>

Share this post


Link to post
Share on other sites

Hi.

On back-end, the module manage page, you can click "Edit" link button under each image. And modal form will be showed up.

You can edit some property of the image, there are "Link" and "Target" for you.

Cheers

Share this post


Link to post
Share on other sites