Hi there,

Please consider registering for an account. Registration is free, only takes a minute and will allow you to access members only boards. If you already have an account with us, then click here to log in.

collapse

* Who's Online

  • Dot Guests: 29
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.


Author Topic: Portal block recent image attachment link to post  (Read 12055 times)

0 Members and 1 Guest are viewing this topic.

WestwegoManTopic starter

  • Administrator
  • Swamp Rat
  • *****
  • Posts: 50
  • Age: 51
  • Location: Westwego, La.
    • View Profile
Portal block recent image attachment link to post
« 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>
« Last Edit: Feb 26, 2024, 9:56 PM by WestwegoMan »


 


The postings on this site are my own and do not necessarily reflect the views of Jefferson Parish,

fellow employees, members of the public, suppliers or people working on behalf of the parish.


SimplePortal 2.3.6 © 2008-2014, SimplePortal