[ Príspevok: 1 ] 
AutorSpráva
Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Default avatar

Registrovaný: 01.05.05
Príspevky: 12423
Témy: 1447 | 1447
Bydlisko: Bratislava
Vek: 32
NapísalOffline : 14.10.2006 14:46 | Default avatar

Kód:
##############################################################
## MOD Title: Default avatar
## MOD Author: Manipe < admin@manipef1.com > (N/A) http://www.manipef1.com
## MOD Description: Lets the administrator choose a default avatar, if a user hasn't already selected one. The default avatar can be changed through the ACP. You can also select wheather you want to display the default avatar for guests, registered users or both, and choose a different default avatar for guests and users.
## MOD Version: 1.1.0
##
## Installation Level: Easy
## Installation Time: ~ 5 Minutes
## Files To Edit:
##      admin/admin_board.php
##      language/lang_english/lang_admin.php
##      includes/usercp_viewprofile.php
##      templates/subSilver/admin/board_config_body.tpl
##      viewtopic.php
##
## Included Files: N/A
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ 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/
##############################################################
## Author Notes:
##
##   You can choose the default avatar by following the "Configuration" link under the "General Admin" heading, in the left panel of the ACP.
##
##   Made by request from this topic: http://www.phpbb.com/phpBB/viewtopic.php?t=254117
##   
##############################################################
## MOD History:
##
##
##   2005-01-10 - Version 1.1.0
##      - Added a function so you can set a different avatar for users and guests, and so that you can set it so that no default avatar is shown.
##
##   2005-01-09 - Version 1.0.0
##      - First version, seems to work fine.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ 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');

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php

#
#-----[ FIND ]------------------------------------------
#
$disable_board_no = ( !$new['board_disable'] ) ? "checked=\"checked\"" : "";

#
#-----[ AFTER, ADD ]------------------------------------------
#
// 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)

#
#-----[ FIND ]------------------------------------------
#
   "L_NO" => $lang['No'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
// 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)

#
#-----[ FIND ]------------------------------------------
#
   "S_DISABLE_BOARD_NO" => $disable_board_no,

#
#-----[ AFTER, ADD ]------------------------------------------
#
// 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)

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!

#
#-----[ BEFORE, ADD ]------------------------------------------
#
// 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)

#
#-----[ 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, 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)

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]------------------------------------------
#
   <tr>
     <th class="thHead" colspan="2">{L_AVATAR_SETTINGS}</th>
   </tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
   <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} &nbsp; <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} &nbsp; <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>

#
#-----[ 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, 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)

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

# EoM


_________________
SilverStone SST CS01 | Corsair SF600 600W SFX | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 (16 Cores / 32 Threads) & Noctua NH-U9DX i4 | Kingston HyperX Savage 32 GB DDR4 2400 MHz | PNY NVIDIA Quadro K1200 DP 4 GB DDR5 | Intel SSD 750 1.2 TB NVMe & Intel SSD 730 240 GB SATA & Seagate BackUp Plus Portable 12 TB USB | 31.5" 4K LCD EIZO FlexScan EV3237 & 2 x 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech Wireless G700s | Harman Kardon Nova | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 - Intel Core i7 5600U, 8 GB DDR3 1600 MHz, Intel HD Graphics 5500, SanDisk SSD 512 GB, 12.5 FHD LED IPS, WWAN 3G 4G LTE, Microsoft Windows 7 Ultimate | Nintendo Classic Mini | BlackBerry Passport 96 GB
 [ Príspevok: 1 ] 


Default avatar



Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy.

avatar

v Správy pre vedenie fóra

7

915

12.11.2010 18:32

OmeGa

V tomto fóre nie sú ďalšie neprečítané témy.

WordPress avatar

v Redakčné systémy

3

98

04.05.2014 18:55

chrono

V tomto fóre nie sú ďalšie neprečítané témy.

avatar-otazka

v PHP, ASP

2

287

08.07.2009 14:16

mark6000

V tomto fóre nie sú ďalšie neprečítané témy.

upload avatar

v Správy pre vedenie fóra

3

1043

18.07.2006 17:27

javo

V tomto fóre nie sú ďalšie neprečítané témy.

Avatár v phpBB

v Redakčné systémy

2

940

24.05.2006 1:35

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

Avatar the Movie

[ Choď na stránku:Choď na stránku: 1, 2, 3, 4, 5 ]

v Kultúra, umenie, filmy, hudba, história, média

128

5553

12.03.2010 15:57

sedlák

V tomto fóre nie sú ďalšie neprečítané témy.

icq avatar upload

v Sieťové a internetové programy

0

337

07.12.2006 20:10

Fenius

V tomto fóre nie sú ďalšie neprečítané témy.

Avatar z URL

v Správy pre vedenie fóra

3

787

08.01.2010 16:52

riki137

V tomto fóre nie sú ďalšie neprečítané témy.

Problem nahrať avatar

v Správy pre vedenie fóra

2

660

06.01.2011 17:30

Qpkqkma

V tomto fóre nie sú ďalšie neprečítané témy.

hra Avatar 3D

v Počítačové hry

7

649

06.01.2010 23:34

Qpkqkma

V tomto fóre nie sú ďalšie neprečítané témy.

Avatar - hra k filmu

v Počítačové hry

5

1582

18.11.2009 18:34

SevaN

V tomto fóre nie sú ďalšie neprečítané témy.

PREKLAD: Avatar creator SK

v Redakčné systémy

0

3207

29.01.2007 16:07

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

Per-User Avatar Options - Addition in ACP

v Redakčné systémy

0

226

14.10.2006 15:09

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

default ikony

v Operačné systémy Microsoft

5

70

27.01.2013 12:57

shiro

V tomto fóre nie sú ďalšie neprečítané témy.

default params

v PHP, ASP

4

219

24.01.2009 16:45

chrono

V tomto fóre nie sú ďalšie neprečítané témy.

Default IP GPON

v Siete

2

246

24.06.2012 16:21

exxo



© 2005 - 2017 PCforum, edited by JanoF