Customizing SMF > Tips and Tricks
[Tip/Trick] Resize image alert and click resized image open new window
(1/1)
gevv:
smf default image resizer system useful features
1: resize alert
2: add click this image to open new window
find Sources/subs.php (line 1267)
--- Code: --- 'content' => '<img src="$1" alt="{alt}"{width}{height} class="bbc_img resized" />',
--- End code ---
replace;
--- Code: --- 'content' => '<table id="ncode_imageresizer_warning_1" class="ncode_imageresizer_warning" width="500"><tbody><tr><td class="td1" width="20"><img alt="resized" src="http://media.simplemachinesweb.com/smf/default/images/split_select.gif" width="17" border="0" height="17"></td><td class="td2">This image has been resized. Click this image to view the full image.</td></tr></tbody></table><a href="$1" target="_blank"><img src="$1" alt="{alt}"{width}{height} class="bbc_img " /></a>',
--- End code ---
add code theme index.css
--- Code: ---table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}
table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
--- End code ---
Note:
change icon url (http://media.simplemachinesweb.com/smf/default/images/split_select.gif)
To set the size of table width (width="500")
before
hosting images
after
upload pictures
Imutep:
Hi, thx for this snippet. Works perfect. :)
Is it possible to open the full image on the parent side. Like vb?
Navigation
[0] Message Index
Go to full version