Кто-нибудь знает, есть ли мод, устанавливающий аватар по умолчанию для зарегистрированных юзеров, не выбравших аватар, в зависимости от пола - М или Ж?
Установил мод Gender Hack, но в нем такой возможности нет. А Default avatar дает всем одинаковую аватару. Может, их как-то можно объединить (с учетом того, что часть юзеров могут вообще не указать пол при регистрации)?
Аватар для М и Ж по умолчанию - есть такой мод?
-
- phpBB 1.2.0
- Сообщения: 17
- Стаж: 19 лет 10 месяцев
-
- phpBB 1.2.0
- Сообщения: 17
- Стаж: 19 лет 10 месяцев
Однако, есть такая партия!
Проверил на кошках - работает 
Код: Выделить всё
#################################################################
## MOD Title: Default Avatar vs. Gender Mod
## MOD Version: 1.0.1.3
## MOD Author: Kooky < kooky06@hotmail.com - http://planetsport.nasov.net >
##
## Also: morpheus2matrix < morpheus2matrix@yahoo.fr >
##
## MOD Description: it gives you the possibility to show one avatar if the member is a male
## and another avatar if the member is a female. If the member have not
## choosen gender, a default avatar is use.
## it works only on users who have not choosen an avatar in their profile.
##
## Requirement: Default Avatar Mod v1.0.1 by Shannado <sven@shannado.nl> (Sven) http://www.shannado.nl/forumorg
## Gender Mod v1.2.3 by Niels Chr, Denmark < ncr@db9.dk > (Niels Chr. Rød) http://mods.db9.dk
##
## Installation Level: Easy
## Installation Time: 5 - 15 minutes
## Files To Edit: 3
## viewtopic.php
## usercp_viewprofile.php
## subSilver.cfg
##
## Included Files: 4
## images/guest_avatar.gif
## images/no_avatar.gif
## images/no_avatar_male.gif
## images/no_avatar_female.gif
##
## History:
## 0.9.0 - Initial release phpBB2 RC-1
## 0.9.1 - You can also specify an avatar for the guest user !
## 1.0.0 - Final Release
## 1.0.1 - Made phpBB v2.0.2 compliant and EasyMod 0.0.7 compliant
## 1.0.1.1 - Added Gender mod support (morpheus2matrix)
## 1.0.1.2 - Made phpBB v2.0.4 compliant and fixed issue with Gender Mod (Kooky)
## 1.0.1.3 - Fixed default guest avatar issue with Gender (Kooky)
##
##############################################################
## 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:
## First you have to install the MOD it self AND
## You must have the Gender Mod of Niels Chr Denmark installed to use this extra how-to !!
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ COPY ]------------------------------------------
#
copy *.gif to /templates/subSilver/images/
#
#-----[ 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 vs Gender - Begin
//
if ( empty($poster_avatar) && $poster_id != ANONYMOUS && $postrow[$i]['user_gender'] == '1')
{
$poster_avatar = '<img src="'. $images['default_avatar_male'] .'" alt="" border="0" />';
}
else if ( empty($poster_avatar) && $poster_id != ANONYMOUS && $postrow[$i]['user_gender'] == '2')
{
$poster_avatar = '<img src="'. $images['default_avatar_female'] .'" alt="" border="0" />';
}
else 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 vs Gender - 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 vs Gender - Begin
//
if ( empty($avatar_img) && $profiledata['user_gender'] == '1')
{
$avatar_img = '<img src="'. $images['default_avatar_male'] .'" alt="" border="0" />';
}
else if ( empty($avatar_img) && $profiledata['user_gender'] == '2')
{
$avatar_img = '<img src="'. $images['default_avatar_female'] .'" alt="" border="0" />';
}
else if ( empty($avatar_img) )
{
$avatar_img = '<img src="'. $images['default_avatar'] .'" alt="" border="0" />';
}
//
// Default Avatar MOD vs Gender - End
//
#
#-----[ OPEN ]------------------------------------------
#
# (make sure to edit file .cfg for every theme you use).
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Default Avatar MOD
$images['default_avatar'] = "$current_template_images/no_avatar.gif";
$images['guest_avatar'] = "$current_template_images/guest_avatar.gif";
$images['default_avatar_male'] = "$current_template_images/no_avatar_male.gif";
$images['default_avatar_female'] = "$current_template_images/no_avatar_female.gif";
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

-
- phpBB 1.4.4
- Сообщения: 121
- Стаж: 19 лет 2 месяца
Очередной глупый вопрос! Установил МОД Default avatar И вот, что получил на выходе:
У вас нет необходимых прав для просмотра вложений в этом сообщении.
-
- phpBB Guru
- Сообщения: 5484
- Стаж: 21 год 1 месяц
- Поблагодарили: 2 раза
-
- phpBB 1.4.4
- Сообщения: 121
- Стаж: 19 лет 2 месяца
-
- phpBB 2.0.1
- Сообщения: 293
- Стаж: 19 лет 11 месяцев
- Откуда: Киев