| | |
| Stránka: 1 z 1
| [ Príspevok: 1 ] | |
Autor | Správa |
---|
Registrovaný: 01.05.05 Príspevky: 13343 Témy: 1494 Bydlisko: Bratislava | Napísal JanoF: 14.10.2006 15:09 | |
|
Kód: ############################################### ## Hack Title: Per-User Avatar Options - Addition in ACP ## Hack Version: 1.0.0 ## Author: JKeats ## ## Description: Adds an additional option to the user management screen in the ACP allowing the admin to allow or ## disallow the use of the various avatar selection options on a per-user basis. ## ## Compatibility: 2.0.6 (2.0.0 - 2.0.4 - untested) ## ## Installation Level: Moderate ## Installation Time: 10 Minutes ## ## Files To Edit: 4 ## /admin/admin_users.php ## /includes/usercp_register.php ## /language/lang_english/lang_admin.php ## /templates/XXXXXX/admin/user_edit_body.tpl ## ## Included Files: 0 ## None ## ## History: ## None ## ## Author Notes: ## The SQL below should be altered to meet your needs. By default, the 3 DB additions will ## be set to NO (0). However, you can change any of the 3 0's to 1's instead if you want ## the default for that option to be YES (1) instead. ## ## Support: http://www.phpbbhacks.com/forums ## Copyright: ©2003 Per-User Avatar Options - Addition in ACP 1.0.0 - JKeats ## ############################################### ## You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads. ## Please visit http://www.phpbbhacks.com/forums for support. ############################################### ## ############################################### ## This hack is released under the GPL License. ## This hack can be freely used, but not distributed, without permission. ## Intellectual Property is retained by the hack author(s) listed above. ############################################### ## ############################################### ## Before adding this hack to your forum you should back up all related files. ###############################################
# #-----[ SQL ]------------------------------------------ #
ALTER TABLE phpbb_users ADD `user_allowAVgallery` tinyint(1) NOT NULL default '0'; ALTER TABLE phpbb_users ADD `user_allowAVremote` tinyint(1) NOT NULL default '0'; ALTER TABLE phpbb_users ADD `user_allowAVupload` tinyint(1) NOT NULL default '0';
# #-----[ OPEN ]------------------------------------------ #
/admin/admin_users.php
# #-----[ FIND ]------------------------------------------ #
$user_allowavatar = ( !empty($HTTP_POST_VARS['user_allowavatar']) ) ? intval( $HTTP_POST_VARS['user_allowavatar'] ) : 0;
# #-----[ AFTER, ADD ]------------------------------------------ #
$user_allowAVgallery = ( !empty($HTTP_POST_VARS['user_allowAVgallery']) ) ? intval( $HTTP_POST_VARS['user_allowAVgallery'] ) : 0; $user_allowAVremote = ( !empty($HTTP_POST_VARS['user_allowAVremote']) ) ? intval( $HTTP_POST_VARS['user_allowAVremote'] ) : 0; $user_allowAVupload = ( !empty($HTTP_POST_VARS['user_allowAVupload']) ) ? intval( $HTTP_POST_VARS['user_allowAVupload'] ) : 0;
# #-----[ FIND ]------------------------------------------ #
, user_allowavatar = $user_allowavatar
# #-----[ INLINE AFTER, ADD ]------------------------------------------ #
, user_allowAVgallery = $user_allowAVgallery, user_allowAVremote = $user_allowAVremote, user_allowAVupload = $user_allowAVupload
# #-----[ FIND ]------------------------------------------ #
$user_allowpm = $this_userdata['user_allow_pm'];
# #-----[ AFTER, ADD ]------------------------------------------ #
$user_allowAVgallery = $this_userdata['user_allowAVgallery']; $user_allowAVremote = $this_userdata['user_allowAVremote']; $user_allowAVupload = $this_userdata['user_allowAVupload'];
# #-----[ FIND ]------------------------------------------ #
$s_hidden_fields .= '<input type="hidden" name="user_rank" value="' . $user_rank . '" />';
# #-----[ AFTER, ADD ]------------------------------------------ #
$s_hidden_fields .= '<input type="hidden" name="user_allowAVgallery" value="' . $user_allowAVgallery . '" />'; $s_hidden_fields .= '<input type="hidden" name="user_allowAVremote" value="' . $user_allowAVremote . '" />'; $s_hidden_fields .= '<input type="hidden" name="user_allowAVupload" value="' . $user_allowAVupload . '" />';
# #-----[ FIND ]------------------------------------------ #
'ALLOW_AVATAR_YES' => ($user_allowavatar) ? 'checked="checked"' : '', 'ALLOW_AVATAR_NO' => (!$user_allowavatar) ? 'checked="checked"' : '',
# #-----[ AFTER, ADD ]------------------------------------------ #
'ALLOW_AVGALLERY_YES' => ($user_allowAVgallery) ? 'checked="checked"' : '', 'ALLOW_AVGALLERY_NO' => (!$user_allowAVgallery) ? 'checked="checked"' : '', 'ALLOW_AVREMOTE_YES' => ($user_allowAVremote) ? 'checked="checked"' : '', 'ALLOW_AVREMOTE_NO' => (!$user_allowAVremote) ? 'checked="checked"' : '', 'ALLOW_AVUPLOAD_YES' => ($user_allowAVupload) ? 'checked="checked"' : '', 'ALLOW_AVUPLOAD_NO' => (!$user_allowAVupload) ? 'checked="checked"' : '',
# #-----[ FIND ]------------------------------------------ #
'L_ALLOW_AVATAR' => $lang['User_allowavatar'],
# #-----[ AFTER, ADD ]------------------------------------------ #
'L_ALLOW_AVGALLERY' => $lang['User_allowAVgallery'], 'L_ALLOW_AVREMOTE' => $lang['User_allowAVremote'], 'L_ALLOW_AVUPLOAD' => $lang['User_allowAVupload'],
# #-----[ OPEN ]------------------------------------------ #
/includes/usercp_register.php
# #-----[ FIND ]------------------------------------------ #
if ( $mode != 'register' ) { if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) ) { $template->assign_block_vars('switch_avatar_block', array() );
if ( $board_config['allow_avatar_upload'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_path'])) ) { if ( $form_enctype != '' ) { $template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array() ); } $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_upload', array() ); }
if ( $board_config['allow_avatar_remote'] ) { $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_link', array() ); }
if ( $board_config['allow_avatar_local'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_gallery_path'])) ) { $template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() ); } } }
# #-----[ REPLACE WITH ]------------------------------------------ #
if ( $mode != 'register' ) { if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) ) { $template->assign_block_vars('switch_avatar_block', array() ); if ( $board_config['allow_avatar_upload'] && $userdata['user_allowAVupload'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_path'])) ) { if ( $form_enctype != '' ) { $template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array() ); } $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_upload', array() ); } if ( $board_config['allow_avatar_remote'] && $userdata['user_allowAVremote'] ) { $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_link', array() ); }
if ( $board_config['allow_avatar_local'] && $userdata['user_allowAVgallery'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_gallery_path'])) ) { $template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() ); } } }
# #-----[ OPEN ]------------------------------------------ #
/language/lang_english/lang_admin.php
# #-----[ FIND ]------------------------------------------ #
$lang['User_allowavatar'] = 'Can display avatar';
# #-----[ AFTER, ADD ]------------------------------------------ #
$lang['User_allowAVgallery'] = 'Can select gallery avatar'; $lang['User_allowAVremote'] = 'Can remote link an avatar'; $lang['User_allowAVupload'] = 'Can upload an avatar';
# #-----[ OPEN ]------------------------------------------ #
/templates/XXXXXX/admin/user_edit_body.tpl
# #-----[ FIND ]------------------------------------------ #
<tr> <td class="row1"><span class="gen">{L_ALLOW_AVATAR}</span></td> <td class="row2"> <input type="radio" name="user_allowavatar" value="1" {ALLOW_AVATAR_YES} /> <span class="gen">{L_YES}</span> <input type="radio" name="user_allowavatar" value="0" {ALLOW_AVATAR_NO} /> <span class="gen">{L_NO}</span></td> </tr>
# #-----[ AFTER, ADD ]------------------------------------------ #
<tr> <td class="row1"><span class="gen">{L_ALLOW_AVGALLERY}</span></td> <td class="row2"> <input type="radio" name="user_allowAVgallery" value="1" {ALLOW_AVGALLERY_YES} /> <span class="gen">{L_YES}</span> <input type="radio" name="user_allowAVgallery" value="0" {ALLOW_AVGALLERY_NO} /> <span class="gen">{L_NO}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_ALLOW_AVREMOTE}</span></td> <td class="row2"> <input type="radio" name="user_allowAVremote" value="1" {ALLOW_AVREMOTE_YES} /> <span class="gen">{L_YES}</span> <input type="radio" name="user_allowAVremote" value="0" {ALLOW_AVREMOTE_NO} /> <span class="gen">{L_NO}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_ALLOW_AVUPLOAD}</span></td> <td class="row2"> <input type="radio" name="user_allowAVupload" value="1" {ALLOW_AVUPLOAD_YES} /> <span class="gen">{L_YES}</span> <input type="radio" name="user_allowAVupload" value="0" {ALLOW_AVUPLOAD_NO} /> <span class="gen">{L_NO}</span></td> </tr>
# #-----[ SAVE & CLOSE ALL FILES ]------------------------------------------ # #End
_________________ Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF & 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 | iPhone X 256 GB & Pitaka Aramid | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA | Ubuntu Server |
|
| Stránka: 1 z 1
| [ Príspevok: 1 ] | |
Podobné témy | Témy | Odpovede | Zobrazenia | Posledný príspevok |
---|
| phpbb_users of ACP v Redakčné systémy | 3 | 408 | 13.05.2007 10:17 mokus | | Actions per Second - Metóda merania výkonu v online hrách. v Články | 0 | 934 | 03.07.2010 15:59 Mir | | COD 4 options v Počítačové hry | 2 | 469 | 07.12.2007 18:14 shiro | | AMI BIOS options v nVidia čipové sady | 4 | 1907 | 26.06.2008 21:29 5rnka | | Advanced boot options v Operačné systémy Microsoft | 2 | 426 | 24.03.2010 17:34 olsojin | | GT750M /Acer V3-772G/ HDMI, Bios advanced options, Nvidia control panel a ine... v nVidia grafické karty | 0 | 416 | 11.04.2015 13:21 ShadowSong | | avatar v Správy pre vedenie fóra | 7 | 1719 | 12.11.2010 18:32 OmeGa | | Avatar v Správy pre vedenie fóra | 2 | 2350 | 20.01.2020 14:41 Koroner | | avatar-otazka v PHP, ASP | 2 | 1013 | 08.07.2009 14:16 mark6000 | | upload avatar v Správy pre vedenie fóra | 3 | 1751 | 18.07.2006 17:27 javo | | WordPress avatar v Redakčné systémy | 3 | 810 | 04.05.2014 18:55 chrono | | Default avatar v Redakčné systémy | 0 | 1137 | 14.10.2006 14:46 JanoF | | icq avatar upload v Sieťové a internetové programy | 0 | 1085 | 07.12.2006 20:10 Fenius | | Avatar - PC hra v Predám | 6 | 341 | 22.11.2023 15:11 Tommy- T | | hra Avatar 3D v Počítačové hry | 7 | 1461 | 06.01.2010 23:34 Qpkqkma | | Avatar the Movie [ Choď na stránku: 1, 2, 3, 4, 5 ] v Kultúra, umenie, filmy, hudba, história, média | 128 | 9527 | 12.03.2010 15:57 sedlák |
| Nemôžete zakladať nové témy v tomto fóre 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
|
|