IT NEWS PC REVUE PC FORUM FreeBSDInternet time: @221
Obsah fóra
Pravidlá  •  Kontakt  •  Prihlásenie  •  Registrácia

Dokonalosť v jednoduchosti

Wyse T10 – dokonalosť, na ktorú ste čakali. www.ts.avnet.com

Top novinka v O2 e-shope

Objednajte si dlhoočakávaný Samsung Galaxy S III. V e-shope za 589,63 € pausal.o2.sk

Sprostredkovávajte hypotéky

Začnite sprostredkovávať hypotéky s úspešným hypotekárnym centrom! www.SprostredkovanieUverov.sk

Bonus 50 € za prenos

čísla do O2 na ktorýkoľvek program s platbou na faktúru. V e-shope. www.o2.sk

Webhosting - akcia +9 mesiacov

K ročnému predplatnému až 9 mesiacov zadarmo pri prevode hostingu k nám. www.exohosting.sk

Default avatar

Zaslať odpoveď
AutorSpráva
JanoF
Správca fóra
Správca fóra

Založený: 01.05.2005
Príspevky: 8736
Bydlisko: Bratislava
Vek: 27

PríspevokZaslal: So 14.10.06 14:46Odpovedať s citátomNávrat hore

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

_________________
Skrinka: Nexus Morpho & Enermax UCTB12P | Zdroj: Enermax EMG800AWT 800W | Základná doska: Asus Rampage III Gene | Procesor: Intel Core i7 990X Extreme Edition 3.46 GHz & Scythe Susanoo SCSO-1000 | Pamäť: Kingston HyperX XMP 24 GB DDR3 1600 MHz | Grafická karta: Asus GeForce GT 440 1 GB DDR3 & Thermalright HR-03 | Pevný disk: Intel SSD 510 Series 250 GB & Hitachi Deskstar 5K4000 4000 GB | Optická mechanika: Plextor PX-820SA | Čítačka kariet: Akasa AK-ICR-11 | Klávesnica: Logitech G19 | Myš: Logitech G9x & Razer Kabuto | Monitor: 24" LCD Eizo FlexScan S2431WE | Reproduktory: Logitech Z-2300 | Operačný systém: Microsoft Windows 7 & FreeBSD 9 | Záložný zdroj: APC Back-UPS ES 700 | Spotreba: Idle - 200W / Burn - 400W | Mobil: Nokia N9 64 GB
Zobraziť informácie o autoroviOdoslať súkromnú správuOdoslať e-mailSkypeFacebookTwitterZobraziť autorove WWW stránky
Zobraziť príspevky z predchádzajúcich:    
Zaslať odpoveď
Nemôžete pridávať nové témy do tohto fóra.
Nemôžete odpovedať na témy v tomto fóre.
Nemôžete upravovať svoje príspevky v tomto fóre.
Nemôžete mazať svoje príspevky v tomto fóre.
Nemôžete hlasovať v tomto fóre.

Powered by phpBB 2.x.x © 2005 - 2012 PCforum, webhosting by WebSupport, edited by JanoF

SEO - optimalizácia pre vyhľadávače

Freebsd