News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[Tip/Trick] Resize image alert and click resized image open new window

Started by gevv, June 16, 2012, 01:53:33 PM

Previous topic - Next topic

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)

'content' => '<img src="$1" alt="{alt}"{width}{height} class="bbc_img resized" />',



replace;

'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>',


add code  theme index.css

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;
}


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
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Imutep

Hi, thx for this snippet. Works perfect. :)
Is it possible to open the full image on the parent side. Like vb?

Advertisement: