flyalaska Posted April 3, 2014 Report Posted April 3, 2014 Can anyone share their code that will link a random picture to the larger picture? Everything that I have tried has failed. Quote
Moderators servetas Posted April 3, 2014 Moderators Report Posted April 3, 2014 Open screenshots_random.php file on your templates/screenshots folder and replace this line: echo '<b>Random Screenshot!</b><br /><img src="'.SITE_URL.'/pics/'.$screenshot->file_name.'" height="125px" width="180px" alt="Random Screenshot" /> with this one: echo '<b>Random Screenshot!</b><br /><a href="'.SITE_URL.'/index.php/Screenshots/large_screenshot?id='.$screenshot->id.'"><img src="'.SITE_URL.'/pics/'.$screenshot->file_name.'" height="125px" width="180px" alt="Random Screenshot" /></a> PS: Just submitted a pull request on github. Quote
flyalaska Posted April 3, 2014 Author Report Posted April 3, 2014 Open screenshots_random.php file on your templates/screenshots folder and replace this line: echo '<b>Random Screenshot!</b><br /><img src="'.SITE_URL.'/pics/'.$screenshot->file_name.'" height="125px" width="180px" alt="Random Screenshot" /> with this one: echo '<b>Random Screenshot!</b><br /><a href="'.SITE_URL.'/index.php/Screenshots/large_screenshot?id='.$screenshot->id.'"><img src="'.SITE_URL.'/pics/'.$screenshot->file_name.'" height="125px" width="180px" alt="Random Screenshot" /></a> PS: Just submitted a pull request on github. Thank you Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.