預設頭像 Default Avatar MOD 1.0.0

主題已鎖定
頭像
cloudsnow30
.※.稜鏡之森の守護使者.※.
.※.稜鏡之森の守護使者.※.
文章: 145
註冊時間: 週六 2006-03-04 03:29
個人狀態: 冬眠喵型態
性別:
來自: 雲上天國
擁有感謝: 2 次
星座:
聯繫:

預設頭像 Default Avatar MOD 1.0.0

文章 cloudsnow30 »

代碼: 選擇全部

################################################################# 
## 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 
Sakura Moon ~ 櫻井璃月 ~
論壇系統管理員-Cloud Snow 晴雪
主題已鎖定

回到「PHPBB2-外掛列表」