Defaut Аватар
С този мод ще можете да изберете Defaut Аватар за вашите юзери, например ако не са си избрали аватар да излиза зададен от вас.

Картинкa:
http://i.data.bg/08/01/02/735901_orig.jpg
Модът е тестван и работи!
Източник: http://phpbbhacks.com


## Трудност: Лесна
## Време за инсталация: ~ 5 минути
## Файлове за промяна:
## admin/admin_board.php
## language/lang_english/lang_admin.php
## includes/usercp_viewprofile.php
## templates/subSilver/admin/board_config_body.tpl
## viewtopic.php
##
## Файлове за добавяне: Няма
##############################################################
#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config(config_name, config_value) VALUES ('default_avatar_guests_url', '');
INSERT INTO phpbb_config(config_name, config_value) VALUES ('default_avatar_users_url', '');
INSERT INTO phpbb_config(config_name, config_value) VALUES ('default_avatar_set', '3');

#
#-----[ Отворете ]------------------------------------------
#
admin/admin_board.php

#
#-----[ Намерете ]------------------------------------------
#
$disable_board_no = ( !$new['board_disable'] ) ? "checked=\"checked\"" : "";

#
#-----[ След това добавете ]------------------------------------------
#
// Default avatar MOD, By Manipe (Begin)
$default_avatar_guests = ($new['default_avatar_set'] == '0') ? "checked=\"checked\"" : "";
$default_avatar_users = ($new['default_avatar_set'] == '1') ? "checked=\"checked\"" : "";
$default_avatar_both = ($new['default_avatar_set'] == '2') ? "checked=\"checked\"" : "";
$default_avatar_none = ($new['default_avatar_set'] == '3') ? "checked=\"checked\"" : "";
// Default avatar MOD, By Manipe (End)

#
#-----[ Намерете ]------------------------------------------
#
"L_NO" => $lang['No'],

#
#-----[ След това добавете ]------------------------------------------
#
// Default Avatar MOD, By Manipe (Begin)
"L_DEFAULT_AVATAR" => $lang['Default_avatar'],
"L_DEFAULT_AVATAR_EXPLAIN" => $lang['Default_avatar_explain'],
"L_DEFAULT_AVATAR_GUESTS" => $lang['Default_avatar_guests'],
"L_DEFAULT_AVATAR_USERS" => $lang['Default_avatar_users'],
"L_DEFAULT_AVATAR_BOTH" => $lang['Default_avatar_both'],
"L_DEFAULT_AVATAR_NONE" => $lang['Default_avatar_none'],
// Default Avatar MOD, By Manipe (End)

#
#-----[ Намерете ]------------------------------------------
#
"S_DISABLE_BOARD_NO" => $disable_board_no,

#
#-----[ След това добавете ]------------------------------------------
#
// Default avatar MOD, By Manipe (Begin)
"DEFAULT_AVATAR_GUESTS_URL" => $new['default_avatar_guests_url'],
"DEFAULT_AVATAR_USERS_URL" => $new['default_avatar_users_url'],
"DEFAULT_AVATAR_GUESTS" => $default_avatar_guests,
"DEFAULT_AVATAR_USERS" => $default_avatar_users,
"DEFAULT_AVATAR_BOTH" => $default_avatar_both,
"DEFAULT_AVATAR_NONE" => $default_avatar_none,
// Default avatar MOD, By Manipe (End)

#
#-----[ Отворете ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ Намерете ]------------------------------------------
#
//
// That's all Folks!

#
#-----[Преди това добавете ]------------------------------------------
#
// Default avatar MOD, By Manipe (Begin)
$lang['Default_avatar'] = 'Set a default avatar';
$lang['Default_avatar_explain'] = 'This gives users that haven\'t yet selected an avatar, a default one. Set the default avatar for guests and users, and then select wheather you want the avatar to be displayed for registered users, guests, both or none.';
$lang['Default_avatar_guests'] = 'Guests';
$lang['Default_avatar_users'] = 'Users';
$lang['Default_avatar_both'] = 'Both';
$lang['Default_avatar_none'] = 'None';
// Default avatar MOD, By Manipe (End)

#
#-----[ Отворете ]------------------------------------------
#
includes/usercp_viewprofile.php

#
#-----[ Намерете ]------------------------------------------
#
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;
}
}

#
#-----[След това добавете ]------------------------------------------
#
// Default avatar MOD, By Manipe (Begin)
if ((!$avatar_img) && (($board_config['default_avatar_set'] == 1) || ($board_config['default_avatar_set'] == 2)) && ($board_config['default_avatar_users_url'])){
$avatar_img = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
}
// Default avatar MOD, By Manipe (End)

#
#-----[ Отворете ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl

#
#-----[Намерете ]------------------------------------------
#
<tr>
<th class="thHead" colspan="2">{L_AVATAR_SETTINGS}</th>
</tr>

#
#-----[ След това добавете ]------------------------------------------
#
<tr>
<td class="row1">{L_DEFAULT_AVATAR} <br /><span class="gensmall">{L_DEFAULT_AVATAR_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="default_avatar_set" value="0" {DEFAULT_AVATAR_GUESTS} /> {L_DEFAULT_AVATAR_GUESTS} <input class="post" type="text" name="default_avatar_guests_url" maxlength="255" value="{DEFAULT_AVATAR_GUESTS_URL}" /><br /><input type="radio" name="default_avatar_set" value="1" {DEFAULT_AVATAR_USERS} /> {L_DEFAULT_AVATAR_USERS} <input class="post" type="text" name="default_avatar_users_url" maxlength="255" value="{DEFAULT_AVATAR_USERS_URL}" /><br /><input type="radio" name="default_avatar_set" value="2" {DEFAULT_AVATAR_BOTH} /> {L_DEFAULT_AVATAR_BOTH}<br /><input type="radio" name="default_avatar_set" value="3" {DEFAULT_AVATAR_NONE} /> {L_DEFAULT_AVATAR_NONE}</td>
</tr>

#
#-----[Отворете ]------------------------------------------
#
viewtopic.php

#
#-----[ Намерете ]------------------------------------------
#
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;
}
}

#
#-----[ След това добавете ]------------------------------------------
#
// Default avatar MOD, By Manipe (Begin)
if ((!$poster_avatar) && ($board_config['default_avatar_set'] != 3)){
if (($board_config['default_avatar_set'] == 0) && ($poster_id == -1) && ($board_config['default_avatar_guests_url'])){
$poster_avatar = '<img src="' . $board_config['default_avatar_guests_url'] . '" alt="" border="0" />';
}
else if (($board_config['default_avatar_set'] == 1) && ($poster_id != -1) && ($board_config['default_avatar_users_url']) ){
$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
}
else if ($board_config['default_avatar_set'] == 2){
if (($poster_id == -1) && ($board_config['default_avatar_guests_url'])){
$poster_avatar = '<img src="' . $board_config['default_avatar_guests_url'] . '" alt="" border="0" />';
}
else if (($poster_id != -1) && ($board_config['default_avatar_users_url'])){
$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
}
}
}
// Default avatar MOD, By Manipe (End)

#
#-----[Запишете/Затворете всички файлове ]------------------------------------------
#



/ Трябва да сте регистриран за да напишете коментар /