Images that are too large will be automaticaly resized to 640px and you will get more new tags:
- Small images (240px).
- YouTube and Google videos (and small videos).
- Align all to left, center, right or justify.
In each theme that you have, in header.php before </head> copy this code:
In each theme that you have, in bottom of
In backend/functions.php find and replace this code:
with this code:
//[align=(center|left|right|justify)]text[/align]
$s = preg_replace("/\[align=([a-zA-Z]+)\]((\s|.)+?)\[\/align\]/i","<div style=\"text-align:\\1\">\\2</div>", $s);
Extract the attached archive and upload all files into your root.
[ATTACH]2444._xfImport[/ATTACH]
- Small images (240px).
- YouTube and Google videos (and small videos).
- Align all to left, center, right or justify.
In each theme that you have, in header.php before </head> copy this code:
<script type="text/javascript" src="js/ncode_imageresizer.js"></script>
<script type="text/javascript">
<!--
NcodeImageResizer.MODE = 'newwindow';
NcodeImageResizer.MAXWIDTH = 640;
NcodeImageResizer.MAXHEIGHT = 0;
NcodeImageResizer.Msg1 = 'Click this bar to view the full image.';
NcodeImageResizer.Msg2 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg3 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg4 = 'Click this bar to view the small image.';
//-->
</script>
theme.css copy this code:In each theme that you have, in bottom of
/* === Start Resize images === */
table.ncode_imageresizer_warning {
background: #000000;
color: #FF8000;
border: 1px solid #000000;
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 12px;
color: #FF2000;
vertical-align: middle;
text-decoration: bold;
}
table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
table.ncode_imageresizer_warning td.td1 {
padding: 2px;
}
/* ==== End Resize images ==== */
In backend/functions.php find and replace this code:
// [img=http://www/image.gif]
$s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border='0' src=\"\\1\" alt='' />", $s);
// [img=http://www/image.gif]
$s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border='0' src=\"\\1\" alt='' />", $s);
with this code:
// [img=http://www/image.gif]
$s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border=\"0\" src=\"\\1\" alt=\"\" onload=\"NcodeImageResizer.createOn(this);\">", $s);
// [img=http://www/image.gif]
$s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border=\"0\" src=\"\\1\" alt=\"\" onload=\"NcodeImageResizer.createOn(this);\">", $s);
// [imgw][url="http://www/image.gif%5B/imgw%5D"]http://www/image.gif[/imgw][/url]
$s = preg_replace("/[imgw](http://[^s'"<>]+(.(jpg|gif|png)))[/imgw]/i","<a class="light" target="_blank" href="1 "><img width="240" src="1" alt="" / border="0"></a><br /><font size="1" color="#FF2000" style="margin-left:5px">Click on image to see it in full size!</font>", $s);
// [imgw=[url="http://www/image.gif%5D"]http://www/image.gif][/url]
$s = preg_replace("/[imgw=(http://[^s'"<>]+(.(jpg|gif|png)))]/i","<a class="light" target="_blank" href="1 "><img width="240" src="1" alt="" / border="0"></a><br /><font size="1" color="#FF2000" style="margin-left:5px">Click on image to see it in full size!</font>", $s);
// YouTube Vids
$s = preg_replace("/*youtube.com.*v=([^s'"<>]+)]/ims", "<object width="640" height="480"><param name="movie" value="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"></param><param[/url] name="allowscriptaccess" value="never"></param><param name="allowFullScreen" value="true"></param><param name="allowNetworking" value="internal"></param><embed src="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"[/url] type="application/x-shockwave-flash" allowscriptaccess="never" allowfullscreen="true" allowNetworking="internal" width="640" height="480"></embed></object>", $s);
// YouTube small Vids [videow=URL]
$s = preg_replace("/[videow=[^s'"<>]*youtube.com.*v=([^s'"<>]+)]/ims", "<object width="320" height="240"><param name="movie" value="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"></param><param[/url] name="allowscriptaccess" value="never"></param><param name="allowFullScreen" value="true"></param><param name="allowNetworking" value="internal"></param><embed src="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"[/url] type="application/x-shockwave-flash" allowscriptaccess="never" allowfullscreen="true" allowNetworking="internal" width="320" height="240"></embed></object>", $s);
// Google Vids
$s = preg_replace("/*video.google.com.*docid=(-?[0-9]+).*]/ims", "<embed style="width:640px; height:480px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="[url="http://video.google.com/googleplayer.swf?docId=1%22"]http://video.google.com/googleplayer.swf?docId=1"[/url] allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" wmode="window" salign="TL" FlashVars="playerMode=embedded"> </embed>", $s);
// Google small Vids [videow=URL]
$s = preg_replace("/[videow=[^s'"<>]*video.google.com.*docid=(-?[0-9]+).*]/ims", "<embed style="width:320px; height:240px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="[url="http://video.google.com/googleplayer.swf?docId=1%22"]http://video.google.com/googleplayer.swf?docId=1"[/url] allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" wmode="window" salign="TL" FlashVars="playerMode=embedded"> </embed>", $s);
//
Text
$s = preg_replace("/((s|.)+?)/", "<center>1</center>", $s);
//[align=(left, center, right, justify)]Text[/align]
//[align=(center|left|right|justify)]text[/align]
$s = preg_replace("/\[align=([a-zA-Z]+)\]((\s|.)+?)\[\/align\]/i","<div style=\"text-align:\\1\">\\2</div>", $s);
Extract the attached archive and upload all files into your root.
[ATTACH]2444._xfImport[/ATTACH]
