---
Adds BBCode to let you align your Pics left and right
http://www.blizzhackers.com
bu mod elinde olan varsa
########################################################
## Mod Title: Left and Right IMG tags
## Mod Version: 1.0.0
## Rev Date: March 18, 2002
##
## Written By: Nuttzy < pktoolkit@blizzhackers.com >
## Description: This mod will allow you to better format
## you posts by aligning images left and
## right instead of just in-line as with the
## standard [img][/img] tag.
##
## Installation Level: SUPER EASY
## Installation Time: 1-2 Minutes
## Files To Edit: Two (2)
########################################################
##
## Installation Notes:
##
## Works with RC3
##
## Usage:
## [left]url of image[/left] to left justify image
## [right]url of image[/right] to right justify image
##
########################################################
#
#-----[ ACTION: Open File ]------------------------------------------
#
// file: includes\bbcode.php
#
#-----[ ACTION: Find ]------------------------------------------
#
$bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']);
#
#-----[ ACTION: Add After ]------------------------------------------
#
// LEFT-RIGHT-start
$bbcode_tpl['left'] = str_replace('{URL}', '\\1', $bbcode_tpl['left']);
$bbcode_tpl['right'] = str_replace('{URL}', '\\1', $bbcode_tpl['right']);
// LEFT-RIGHT-end
#
#-----[ ACTION: Find ]------------------------------------------
#
// [img]image_url_here[/img] code..
// This one gets first-passed..
$patterns[0] = "#\[img:$uid\](.*?)\[/img:$uid\]#si";
$replacements[0] = $bbcode_tpl['img'];
#
#-----[ ACTION: Add After ]------------------------------------------
#
##
## NOTE: instead of 6 and 7 for the array values, you may need to enter
## larger values if you have other bbcode mods installed
##
// LEFT-RIGHT-start
// [left]image_url_here[/left] code..
// This one gets first-passed..
$patterns[6] = "#\[left:$uid\](.*?)\[/left:$uid\]#si";
$replacements[6] = $bbcode_tpl['left'];
// [right]image_url_here[/right] code..
// This one gets first-passed..
$patterns[7] = "#\[right:$uid\](.*?)\[/right:$uid\]#si";
$replacements[7] = $bbcode_tpl['right'];
// LEFT-RIGHT-end
#
#-----[ ACTION: Find ]------------------------------------------
#
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](([a-z]+?)://([^ \n\r]+?))\[/img\]#si", "[img:$uid]\\1[/img:$uid]", $text);
#
#-----[ ACTION: Add After ]------------------------------------------
#
// LEFT-RIGHT-start
// [left]image_url_here[/left] code..
$text = preg_replace("#\[left\](([a-z]+?)://([^ \n\r]+?))\[/left\]#si", "[left:$uid]\\1[/left:$uid]", $text);
// [right]image_url_here[/right] code..
$text = preg_replace("#\[right\](([a-z]+?)://([^ \n\r]+?))\[/right\]#si", "[right:$uid]\\1[/right:$uid]", $text);
// LEFT-RIGHT-end
##
## --- [NOTE: You will have to make this change to ALL themes you have ---
## --- installed. I use "subSilver" as an example. ] ---
##
#
#-----[ ACTION: Open File ]------------------------------------------
#
// file: templates\subSilver\bbcode.tpl
#
#-----[ ACTION: Find ]------------------------------------------
#
<!-- BEGIN img -->
<img src="{URL}" border="0" />
<!-- END img -->
#
#-----[ ACTION: Add After ]------------------------------------------
#
<!-- BEGIN left -->
<img src="{URL}" border="0" align="left" />
<!-- END left -->
<!-- BEGIN right -->
<img src="{URL}" border="0" align="right" />
<!-- END left -->
#
#---------------END--------------------------------
#
Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir