Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
0 registered members (), 63 guests, and 388 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Morgan
Morgan
Sweden
Posts: 518
Joined: June 2006
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 17
M4TT 12
FREAK 8
Ruben 8
mmkk 4
isaac 4
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
Private Message Help! #244560
07/26/11 05:21 PM
07/26/11 05:21 PM
Joined: Jan 2008
Posts: 81
Austin TX
D
DougMM Offline OP
journeyman
DougMM  Offline OP
journeyman
D
Joined: Jan 2008
Posts: 81
Austin TX
I had a spammer come to my board and his account was quickly deleted. Now I have a few members that are seeing Private Message notifications form this spammer but after the spammers account and all posts were deleted they can not view the PM's or get the PM notifications to stop. Does anyone know how I can stop the notifications for these members on my board? UBB 7.4

I have already Rebuilt private messages and that didn't help. mad

Thanks for your help

Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: Private Message Help! [Re: DougMM] #244584
07/27/11 03:58 PM
07/27/11 03:58 PM
Joined: Dec 2003
Posts: 5,827
Lutz,FL
Ruben Offline

Ruben  Offline


Joined: Dec 2003
Posts: 5,827
Lutz,FL
In your version 7.4 do you have the option.
Prune Orphaned Private Topics?
In the re builder of course.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Private Message Help! [Re: DougMM] #244586
07/27/11 06:22 PM
07/27/11 06:22 PM
Joined: Jan 2008
Posts: 81
Austin TX
D
DougMM Offline OP
journeyman
DougMM  Offline OP
journeyman
D
Joined: Jan 2008
Posts: 81
Austin TX
Just did that, waiting for feed back to see if it worked. I will let you know as soon as I find out. Thank you Ruben..

Re: Private Message Help! [Re: DougMM] #244587
07/27/11 07:40 PM
07/27/11 07:40 PM
Joined: Jan 2008
Posts: 81
Austin TX
D
DougMM Offline OP
journeyman
DougMM  Offline OP
journeyman
D
Joined: Jan 2008
Posts: 81
Austin TX
Nope still a fail, anyone else???

Re: Private Message Help! [Re: DougMM] #244591
07/28/11 03:11 AM
07/28/11 03:11 AM
Joined: Aug 2006
Posts: 1,530
Breda, NL
Yarp™ Offline
veteran
Yarp™  Offline
veteran
Joined: Aug 2006
Posts: 1,530
Breda, NL
I modified /admin/doclearcache.php with some extra cleanup code, including resetting PM counters.

just before the line:
PHP Code
$userob->clear_cached_perms(); 


I added just before that:

PHP Code
// set all PM counters to zero.
$query = "
		update	{$config['TABLE_PREFIX']}USER_PROFILE
		set	USER_TOTAL_PM=0,
			USER_PM_TOTALS=0
";
$sth = $dbh->do_query($query,__LINE__,__FILE__);

// cycle through all user ID's that have New PM's.

$query = "
	SELECT count(*) AS count, t1.USER_ID
	FROM {$config['TABLE_PREFIX']}PRIVATE_MESSAGE_USERS AS t1, 
		  {$config['TABLE_PREFIX']}PRIVATE_MESSAGE_TOPICS AS t2
	WHERE t1.TOPIC_ID = t2.TOPIC_ID
	AND   t2.TOPIC_LAST_REPLY_TIME > t1.MESSAGE_LAST_READ
	GROUP BY t1.USER_ID
";

$sti = $dbh->do_query($query,__LINE__,__FILE__);
while (list($total_unread,$PM_UserId) = $dbh -> fetch_array($sti)) {
	$query = "
		update	{$config['TABLE_PREFIX']}USER_PROFILE
		set	USER_TOTAL_PM = ?
		where	USER_ID = ?
	";
	$dbh->do_placeholder_query($query,array($total_unread,$PM_UserId),__LINE__,__FILE__);	
}

