Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Auto Prune dump file
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Auto Prune dump file
What sort of information do you want in the file?
Here's a way to save the user info to the DB.

  1. Make a copy of the structure of the users table, with phpMyAdmin (or whatever you use to administrate your MySQL).  Call this copied table mybb_users_pruned (replace "mybb_" with your table prefix)
  2. In the copied table, edit the uid field - remove it's auto_increment.
  3. In /inc/plugins/autoprune.php, find:

    PHP Code:
    $uid_list = implode(',', $uids);

    After, add:

    PHP Code:
    		$query = $db->simple_select(TABLE_PREFIX.'users', '*', 'uid IN ('.$uid_list.')');
    		while($user = $db->fetch_array($query))
    			$db->insert_query(TABLE_PREFIX.'users_pruned', $user);



When the users are pruned, they'll be added to the new table before deleting.

My Blog
02-02-2008 07:37 PM
Find all posts by this user

« Next Oldest | Next Newest »

Messages In This Thread
Auto Prune dump file - Shemo - 02-01-2008, 05:53 PM
RE: Auto Prune dump file - ZiNgA BuRgA - 02-02-2008 07:37 PM
RE: Auto Prune dump file - Shemo - 02-03-2008, 04:40 AM
RE: Auto Prune dump file - ZiNgA BuRgA - 02-03-2008, 11:17 AM
RE: Auto Prune dump file - Shemo - 02-03-2008, 02:25 PM
RE: Auto Prune dump file - ZiNgA BuRgA - 02-03-2008, 02:48 PM

 Standard Tools
Forum Jump: