Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
Delete User and post mod
Post new topic   Reply to topic View previous topic :: View next topic
Goto page: 1, 2  Next
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
Delete User and post mod
PostPosted: 05/28/2007 5:20 PM Reply with quote
Citation
KeeKee
Citation
Posts 940
Word Cnt. 48,215
BDay Mar 4
Sign Pisces
Sex Sex:Female
Joined: Mar 20, 2006
Local time: 12:41 PM
usaCa.gif
I'm not familliar enough with copy commands to fix this on my own.
I'm hoping this mod is not too messed up to be used as the intent is great when you have a spammer put multiple post on multiple fourms.

Error: Critical Error

Could not perform improperly formed COPY command.
root/userdel.php
MOD script line #44 ::

Code:
##############################################################
## MOD Title: Admin delete user with all postings (from profile_view)
## MOD Author: Sergei Sekirin <sergei-vs@mail.ru>
## MOD Description: MOD enables admin to delete all user topics in these ways:
##                  1. Delete User only (his - her topics and posts stay on board)
##                  2. Delete User started topics and posts (even those of other users) in them
##                  3. Delete User and All his (her) postings from board
##                  All stats of forums, users and topics posts are resynced consecutively
##
## MOD Version: v.1.0.5
##
## Installation Level: Simple
## Installation Time: 2 Minutes
## Files To Edit: 3
##                profile.php
##                includes/usercp_viewprofile.php
##                templates/subSilver/profile_view_body.tpl
## Included Files: 4
##                userdel.php
##                includes/functions_userdel.php
##          language/lang_english/lang_user_delete.php
##                templates/subSilver/user_delete_body.tpl
##
##############################################################
## MOD History:
##
##   17.02.2006 - Version 1.0.0 - DEV not BETA :-)))
##   18.02.2006 - Version 1.0.1 - BETA
##              - bugfix: fixed resync forum function  on deletion of single topic in forum (count = 0 gived error)
##   19.02.2006 - Version 1.0.2 - BETA
##           -  bugfix:  was not resyncing of posts on deletion of topic, where were this User posts and nothing else
##   28.02.2006 - Version 1.0.3 (release)
##              - restyled for better look
##              - all messages to admin now come from lang_files, not from script itself - for better location of MODE if anyone wanted it
##   02.03.2006 - Version 1.0.4
##              - bug found in this installation instruction that could be seen only by gests - not by admin developer :-)
##   18.08.2006 - Version 1.0.5
##              - option added: admin can delete only all postings of user (the user will stay on forum)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------
#
# IMPORTANT  NOTE: if your board's admins langs differ - you must put localized script lang_user_delete.php
#                               to each lang folder, f.e. root/language/lang_russian etc.
#
   root/userdel.php
   root/includes/functions_userdel.php
   root/language/lang_english/lang_user_delete.php
   root/templates/subSilver/user_delete_body.tpl
#
#-----[ OPEN ]------------------------------------------
#

profile.php

#
#-----[ FIND ]------------------------------------------
#

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// End session management
//


#
#-----[ AFTER, ADD ]------------------------------------------
#

//
// START - MOD - Admin delete user with all postings v.1.0.5
//
if( $userdata['session_logged_in']  &&  $userdata['user_level'] == ADMIN )
{
   include($phpbb_root_path.'language/lang_' . $userdata['user_lang'] . '/lang_user_delete.'.$phpEx);
}
//
// END - MOD - Admin delete user with all postings v.1.0.5
//

#
#-----[ OPEN ]------------------------------------------
#

includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------
#

//
// Generate page
//
$page_title = $lang['Viewing_profile'];

#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// START - MOD - Admin delete user with all postings v.1.0.5
//

$user_id=$userdata['user_id'];
if ( $userdata['user_level'] == ADMIN )
{
   $userdelete = "<form action=\"userdel.php\"" . " method=\"post\" name=\"del_user\">";
    {
     $userdelete .= "<tr><td><select name=\"delete_mode\">
      <option value=\"1\">" . $lang['User_only'] ."</option>
      <option value=\"2\">" . $lang['User_and_topics'] . "</option>
      <option value=\"3\">" . $lang['User_and_all_postings'] . "</option>
      <option value=\"4\">" . $lang['User_stay_postings_delete'] . "</option>
      </select>";
         $userdelete .= "<input type=\"submit\" name=\"del_user\" class=\"mainoption\" value=\"" . $lang['Delete'] . "\" />";
         $userdelete .= "<input type=\"hidden\" name=\"user_deleted_id\" value=\"" . $profiledata['user_id'] . "\" />";
   }
   $userdelete .= "</form>";

    $template->assign_block_vars("admin_delete_this_user", array(
          'DELETE_USER_FORM' => $userdelete
          ));
}
//
// END -  MOD - Admin delete user with all postings v.1.0.5
//

#
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/profile_view_body.tpl

#
#-----[ FIND ]------------------------------------------
#

<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
   <td align="right"><span class="nav"><br />{JUMPBOX}</span></td>
  </tr>
</table>

#
#-----[ BEFORE  or AFTER, ADD ]----------------------------------------
#
<!-- BEGIN admin_delete_this_user -->
<div align="center">
{admin_delete_this_user.DELETE_USER_FORM}
</div>
<!-- END admin_delete_this_user -->

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




# ====================== [ NOTE ] ======================================


# I've made it that not allowed to delete admins and moderators by this MOD. If you still want it to do, make this:
#
#-----[ OPEN ]------------------------------------------
#

root/userdel.php

#
#-------------  FIND and DELETE ------------------------
#

   if (($row['user_level'] == 1) || ($row['user_level'] == 2) || ($row['user_id'] == -1))
   {
       message_die(GENERAL_MESSAGE, $lang['Moderator_not_deletable']);
   }

#
#-----[ SAVE/CLOSE ALL FILES ]-------------------------
#
# EoM - Now You may delete yourself :-)))
Back to Top
View user's profile Find all posts by KeeKee Send private message   Visit poster's website Yahoo Messenger Phoogle Map ICQ Number
Re: Delete User and post mod
PostPosted: 05/29/2007 3:14 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 1:41 PM
Location: St Pete, FL
peace.gif
Try this EM Friendly version of the MOD script...

Code:
##############################################################
## MOD Title: Admin delete user with all postings (from profile_view) - EM Friendly
## MOD Author: Sergei Sekirin <sergei-vs@mail.ru>
## MOD Description: MOD enables admin to delete all user topics in these ways:
##                  1. Delete User only (his - her topics and posts stay on board)
##                  2. Delete User started topics and posts (even those of other users) in them
##                  3. Delete User and All his (her) postings from board
##                  All stats of forums, users and topics posts are resynced consecutively
##
## MOD Version: v.1.0.5
##
## Installation Level: Simple
## Installation Time: 2 Minutes
## Files To Edit: 3
##                profile.php
##                includes/usercp_viewprofile.php
##                templates/subSilver/profile_view_body.tpl
## Included Files: 4
##                userdel.php
##                includes/functions_userdel.php
##          language/lang_english/lang_user_delete.php
##                templates/subSilver/user_delete_body.tpl
##
##############################################################
## MOD History:
##
##   17.02.2006 - Version 1.0.0 - DEV not BETA :-)))
##   18.02.2006 - Version 1.0.1 - BETA
##              - bugfix: fixed resync forum function  on deletion of single topic in forum (count = 0 gived error)
##   19.02.2006 - Version 1.0.2 - BETA
##           -  bugfix:  was not resyncing of posts on deletion of topic, where were this User posts and nothing else
##   28.02.2006 - Version 1.0.3 (release)
##              - restyled for better look
##              - all messages to admin now come from lang_files, not from script itself - for better location of MODE if anyone wanted it
##   02.03.2006 - Version 1.0.4
##              - bug found in this installation instruction that could be seen only by gests - not by admin developer :-)
##   18.08.2006 - Version 1.0.5
##              - option added: admin can delete only all postings of user (the user will stay on forum)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------
#
# IMPORTANT  NOTE: if your board's admins langs differ - you must put localized script lang_user_delete.php
#                               to each lang folder, f.e. root/language/lang_russian etc.
#
copy root/userdel.php to userdel.php
copy root/includes/functions_userdel.php to includes/functions_userdel.php
copy root/language/lang_english/lang_user_delete.php to language/lang_english/lang_user_delete.php
copy root/templates/subSilver/user_delete_body.tpl to templates/subSilver/user_delete_body.tpl
#
#-----[ OPEN ]------------------------------------------
#
profile.php
#
#-----[ FIND ]------------------------------------------
#
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------------
#

//
// START - MOD - Admin delete user with all postings v.1.0.5
//
if( $userdata['session_logged_in']  &&  $userdata['user_level'] == ADMIN )
{
   include($phpbb_root_path.'language/lang_' . $userdata['user_lang'] . '/lang_user_delete.'.$phpEx);
}
//
// END - MOD - Admin delete user with all postings v.1.0.5
//

#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
//
// Generate page
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// START - MOD - Admin delete user with all postings v.1.0.5
//

$user_id=$userdata['user_id'];
if ( $userdata['user_level'] == ADMIN )
{
   $userdelete = "<form action=\"userdel.php\"" . " method=\"post\" name=\"del_user\">";
    {
     $userdelete .= "<tr><td><select name=\"delete_mode\">
      <option value=\"1\">" . $lang['User_only'] ."</option>
      <option value=\"2\">" . $lang['User_and_topics'] . "</option>
      <option value=\"3\">" . $lang['User_and_all_postings'] . "</option>
      <option value=\"4\">" . $lang['User_stay_postings_delete'] . "</option>
      </select>";
         $userdelete .= "<input type=\"submit\" name=\"del_user\" class=\"mainoption\" value=\"" . $lang['Delete'] . "\" />";
         $userdelete .= "<input type=\"hidden\" name=\"user_deleted_id\" value=\"" . $profiledata['user_id'] . "\" />";
   }
   $userdelete .= "</form>";

    $template->assign_block_vars("admin_delete_this_user", array(
          'DELETE_USER_FORM' => $userdelete
          ));
}
//
// END -  MOD - Admin delete user with all postings v.1.0.5
//

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{JUMPBOX}
</tr>
</table>
#
#-----[ AFTER, ADD ]----------------------------------------
#
<!-- BEGIN admin_delete_this_user -->
<div align="center">
{admin_delete_this_user.DELETE_USER_FORM}
</div>
<!-- END admin_delete_this_user -->

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

headbang


Last edited by Nightrider on 06/16/2007 3:14 AM; edited 1 time in total
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Delete User and post mod
PostPosted: 06/15/2007 9:48 PM Reply with quote
Citation
KeeKee
Citation
Posts 940
Word Cnt. 48,215
BDay Mar 4
Sign Pisces
Sex Sex:Female
Joined: Mar 20, 2006
Local time: 12:41 PM
usaCa.gif
I installed this on teh test board without any problems with your re-write but I'll be darned if I can figure out where to go to use it  dontknow

I thought it would be at the bottom of profile where the usual delete user is but I don't see anything extra there.
Back to Top
View user's profile Find all posts by KeeKee Send private message   Visit poster's website Yahoo Messenger Phoogle Map ICQ Number
Re: Delete User and post mod
PostPosted: 06/16/2007 3:13 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 1:41 PM
Location: St Pete, FL
peace.gif
Here's the reason why you can't see it.  This would be an unrecognized command in EM, so this part of the code would never have been added to your Profile View page:

Code:
#
#-----[ BEFORE  or AFTER, ADD ]----------------------------------------
#
<!-- BEGIN admin_delete_this_user -->
<div align="center">
{admin_delete_this_user.DELETE_USER_FORM}
</div>
<!-- END admin_delete_this_user -->

You should Restore the EM Backups and correct this to read something like this:

Code:
#
#-----[ AFTER, ADD ]----------------------------------------
#
<!-- BEGIN admin_delete_this_user -->
<div align="center">
{admin_delete_this_user.DELETE_USER_FORM}
</div>
<!-- END admin_delete_this_user -->

