Code: Select all
##############################################################
## MOD Title: Resize Posted Images with HTML tag
## MOD Author: spooky2280 < [email protected] > (Christian Fecteau) http://portfolio.christianfecteau.com/
## MOD Description: This MOD makes "Resize Posted Images Based on Max Width MOD" processes
## images posted with HTML <img> tag
##
## MOD Version: 1.0.2
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files To Edit: 4
## viewtopic.php
## posting.php
## includes/topic_review.php
## privmsg.php
##
## Included Files: none
##
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## If the user specifies the width and height attributes,
## the script might fail or behave abnormally. The script assumes
## that width and height won't be set on the IMG element.
## If the members of your board are used to specify the width
## and height attributes when they post images with HTML,
## it is recommended to not install this add-on to the MOD.
## Disable the IMG tag for allowed HTML in the ACP instead
## of making the modifications below.
##
##############################################################
## MOD History:
##
## 2005-03-18 - Version 1.0.2
## - case-insensitive replace
##
## 2005-01-19 - Version 1.0.1
## - Fixed a OPEN
##
## 2005-01-19 - Version 1.0.0
## - First release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
# around line 1136
#
$message = str_replace("\n", "\n<br />\n", $message);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$message = str_replace('resizemod="on" onload="rmw_img_loaded(this)"','',$message);
$message = preg_replace('#<img#is','<img resizemod="on" onload="rmw_img_loaded(this)"',$message);
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
# around line 699
#
$preview_message = str_replace("\n", '<br />', $preview_message);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$preview_message = str_replace('resizemod="on" onload="rmw_img_loaded(this)"','',$preview_message);
$preview_message = preg_replace('#<img#is','<img resizemod="on" onload="rmw_img_loaded(this)"',$preview_message);
#
#-----[ OPEN ]------------------------------------------
#
includes/topic_review.php
#
#-----[ FIND ]------------------------------------------
#
# around line 181
#
$message = str_replace("\n", '<br />', $message);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$message = str_replace('resizemod="on" onload="rmw_img_loaded(this)"','',$message);
$message = preg_replace('#<img#is','<img resizemod="on" onload="rmw_img_loaded(this)"',$message);
#
#-----[ OPEN ]------------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------------
#
# around line 611
#
$private_message = str_replace("\n", '<br />', $private_message);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$private_message = str_replace('resizemod="on" onload="rmw_img_loaded(this)"','',$private_message);
$private_message = preg_replace('#<img#is','<img resizemod="on" onload="rmw_img_loaded(this)"',$private_message);
#
#-----[ FIND ]------------------------------------------
#
# around line 1570
#
$preview_message = str_replace("\n", '<br />', $preview_message);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$preview_message = str_replace('resizemod="on" onload="rmw_img_loaded(this)"','',$preview_message);
$preview_message = preg_replace('#<img#is','<img resizemod="on" onload="rmw_img_loaded(this)"',$preview_message);
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Select all
##############################################################
## MOD Title: Fix IE gap bug with subSilver-like styles
## MOD Author: spooky2280 < [email protected] > (Christian Fecteau) http://portfolio.christianfecteau.com/
## MOD Description: This MOD fixes the invisible gap at the right of resized images in
## IE with the "Resize Posted Images Based on Max Width MOD"
##
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files To Edit: 1
## templates/subSilver/viewtopic_body.tpl
##
## Included Files: none
##
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## Basically, what you do is to remove the width="100%" from the left cell
## and you add align="right" to the right cell. That's it.
##
##############################################################
## MOD History:
##
## 2005-03-18 - Version 1.0.0
## - First release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
# around line 32
#
<td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
<td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
<td valign="top" nowrap="nowrap" align="right">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Select all
## Installation Level: Easy
## Installation Time: 5 Minutes (1 minute with EasyMod)
##
## Files To Edit: 7
## templates/subSilver/bbcode.tpl
## templates/subSilver/overall_header.tpl
## templates/subSilver/overall_footer.tpl
## templates/subSilver/simple_header.tpl
## templates/subSilver/simple_footer.tpl
## includes/page_header.php
## language/lang_english/lang_main.php
##
## Included Files: 1
## templates/rmw_jslib.js
##
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## This MOD uses Javascript and works in all W3C DOM browsers:
## NN6+, IE5+, Mozilla/Firefox/Camino, Safari, Opera7+, etc.
##
## To set a different max width than the 400 pixels default one:
## 1. OPEN overall_header.tpl and simple_header.tpl in templates/subSilver/
## 2. FIND rmw_max_width = 400
## 3. CHANGE 400 to the width in pixels that you want for this template
## 4. REPEAT steps 1 to 3 for each of your other templates (if any)
##
## Don't forget to edit all your templates and languages in addition to subSilver and lang_english
##
##############################################################