I. What does it do
——————
This hackenables you to automatically resize every user-posted image which
is larger than given dimensions. Administrators are able to set the maximum
dimensions, and users can choose how enlarged images must be displayed.
The options are:
- No resizing
- Enlargement in the same document
- Enlargement in the same window (replacing the forum thread)
- Enlargement in a new window
It also adds an information bar (which is not displayed when the image is too
small) giving information about the original dimensions and filesize.
Install:
Put the file
ncode_imageresizer.js in the directory on your server.
open bittorrent.php and add below code before the tag:
open your style.css file and paste below code:
table.ncode_imageresizer_warning { background: #FFFFE1; color: #000000; border: 1px solid #CCC; cursor: pointer; } table.ncode_imageresizer_warning td { font-size: 12px; color: red; vertical-align: middle; text-decoration: bold; } table.ncode_imageresizer_warning td.td1 { padding: 5px; } table.ncode_imageresizer_warning td.td1 { padding: 2px; }
open global.php
find this line:
// [img]http://www/image.gif[/img] $s = preg_replace("/\[img\](http:\/\/[^\s'\"]+(\.(jpg|gif|png)))\[\/img\]/i", "<a href="\\1" target="_blank"><img border="0" src="\\1"></a>", $s); <pre> <strong>replace with:</strong> <pre lang="php"> $s = preg_replace("/\[img\](http:\/\/[^\s'\"]+(\.(jpg|gif|png)))\[\/img\]/i", "<img border="0" src="\\1" alt="">", $s);
find this line:
// [img=http://www/image.gif] $s = preg_replace("/\[img=(http:\/\/[^\s'\"]+(\.(gif|jpg|png)))\]/i", "<a href="\\1" target="_blank"><img border="0" src="\\1"></a>", $s);
replace with:
$s = preg_replace("/\[img=(http:\/\/[^\s'\"]+(\.(gif|jpg|png)))\]/i", "<img border="0" src="\\1" alt="">", $s);
No Comment Received
Leave A Reply