$query = "
	SELECT count( USER_ID ) AS cnt,USER_ID
	FROM ubbt_PRIVATE_MESSAGE_USERS
	GROUP BY USER_ID
";
$sti = $dbh->do_query($query,__LINE__,__FILE__);
while (list($total_PM,$PM_UserId) = $dbh -> fetch_array($sti)) {
	$query = "
		update	{$config['TABLE_PREFIX']}USER_PROFILE
		set	USER_PM_TOTALS = ?
		where	USER_ID = ?
	";
	$dbh->do_placeholder_query($query,array($total_PM,$PM_UserId),__LINE__,__FILE__);	
}
 


This will reset all PM counts, and new PM counts if you do a clear cache.


[Linked Image]
Re: Private Message Help! [Re: DougMM] #244604
07/28/11 05:05 PM
07/28/11 05:05 PM
Joined: Jan 2008
Posts: 81
Austin TX
D
DougMM Offline OP
journeyman
DougMM  Offline OP
journeyman
D
Joined: Jan 2008
Posts: 81
Austin TX
Error message!

Control panel message

--------------------------------------------------------------------------------

Control panel message
Script: /services9/webpages/util/c/a/capitalstang.site.aplus.net/public/boards/admin/doclearcache.php
Line#: 68
SQL Error: Unknown column 'USER_PM_TOTALS' in 'field list'
SQL Error #: 1054
Query: update cts_USER_PROFILE set USER_TOTAL_PM=0, USER_PM_TOTALS=0


And thank you for your help with this. It is really becoming a problem with my members.

Re: Private Message Help! [Re: DougMM] #244605
07/28/11 06:18 PM
07/28/11 06:18 PM
Joined: Jan 2008
Posts: 81
Austin TX
D
DougMM Offline OP
journeyman
DougMM  Offline OP
journeyman
D
Joined: Jan 2008
Posts: 81
Austin TX
This is what I have now that is showing the error.

<?php
// Whoops! If you see this text in your browser,
// your web hosting provider has not installed PHP.
//
// You will be unable to use UBB until PHP has been properly installed.
//
// You may wish to ask your web hosting provider to install PHP.
// Both Windows and Unix versions are available on the PHP website,
// http://www.php.net/
//
//
//
// Ultimate Bulletin Board
// Script Version 7.4
//
// Program authors: Rick Baker, Charles Capps
// Copyright (C) 2008 Groupee, Inc..
//
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// Groupee, Inc..
//
// You may make modifications, but only for your own use and
// within the confines of the UBB License Agreement
// (see our website for that).
//
// Note: If you modify ANY code within your UBB, we at Groupee, Inc
// cannot offer you support -- thus modify at your own peril smile

// Require the library
require ("../libs/admin.inc.php");
require ("../languages/{$config['LANGUAGE']}/admin/generic.php");

// -----------------
// Get the user info

$userob = new user;
$user = $userob -> authenticate("USER_DISPLAY_NAME");

$admin = new Admin;

$admin->doAuth();

$query = "
UPDATE {$config['TABLE_PREFIX']}CACHE
SET CACHE_VALUE = ''
WHERE CACHE_FIELD not in ('max_online','max_online_timestamp')
";
$sth = $dbh->do_query($query,__LINE__,__FILE__);

// Rebuild the content islands
rebuild_islands(1);

// Rebuild the rss feeds
generate_rss_feeds(1);

build_forum_cache();

// Rebuild any custom tags
build_custom_tag_cache();

// set all PM counters to zero.
$query = "
update {$config['TABLE_PREFIX']}USER_PROFILE
set USER_TOTAL_PM=0,
USER_PM_TOTALS=0
";
$sth = $dbh->do_query($query,__LINE__,__FILE__);

// cycle through all user ID's that have New PM's.

$query = "
SELECT count(*) AS count, t1.USER_ID
FROM {$config['TABLE_PREFIX']}PRIVATE_MESSAGE_USERS AS t1,
{$config['TABLE_PREFIX']}PRIVATE_MESSAGE_TOPICS AS t2
WHERE t1.TOPIC_ID = t2.TOPIC_ID
AND t2.TOPIC_LAST_REPLY_TIME > t1.MESSAGE_LAST_READ
GROUP BY t1.USER_ID
";

$sti = $dbh->do_query($query,__LINE__,__FILE__);
while (list($total_unread,$PM_UserId) = $dbh -> fetch_array($sti)) {
$query = "
update {$config['TABLE_PREFIX']}USER_PROFILE
set USER_TOTAL_PM = ?
where USER_ID = ?
";
$dbh->do_placeholder_query($query,array($total_unread,$PM_UserId),__LINE__,__FILE__);
}

$query = "
SELECT count( USER_ID ) AS cnt,USER_ID
FROM ubbt_PRIVATE_MESSAGE_USERS
GROUP BY USER_ID
";
$sti = $dbh->do_query($query,__LINE__,__FILE__);
while (list($total_PM,$PM_UserId) = $dbh -> fetch_array($sti)) {
$query = "
update {$config['TABLE_PREFIX']}USER_PROFILE
set USER_PM_TOTALS = ?
where USER_ID = ?
";
$dbh->do_placeholder_query($query,array($total_PM,$PM_UserId),__LINE__,__FILE__);
}

$userob->clear_cached_perms();

admin_log("CLEAR_CACHE","");


$admin->redirect($ubbt_lang['CACHE_CLEARED'],"{$config['BASE_URL']}/admin/cache.php",$ubbt_lang['CACHE_F_LOC']);

?>

Re: Private Message Help! [Re: DougMM] #244621
07/29/11 04:13 AM
07/29/11 04:13 AM
Joined: Aug 2006
Posts: 1,530
Breda, NL
Yarp™ Offline
veteran
Yarp™  Offline
veteran
Joined: Aug 2006
Posts: 1,530
Breda, NL
Ah, I was in kind of a doubt if USER_PM_TOTALS was in stock code er not smile

just remove this section in the code:

PHP Code
$query = "
SELECT count( USER_ID ) AS cnt,USER_ID
FROM ubbt_PRIVATE_MESSAGE_USERS
GROUP BY USER_ID
";
$sti = $dbh->do_query($query,__LINE__,__FILE__);
while (list($total_PM,$PM_UserId) = $dbh -> fetch_array($sti)) {
$query = "
update {$config['TABLE_PREFIX']}USER_PROFILE
set USER_PM_TOTALS = ?
where USER_ID = ?
";
$dbh->do_placeholder_query($query,array($total_PM,$PM_UserId),__LINE__,__FILE__);  


I use this field as I have changed the PM limit system in UBB for our board.


[Linked Image]
Re: Private Message Help! [Re: DougMM] #244622
07/29/11 04:08 PM
07/29/11 04:08 PM
Joined: Jan 2008
Posts: 81
Austin TX
D
DougMM Offline OP
journeyman
DougMM  Offline OP
journeyman
D
Joined: Jan 2008
Posts: 81
Austin TX
Thanks again has the same error but on line 69 now?

Script: /services9/webpages/util/c/a/capitalstang.site.aplus.net/public/boards/admin/doclearcache.php
Line#: 69
SQL Error: Unknown column 'USER_PM_TOTALS' in 'field list'
SQL Error #: 1054
Query: update cts_USER_PROFILE set USER_TOTAL_PM=0, USER_PM_TOTALS=0

Re: Private Message Help! [Re: DougMM] #244623
07/29/11 04:16 PM
07/29/11 04:16 PM
Joined: Dec 2003
Posts: 5,827
Lutz,FL
Ruben Offline

Ruben  Offline


Joined: Dec 2003
Posts: 5,827
Lutz,FL
With a older version. Your best bet is to open a support ticket. See if ubb can help!


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Private Message Help! [Re: DougMM] #244624
07/29/11 04:40 PM
07/29/11 04:40 PM
Joined: Jan 2008
Posts: 81
Austin TX
D
DougMM Offline OP
journeyman
DougMM  Offline OP
journeyman
D
Joined: Jan 2008
Posts: 81
Austin TX
Could this be done in phpmyadmin?


Re: Private Message Help! [Re: DougMM] #244626
07/29/11 04:54 PM
07/29/11 04:54 PM
Joined: Dec 2003
Posts: 5,827
Lutz,FL
Ruben Offline

Ruben  Offline


Joined: Dec 2003
Posts: 5,827
Lutz,FL
Yes, it probably could but it would be row by row. User by user.
But I believe there would still be pushups to perform.
Such as user cookies would not be updated.
There is a old post here.
http://www.ubbcentral.com/forums/ubbthreads.php/topics/214508/1.html
That may give you help.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: Private Message Help! [Re: DougMM] #244627
07/29/11 05:01 PM
07/29/11 05:01 PM
Joined: Aug 2006
Posts: 1,530
Breda, NL
Yarp™ Offline
veteran
Yarp™  Offline
veteran
Joined: Aug 2006
Posts: 1,530
Breda, NL
More stuff to remove smile

Entire peace of new code. Remove my previous modification and add this instead:

just before the line:
PHP Code
$userob->clear_cached_perms(); 


Add:

PHP Code
// set all PM counters to zero.
$query = "
		update	{$config['TABLE_PREFIX']}USER_PROFILE
		set	USER_TOTAL_PM=0
";
$sth = $dbh->do_query($query,__LINE__,__FILE__);

// cycle through all user ID's that have New PM's.

$query = "
	SELECT count(*) AS count, t1.USER_ID
	FROM {$config['TABLE_PREFIX']}PRIVATE_MESSAGE_USERS AS t1, 
		  {$config['TABLE_PREFIX']}PRIVATE_MESSAGE_TOPICS AS t2
	WHERE t1.TOPIC_ID = t2.TOPIC_ID
	AND   t2.TOPIC_LAST_REPLY_TIME > t1.MESSAGE_LAST_READ
	GROUP BY t1.USER_ID
";

$sti = $dbh->do_query($query,__LINE__,__FILE__);
while (list($total_unread,$PM_UserId) = $dbh -> fetch_array($sti)) {
	$query = "
		update	{$config['TABLE_PREFIX']}USER_PROFILE
		set	USER_TOTAL_PM = ?
		where	USER_ID = ?
	";
	$dbh->do_placeholder_query($query,array($total_unread,$PM_UserId),__LINE__,__FILE__);	
}
 


[Linked Image]
Re: Private Message Help! [Re: DougMM] #244628
07/29/11 05:19 PM
07/29/11 05:19 PM
Joined: Jan 2008
Posts: 81
Austin TX
D
DougMM Offline OP
journeyman
DougMM  Offline OP
journeyman
D
Joined: Jan 2008
Posts: 81
Austin TX
That last one worked with no errors Yarp but didn't clear the PM notifications. I'm logged in as a user that is having this problem and it's still flashing new PM's????


This is my updated code that I just did.


<?php
// Whoops! If you see this text in your browser,
// your web hosting provider has not installed PHP.
//
// You will be unable to use UBB until PHP has been properly installed.
//
// You may wish to ask your web hosting provider to install PHP.
// Both Windows and Unix versions are available on the PHP website,
// http://www.php.net/
//
//
//
// Ultimate Bulletin Board
// Script Version 7.4
//
// Program authors: Rick Baker, Charles Capps
// Copyright (C) 2008 Groupee, Inc..
//
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// Groupee, Inc..
//
// You may make modifications, but only for your own use and
// within the confines of the UBB License Agreement
// (see our website for that).
//
// Note: If you modify ANY code within your UBB, we at Groupee, Inc
// cannot offer you support -- thus modify at your own peril smile

// Require the library
require ("../libs/admin.inc.php");
require ("../languages/{$config['LANGUAGE']}/admin/generic.php");

// -----------------
// Get the user info

$userob = new user;
$user = $userob -> authenticate("USER_DISPLAY_NAME");

$admin = new Admin;

$admin->doAuth();

$query = "
UPDATE {$config['TABLE_PREFIX']}CACHE
SET CACHE_VALUE = ''
WHERE CACHE_FIELD not in ('max_online','max_online_timestamp')
";
$sth = $dbh->do_query($query,__LINE__,__FILE__);

// Rebuild the content islands
rebuild_islands(1);

// Rebuild the rss feeds
generate_rss_feeds(1);

build_forum_cache();

// Rebuild any custom tags
build_custom_tag_cache();

// set all PM counters to zero.
$query = "
update {$config['TABLE_PREFIX']}USER_PROFILE
set USER_TOTAL_PM=0
";
$sth = $dbh->do_query($query,__LINE__,__FILE__);

// cycle through all user ID's that have New PM's.

$query = "
SELECT count(*) AS count, t1.USER_ID
FROM {$config['TABLE_PREFIX']}PRIVATE_MESSAGE_USERS AS t1,
{$config['TABLE_PREFIX']}PRIVATE_MESSAGE_TOPICS AS t2
WHERE t1.TOPIC_ID = t2.TOPIC_ID
AND t2.TOPIC_LAST_REPLY_TIME > t1.MESSAGE_LAST_READ
GROUP BY t1.USER_ID
";

$sti = $dbh->do_query($query,__LINE__,__FILE__);
while (list($total_unread,$PM_UserId) = $dbh -> fetch_array($sti)) {
$query = "
update {$config['TABLE_PREFIX']}USER_PROFILE
set USER_TOTAL_PM = ?
where USER_ID = ?
";
$dbh->do_placeholder_query($query,array($total_unread,$PM_UserId),__LINE__,__FILE__);
}

$userob->clear_cached_perms();

admin_log("CLEAR_CACHE","");


$admin->redirect($ubbt_lang['CACHE_CLEARED'],"{$config['BASE_URL']}/admin/cache.php",$ubbt_lang['CACHE_F_LOC']);

?>

Re: Private Message Help! [Re: DougMM] #244629
07/29/11 05:26 PM
07/29/11 05:26 PM
Joined: Aug 2006
Posts: 1,530
Breda, NL
Yarp™ Offline
veteran
Yarp™  Offline
veteran
Joined: Aug 2006
Posts: 1,530
Breda, NL
hmm, that is strange.

There is some database stuff still left I think.

Just PM'd doug to avoid a chat here, if we find a solution, I will post it here.

Last edited by Yarp; 07/29/11 05:33 PM.

[Linked Image]
Re: Private Message Help! [Re: DougMM] #244630
07/29/11 06:50 PM
07/29/11 06:50 PM
Joined: Aug 2006
Posts: 1,530
Breda, NL
Yarp™ Offline
veteran
Yarp™  Offline
veteran
Joined: Aug 2006
Posts: 1,530
Breda, NL
Somehow the reply's on the spam where in the way. The spam messages themselve were deleted just fine, but 2 people replied to them, and those replies somehow were left in the database.

Cleaned it up, reran the script, and fixed.


[Linked Image]
Re: Private Message Help! [Re: Yarp™] #244631
07/29/11 07:15 PM
07/29/11 07:15 PM
Joined: Jan 2008
Posts: 81
Austin TX
D
DougMM Offline OP
journeyman
DougMM  Offline OP
journeyman
D
Joined: Jan 2008
Posts: 81
Austin TX
Originally Posted by Yarp
Somehow the reply's on the spam where in the way. The spam messages themselve were deleted just fine, but 2 people replied to them, and those replies somehow were left in the database.

Cleaned it up, reran the script, and fixed.


Thank you so much Yarp.


Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Users Unable to Upload Avatar [Not a Bug]
by M4TT. 12/13/17 08:51 AM
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
Forum Statistics
Forums36
Topics35,015
Posts190,544
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)