前言:
這本來是一個官方外掛, 但由於在安裝測試中, 用 AFTER 出現錯誤頁面. 語法可能有誤.
所以經修正後, 暫未回報作者及官方認定. 發於此區.
功能描述:
當會員的頭像連結失效, (俗稱义燒包) 會由預設的圖檔取代.
======================================
代碼: 選擇全部
#################################################################
## MOD Title: Error Avatar MOD
## MOD Author: Duvelske < Duvelske@planet.nl > (Richard Wagtmans) http://www.vitrax.vze.com/
## MOD Description: This mod replaces the X when your avatar image doesn't show for another image
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 5 - 15 minutes
## Files To Edit: viewtopic.php,
## usercp_viewprofile.php,
## subSilver.cfg
## Included Files: no_avatar.gif
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ 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/downloads/
##############################################################
##
## Author Note: Please look into the end of this mod! Also note that this mod uses a section/image of the default avatar mod!
##
##############################################################
##
## History:
## ------------
## 1.0.1
# - Submitted to phpbb.com
##
## 1.0.0
## - Final Release
## - Made phpBB v2.0.11 compliant and EasyMod compliant
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ COPY ]------------------------------------------------
#
copy no_avatar.gif to templates/subSilver/images/no_avatar.gif
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="'
#
#-----[ IN-LINE FIND ]------------------------------------
#
alt="" border="0"
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------------
#
OnError=this.src="'. $images['default_avatar'] .'"
#
#-----[ FIND ]------------------------------------------
#
$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="'
#
#-----[ IN-LINE FIND ]------------------------------------
#
alt="" border="0"
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------------
#
OnError=this.src="'. $images['default_avatar'] .'"
#
#-----[ FIND ]------------------------------------------
#
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="'
#
#-----[ IN-LINE FIND ]------------------------------------
#
alt="" border="0"
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------------
#
OnError=this.src="'. $images['default_avatar'] .'"
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="'
#
#-----[ IN-LINE FIND ]------------------------------------
#
alt="" border="0"
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------------
#
OnError=this.src="'. $images['default_avatar'] .'"
#
#-----[ FIND ]------------------------------------------
#
$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="'
#
#-----[ IN-LINE FIND ]------------------------------------
#
alt="" border="0"
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------------
#
OnError=this.src="'. $images['default_avatar'] .'"
#
#-----[ FIND ]------------------------------------------
#
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="'
#
#-----[ IN-LINE FIND ]------------------------------------
#
alt="" border="0"
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------------
#
OnError=this.src="'. $images['default_avatar'] .'"
#
#
#If you have the default avatar mod installed please skip this section.
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$images['default_avatar'] = "$current_template_images/no_avatar.gif";
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM