add patches/
We should be tracking those here instead of random F9 threads.
This commit is contained in:
parent
11eb825021
commit
638fc72ccd
2 changed files with 24 additions and 0 deletions
2
patches/README.md
Normal file
2
patches/README.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
Any patches I can't fit into a proper SMF package for one reason or another end
|
||||
up here.
|
22
patches/smf21_expand_attach.patch
Normal file
22
patches/smf21_expand_attach.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
Modifies inline image attachment rendering to provide a link to the image itself.
|
||||
|
||||
--- old/Sources/Subs.php 2025-02-28 07:33:43.973736879 +0000
|
||||
+++ new/Sources/Subs.php 2025-03-23 06:17:03.956035213 +0000
|
||||
@@ -1769,14 +1769,16 @@
|
||||
// Image.
|
||||
if (!empty($currentAttachment['is_image']))
|
||||
{
|
||||
+ $returnContext .= '<a href="' . $currentAttachment['href'] . ';image" target="_blank">';
|
||||
if (empty($params['{width}']) && empty($params['{height}']))
|
||||
- $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">';
|
||||
+ $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . ' class="bbc_img">';
|
||||
else
|
||||
{
|
||||
$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': '';
|
||||
$height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : '';
|
||||
$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>';
|
||||
}
|
||||
+ $returnContext .= '</a>';
|
||||
}
|
||||
// Video.
|
||||
elseif (strpos($currentAttachment['mime_type'], 'video/') === 0)
|
Loading…
Reference in a new issue