代碼: 選擇全部
#################################################################
## Mod Title: Default Avatar MOD
## Mod Version: 1.0.0
## Author: Sven Ansem <sven@shannado.nl> - http://www.shannado.nl
## Description: This MOD shows a default avatar for user who don't have set an avatar. The default avatar mus be set in
## template config file. You can also specify an avatar for the guest user !
##
##
##
## Installation Level: Easy
## Installation Time: 5
## Files To Edit: viewtopic.php, usercp_viewprofile.php, subSilver.cfg
## Included Files:
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##
## Author Note:
## Upload your default avatar pic into /template/subSilver/images !!!!!!!!!
##
##
## History:
## ------------
## 0.9.0 beta
## - Beta
##
## 0.9.1 beta
## - You can also specify an avatar for the guest user !
##
## 1.0.0 Final
## - Final Release
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
case USER_AVATAR_GALLERY:
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Default Avatar MOD - Begin
//
if ( empty($poster_avatar) && $poster_id != ANONYMOUS)
{
$poster_avatar = '<img src="'. $images['default_avatar'] .'" alt="" border="0" />';
}
if ( $poster_id == ANONYMOUS )
{
$poster_avatar = '<img src="'. $images['guest_avatar'] .'" alt="" border="0" />';
}
//
// Default Avatar MOD - End
//
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
case USER_AVATAR_GALLERY:
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Default Avatar MOD - Begin
//
if ( empty($avatar_img) )
{
$avatar_img = '<img src="'. $images['default_avatar'] .'" alt="" border="0" />';
}
//
// Default Avatar MOD - End
//
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------
#
$current_template_images = $current_template_path . "/images";
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Default Avatar MOD
//
$images['default_avatar'] = "$current_template_images/no_avatar.gif";
$images['guest_avatar'] = "$current_template_images/guest_avatar.gif";
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# Eom