Torrent Trackers guides blog


All about torrent tracker ! Modifications , themes , mods , sources engines .

  • Home
  • About
  • Blog Map

Currently viewing and reading

Resize Large Images

Posted by vovqa in March 26th 2010  

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);
under: Forum Mods
Tags: forum, Images
Digg it Add to del.icio.us Stumble it add to technorati

Related Post

  • [codebox][/codebox] BBcode tag (March 31st, 2010)
  • Forum Users Online (March 28th, 2010)
  • Pager in subject (March 26th, 2010)
  • [video=] Tag (bbcode addition) (March 26th, 2010)

No Comment Received

Leave A Reply

Please Note: Comments maybe under moderation after you submit your comments so there is no need to resubmit your comment again

« Pager in subject
Forum Users Online »

Categories

    • Addon Mods (5)
    • Browse/Torrent/Details Mods (1)
    • Forum Mods (5)
    • Message/Email Mods (6)

Pages

    • About
    • Blog Map

Archives

    • March 2010 (17)

Tags

  • An intelligent announcement BBcode Category Manager easyiest script forum Images Multiplier No mail confirmation. Online Passkey Password Hint Simple mod simple script system Tbdev Upload Users video youtube like

Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

Tags

  • An intelligent announcement BBcode Category Manager easyiest script forum Images Multiplier No mail confirmation. Online Passkey Password Hint Simple mod simple script system Tbdev Upload Users video youtube like

Recent Entries

  • [codebox][/codebox] BBcode tag
  • Forum Users Online
  • Resize Large Images
  • Pager in subject
  • Process Hit and Runers by ScarS
  • [video=] Tag (bbcode addition)
  • Set All Torrents FREE the easyiest script ive seen
  • Passkey by Skorpios
  • Category Manager Add/Edit/Delete/View
  • Comment Votes
  • Contact us/ submit query script
  • Password Hint (Fixed for FireFox & I.E
  • Color and text change of PM

Recent Comments

  • bastard in NoMail verification No mail confir…
  • bastard in Color and text change of PM
  • bastard in Password Hint (Fixed for FireFox &…
  • bastard in Contact us/ submit query script
  • lol in Comment Votes

Most Comments

  • Comment Votes (1)
  • Contact us/ submit query script (1)
  • Password Hint (Fixed for FireFox & I.E  (1)
  • Color and text change of PM (1)
  • NoMail verification No mail confirmation.  (1)
©2010 Torrent Trackers guides blog
Powered by WordPress 3.0.1    Valid XHTML    Valid CSS