WestwegoMans' Forum

Computers, Websites & Forums => SMF Forum tips & tricks => Topic started by: WestwegoMan on Feb 21, 2017, 4:21 PM

Title: Portal block recent image attachment link to post
Post by: WestwegoMan on Feb 21, 2017, 4:21 PM
Want the images in the recent image attachments block in Simple Portal to link to the post instead of the actual larger attachment?

In Sources/PortalBlocks.php
Find:
Code: [Select]
', $item['file']['image']['link'], 'Replace with:
Code: [Select]
<a href="' . $item['topic']['href'] . '">', $item['file']['image']['thumb'], '</a>

Want the images to be smaller? Use the below fix instead and set the size of 175 to what you want.
Find:
Code: [Select]
', $item['file']['image']['link'], 'Replace with:
Code: [Select]
<a href="' . $item['topic']['href'] . '">', str_replace('<img', '<img height="175"', $item['file']['image']['thumb']), '</a>
SimplePortal 2.3.6 © 2008-2014, SimplePortal