PDA

View Full Version : Private Messages Enhancements - Dump private messages and letters of visitors and reset the counters


w-elbalad.com
01-28-2010, 10:00 PM
:)
Given our need to unload the stored private messages we have for all groups with messages that the number of visitors and a large accumulated for a period of up to four years and more which is the span of the Forum and put pressure on the tables and a forum for memberships of close to 70 thousand member

Needed for the work of this product is very simple and effective

Away from the plant orders that make it difficult for some

Installation

Only the highest product you annex

And will delete all your messages (outgoing + incoming) and letters of visitors and reset counters

Then delete the product from the Control Panel Forum and keep with you for future use

Suitable for copying 3.6.x + 3.7.x + 3.8.x +4.0.x</SPAN>
Annexes 3 products
First dump private messages and visitor messages
The second dump Visitor Messages only
Third dump private messages only

The process of product 3azoob

movslow
01-29-2010, 01:31 PM
What counters does it reset?

w-elbalad.com
01-29-2010, 01:40 PM
What counters does it reset?

this XXXXXXXX/private.php?do=showpm&pmid=290
and Notifications of messages

vBRiP
06-30-2010, 08:03 PM
wow thanks, this is great, install

Binoy
11-25-2010, 09:49 PM
i installed the product.. but where in ACP can i find the options to run the product?

w-elbalad.com
11-27-2010, 01:53 AM
i installed the product.. but where in ACP can i find the options to run the product?

Just install it
and product will delete msg
after u install it u can delete product

BiZiMDiYaR
11-28-2010, 12:41 PM
would deleting the PM's make much difference.. ? last I deleted them but I didn't see much difference... it think the PM's are quite small... :)

top dogs 360
11-30-2011, 08:08 PM
This is a quick fix then to clean out messages then remove and save for later use?

MikeF
04-27-2012, 06:38 AM
empty pm vis.xml doesn't have the table prefix for PM's :( I haven't checked the others yet. Could've just posted the SQL query :) Thank you though very much.

MikeF
04-27-2012, 06:53 AM
Problem: Private messages do not get deleted when a table prefix is used for the database.
Solution: The code has been updated to include this data. I have performed this update without permission, so w-elbalad.com can do whatever he wants with it. Update the code in your XML file or download my new one.


<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="pm" active="1">
<title>Empty PMs and VMs</title>
<description>Empty PMs and VMs by installing. Original w-elbalad.com. 1.1 bugfix by Windows7Forums.com</description>
<version>1.1</version>
<codes>
<code version="1">
<installcode><![CDATA[$db->hide_errors();
$db->query_write("TRUNCATE " . TABLE_PREFIX . "pm;");
$db->query_write("TRUNCATE " . TABLE_PREFIX . "pmreceipt;");
$db->query_write("TRUNCATE " . TABLE_PREFIX . "pmtext;");
$db->query_write("TRUNCATE " . TABLE_PREFIX . "visitormessage;");
$db->query_write("TRUNCATE " . TABLE_PREFIX . "visitormessage_hash;");
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET pmtotal = '0', pmunread = '0';");
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET vmunreadcount = '0', vmmoderatedcount = '0';");
$db->errno = 0;]]></installcode>
<uninstallcode />
</code>
</codes>
<templates>
</templates>
<plugins>
</plugins>
<phrases>
</phrases>
<options>
</options>
</product>


Problem: I'd like to run it as a SQL Query from AdminCP
Solution:

Run each line separately. Remember, you can only run one line queries from AdminCP SQL. Replace prefix_ with your database prefix, or nothing at all, depending on if you are using one.

TRUNCATE `prefix_pm`;
TRUNCATE `prefix_pmtext`;
TRUNCATE `prefix_pmreceipt`;
TRUNCATE `prefix_visitormessage_hash`;
TRUNCATE `prefix_visitormessage`;
UPDATE `prefix_user` SET `pmtotal` = 0, `pmunread` = 0;
UPDATE `prefix_user` SET `vmunreadcount` = 0, `vmmoderatedcount` = 0;

Consider using phpMyAdmin or Navicat for Windows as it is much easier and you can run them all from there.

This is Mike Fara (https://mvp.support.microsoft.com/profile=9FB289F3-CF2F-4FEE-9656-0E439442484F) from Windows 7 Forums (http://windows7forums.com). I hope that this has resolved the issue for someone other than myself using a forum database prefix :) Take care, and thanks for the excellent script.