I just corrected the EM Friendly copy of the MOD script above.  I can't believe that I missed that part...

Shocked
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Delete User and post mod
PostPosted: 07/01/2007 2:44 PM Reply with quote
Citation
KeeKee
Citation
Posts 940
Word Cnt. 48,215
BDay Mar 4
Sign Pisces
Sex Sex:Female
Joined: Mar 20, 2006
Local time: 12:41 PM
usaCa.gif
It's still not showing up. There is too much coding I don't understand in that form part for me to mess with it alone so if you don't mind please look at it again.
Back to Top
View user's profile Find all posts by KeeKee Send private message   Visit poster's website Yahoo Messenger Phoogle Map ICQ Number
Re: Delete User and post mod
PostPosted: 07/01/2007 5:29 PM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 6:41 PM
Location: Birmingham, UK.
greatbrE.gif
KeeKee, maybe the EM mod that Nightrider did for you isn't working properly because you have a different version of phpBB to the one Nightrider users? Or you have extra mods installed on your forum that Nightrider doesn't have which could make the mod Nightrider did incompatible with your forum. If so, you might want to go through the mod yourself checking the files EMs going to modify and make sure that EM is modifying the right coding etc.

Anyway, I remeber installing this mod a month ago or so though and it installed fine after correcting the commands etc.

You can try this one if you like

Code:
##############################################################
## MOD Title: Admin delete user with all postings (from profile_view)
## MOD Author: Sergei Sekirin <sergei-vs@mail.ru>
## MOD Description: MOD enables admin to delete all user topics in these ways:
##                  1. Delete User only (his - her topics and posts stay on board)
##                  2. Delete User started topics and posts (even those of other users) in them
##                  3. Delete User and All his (her) postings from board
##                  All stats of forums, users and topics posts are resynced consecutively
##
## MOD Version: v.1.0.5
##
## Installation Level: Simple
## Installation Time: 2 Minutes
## Files To Edit: 3
##                profile.php
##                includes/usercp_viewprofile.php
##                templates/subSilver/profile_view_body.tpl
## Included Files: 4
##                userdel.php
##                includes/functions_userdel.php
##        language/lang_english/lang_user_delete.php
##                templates/subSilver/user_delete_body.tpl
##
##############################################################
## MOD History:
##
##   17.02.2006 - Version 1.0.0 - DEV not BETA :-)))
##   18.02.2006 - Version 1.0.1 - BETA
##              - bugfix: fixed resync forum function  on deletion of single topic in forum (count = 0 gived error)
##   19.02.2006 - Version 1.0.2 - BETA
##         -  bugfix:  was not resyncing of posts on deletion of topic, where were this User posts and nothing else
##   28.02.2006 - Version 1.0.3 (release)
##              - restyled for better look
##              - all messages to admin now come from lang_files, not from script itself - for better location of MODE if anyone wanted it
##   02.03.2006 - Version 1.0.4
##              - bug found in this installation instruction that could be seen only by gests - not by admin developer :-)
##   18.08.2006 - Version 1.0.5
##              - option added: admin can delete only all postings of user (the user will stay on forum)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------
#
   userdel.php to userdel.php
   root/includes/functions_userdel.php to includes/functions_userdel.php
   root/language/lang_english/lang_user_delete.php to language/lang_english/lang_user_delete.php
   root/templates/subSilver/user_delete_body.tpl to templates/subSilver/user_delete_body.tpl
#
#-----[ OPEN ]------------------------------------------
#

profile.php

#
#-----[ FIND ]------------------------------------------
#

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// End session management
//


#
#-----[ AFTER, ADD ]------------------------------------------
#

//
// START - MOD - Admin delete user with all postings v.1.0.5
//
if( $userdata['session_logged_in']  &&  $userdata['user_level'] == ADMIN )
{
   include($phpbb_root_path.'language/lang_' . $userdata['user_lang'] . '/lang_user_delete.'.$phpEx);
}
//
// END - MOD - Admin delete user with all postings v.1.0.5
//

#
#-----[ OPEN ]------------------------------------------
#

includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------
#

//
// Generate page
//
$page_title = $lang['Viewing_profile'];

#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// START - MOD - Admin delete user with all postings v.1.0.5
//

$user_id=$userdata['user_id'];
if ( $userdata['user_level'] == ADMIN )
{
   $userdelete = "<form action=\"userdel.php\"" . " method=\"post\" name=\"del_user\">";
    {
     $userdelete .= "<tr><td><select name=\"delete_mode\">
      <option value=\"1\">" . $lang['User_only'] ."</option>
      <option value=\"2\">" . $lang['User_and_topics'] . "</option>
      <option value=\"3\">" . $lang['User_and_all_postings'] . "</option>
      <option value=\"4\">" . $lang['User_stay_postings_delete'] . "</option>
      </select>";
         $userdelete .= "<input type=\"submit\" name=\"del_user\" class=\"mainoption\" value=\"" . $lang['Delete'] . "\" />";
         $userdelete .= "<input type=\"hidden\" name=\"user_deleted_id\" value=\"" . $profiledata['user_id'] . "\" />";
   }
   $userdelete .= "</form>";

    $template->assign_block_vars("admin_delete_this_user", array(
          'DELETE_USER_FORM' => $userdelete
          ));
}
//
// END -  MOD - Admin delete user with all postings v.1.0.5
//

#
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/profile_view_body.tpl

#
#-----[ FIND ]------------------------------------------
#

<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
   <td align="right"><span class="nav"><br />{JUMPBOX}</span></td>
  </tr>
</table>

#
#-----[ AFTER, ADD ]----------------------------------------
#
<!-- BEGIN admin_delete_this_user -->
<div align="center">
{admin_delete_this_user.DELETE_USER_FORM}
</div>
<!-- END admin_delete_this_user -->

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


Once installed ok you should get a box appear underneath the profile window - see red arrow (you cant bloody miss it heh) headbang
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: Delete User and post mod
PostPosted: 07/01/2007 5:34 PM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 6:41 PM
Location: Birmingham, UK.
greatbrE.gif
Also, id upload the files yourself too just in case EM didn't upload all of them for you. If your asked to overwrite just overwrite them at least you know they’ve all uploaded then.

I mean like I've just checked to see if you have userdel.php @ your forums root but you don't http://care-away.com/forums/userdel.php

That's proberly because you've removed the mod since the though
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: Delete User and post mod
PostPosted: 07/01/2007 6:08 PM Reply with quote
Citation
KeeKee
Citation
Posts 940
Word Cnt. 48,215
BDay Mar 4
Sign Pisces
Sex Sex:Female
Joined: Mar 20, 2006
Local time: 12:41 PM
usaCa.gif
Chris you would have had to go deeper there are 6 forums in that folder.
The file is there I checked.

I'll check out what you have posted.
Back to Top
View user's profile Find all posts by KeeKee Send private message   Visit poster's website Yahoo Messenger Phoogle Map ICQ Number
Re: Delete User and post mod
PostPosted: 07/02/2007 2:09 AM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 6:41 PM
Location: Birmingham, UK.
greatbrE.gif
Ok.

I forgot to post the pic.

Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: Delete User and post mod
PostPosted: 07/02/2007 1:29 PM Reply with quote
Citation
KeeKee
Citation
Posts 940
Word Cnt. 48,215
BDay Mar 4
Sign Pisces
Sex Sex:Female
Joined: Mar 20, 2006
Local time: 12:41 PM
usaCa.gif
Looking at the pic...I have the report post mod but I noticed you have a Report User there....Hard to put in? SQL changes? Worth it?
Back to Top
View user's profile Find all posts by KeeKee Send private message   Visit poster's website Yahoo Messenger Phoogle Map ICQ Number
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
All times are GMT - 5 Hours
Goto page: 1, 2  Next
Page 1 of 2


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.1093s (PHP: 72% - SQL: 28%) - SQL queries: 57 - GZIP disabled - Debug on