 |
|
|
|

| Autor |
Nachricht |
kaas
phpBB2.de User

Anmeldungsdatum: 03.02.2005
Beiträge: 20
|
Verfasst am:
Mo 17 Okt, 2005 18:05 |
  |
I need a mod which will make sure that only admins can change the profiles.
Does such a mod exist?
I have found this mod, but there is a bug in it.
You can not edit the profiles through ACP. Your changes is not being accepted.
Could it be because the mod is not written to Phpbb plus?
If so, is anyone kind to rewrite it for me.
| Code: |
###############################################
## Hack Title: Disable Profile Edit
## Hack Version: v1.0.0
## Author: Armin Altorffer, aka Kharay
## Description: With this hack you can prevent members from editting their profile.
## Compatibility: 2.0.3 - 2.0.6
##
## Installation Level: Easy
## Installation Time: 3
## Files To Edit: 5
## admin/admin_users.php
## language/xxx/lang_main.php
## language/xxx/lang_admin.php
## templates/xxx/admin/user_edit_body.tpl
## profile.php
##
## Included Files: 0
##
## History:
## v1.0.0: Done...
##
## Author Notes:
## None
##
## Support: http://www.phpbbhacks.com/forums
## Copyright: ?2003 Disable Profile Edit v1.0.0 - Armin Altorffer
##
###############################################
## 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.
###############################################
#
#-----[ SQL ]------------------------------------------
#
# Change prefix if your board's prefix is not phpbb_
ALTER TABLE phpbb_users ADD user_allow_profile TINYINT(1) DEFAULT '1' NOT NULL;
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
user_notify = $notifyreply, user_allow_pm = $user_allowpm,
#
#-----[ IN LINE, AFTER ADD ]------------------------------------------
#
user_allow_profile = $user_allow_profile,
#
#-----[ FIND ]------------------------------------------
#
$user_allowavatar = $this_userdata['user_allowavatar'];
$user_allowpm = $this_userdata['user_allow_pm'];
#
#-----[ AFTER ADD ]------------------------------------------
#
$user_allow_profile = $this_userdata['user_allow_profile'];
#
#-----[ FIND ]------------------------------------------
#
'ALLOW_PM_YES' => ($user_allowpm) ? 'checked="checked"' : '',
'ALLOW_PM_NO' => (!$user_allowpm) ? 'checked="checked"' : '',
#
#-----[ AFTER ADD ]------------------------------------------
#
'ALLOW_PROFILE_YES' => ($user_allow_profile) ? 'checked="checked"' : '',
'ALLOW_PROFILE_NO' => (!$user_allow_profile) ? 'checked="checked"' : '',
#
#-----[ FIND ]------------------------------------------
#
'L_ALLOW_PM' => $lang['User_allowpm'],
#
#-----[ AFTER ADD ]------------------------------------------
#
'L_ALLOW_PROFILE' => $lang['User_allowprofile'],
#
#-----[ OPEN ]------------------------------------------
#
language/xxx/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
#
#-----[ BEFORE ADD ]------------------------------------------
#
$lang['No_Access_Profile'] = 'You have been denied the possibility to edit your profile.';
#
#-----[ OPEN ]------------------------------------------
#
language/xxx/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE ADD ]------------------------------------------
#
$lang['User_allowprofile'] = 'Can edit profile';
#
#-----[ OPEN ]------------------------------------------
#
templates/xxx/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_PROFILE}</span></td>
<td class="row2">
<input type="radio" name="user_allow_profile" value="1" {ALLOW_PROFILE_YES} />
<span class="gen">{L_YES}</span>
<input type="radio" name="user_allow_profile" value="0" {ALLOW_PROFILE_NO} />
<span class="gen">{L_NO}</span></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
profile.php
#
#-----[ FIND ]------------------------------------------
#
//
// Start of program proper
//
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
if ( $mode == 'viewprofile' )
{
include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
exit;
}
else if ( $mode == 'editprofile' || $mode == 'register' )
{
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
{
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
}
#
#-----[ AFTER ADD ]------------------------------------------
#
if (!$userdata['user_allow_profile'])
{
message_die (GENERAL_MESSAGE, $lang['No_Access_Profile']);
}
#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
#End
|
|
|
|
   |
 |
Google
|
Verfasst am:
|
 |
|
|
 |
kaas
phpBB2.de User

Anmeldungsdatum: 03.02.2005
Beiträge: 20
|
Verfasst am:
Di 18 Okt, 2005 17:59 |
  |
Anybody?  |
|
|
   |
 |
kaas
phpBB2.de User

Anmeldungsdatum: 03.02.2005
Beiträge: 20
|
Verfasst am:
Fr 21 Okt, 2005 12:15 |
  |
|
   |
 |
|
|
|
|
|
Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
|
|
| |