Page 6 of 8

Posted: Wed Jul 06, 2005 8:33 am
by aboyd
Uhhhh, OK, followup. Bug report. I used EasyMod 0.2.0a to install your mod, and it made all the changes without complaining. However, after that I went to the board to try it out, and got this message:

Code: Select all

Parse error: parse error, unexpected T_VARIABLE in /home/outshine/public_html/forums/language/lang_english/lang_main.php on line 285
I don't think that qualifies as a grammatical error, so I'm going to assume you don't know about it yet. Anyway, the problem is in the install file around line 311, where you have this:

Code: Select all

#-----[ BEFORE, ADD ]------------------------------------------ 
#
$lang['Is_ignored'] = ' Is On Your Ignore List.'
If you'll notice, there is no semicolon to terminate the line. You'll need to fix that before you submit it as an official mod.

Also, I note that there is another, third, "ignore users" type mod. It was written as a fork of your own mod, from back when you didn't have a lot of activity here. Of course, now THAT mod doesn't have any activity. After your mod is official, you might want to search for it and scavenge out any good code there, too.

-Tony

Posted: Wed Jul 06, 2005 8:47 am
by aboyd
Gaaah. OK, third and final post, I swear. At some point, you should also change the SQL that you use to create your table. Change it to this:

Code: Select all

CREATE TABLE phpbb_ignoreuser (
  user_id mediumint(9) NOT NULL,
  ignored_id mediumint(9) NOT NULL,
  KEY user_id (user_id)
) TYPE=MyISAM;
Things will go more quickly. Admins of heavy-traffic boards will thank you for it.

-Tony

Posted: Fri Jul 22, 2005 8:44 am
by Ravenhearte
Wow. Useful feedback! Thanks, I think you're right about the new feature bit, I'll get this baby into the database and then see about expanding it.

Posted: Sun Jul 24, 2005 6:37 pm
by aboyd
Bugfix. I have a user who complained that he was getting errors when he tried to send a private message. Go into the mod text and find this:

Code: Select all

# 
#-----[ OPEN ]------------------------------------------ 
# 
privmsg.php
# 
#-----[ FIND ]------------------------------------------ 
#
	if ( $submit )
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
	//Get user ignore settings 
	$sql = "SELECT ignored_id FROM " . IGNORE_TABLE . "ignoreuser WHERE user_id = " . $userdata[user_id]; 
That last line has both "IGNORE_TABLE" and "ignoreuser" -- it should only have IGNORE_TABLE.

-Tony

Posted: Tue Aug 02, 2005 5:36 pm
by raven007
still having problems
first i used

CREATE TABLE phpbb_ignoreuser (
user_id mediumint(9) NOT NULL,
ignored_id mediumint(9) NOT NULL,
KEY user_id (user_id)
) TYPE=MyISAM;

to create the tables

and am using

$sql = "SELECT ignored_id FROM " . IGNORE_TABLE . " WHERE user_id = " . $userdata[user_id];

however i am still recieving PM'S from ignored memeber...
ok say i put BOB on my ignorelist, i am still able to recive PM'S from him, but when i try to reply i get "this user on ignore list...etc", why doesnt this work for the other way round? In that stopping BOB from sending me PM'S

Posted: Tue Aug 02, 2005 8:06 pm
by raven007
ok got it working, now when person A ignores you the other person and you cant keep sending PM's to each other

//Get user ignore settings
$sql = "SELECT ignored_id FROM " . IGNORE_TABLE . " WHERE user_id = " . $userdata[user_id];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error retrieving ignore user data', '', __LINE__, __FILE__, $sql);
}
$ignored_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$ignored_ids[$row['ignored_id']] = true;
}


$sql = "SELECT user_id FROM " . IGNORE_TABLE . " WHERE ignored_id = " . $userdata[user_id];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error retrieving ignore user data', '', __LINE__, __FILE__, $sql);
}
$ignored_ids2 = array();
while( $row = $db->sql_fetchrow($result) )
{
$ignored_ids2[$row['user_id']] = true;
}

//end ignore


and modify

if ( (isset($ignored_ids[$to_userdata['user_id']]) && $ignored_ids[$to_userdata['user_id']]) || (isset($ignored_ids2[$to_userdata['user_id']]) && $ignored_ids2[$to_userdata['user_id']]) )

the items in BOLD are the things you will need to add

Posted: Tue Aug 02, 2005 8:12 pm
by raven007
does anyone know how to MOD PMS so they show the IGNORE button there too?

Posted: Tue Aug 02, 2005 9:57 pm
by raven007
does anyone know how to MOD PMS so they show the IGNORE button there too?

Posted: Wed Aug 03, 2005 3:55 am
by aboyd
The PM is just another file, isn't it? Should be just as easy to mod as the other files. I'll try adding your changes soon, and see if everything works, and if there is anything easy & obvious to fix or add.

BTW, I changed some of your install file around so that it would be EasyMod compliant. However, that's all right out the window now that there are new changes. After all the changes, I can give you a new copy.

-Tony

Posted: Tue Aug 16, 2005 1:38 pm
by anothername
I'm really looking forward to this, but I want to wait for validation (not much or a risk taker I guess). Great work.

Posted: Fri Sep 09, 2005 5:24 pm
by leecovuk
hello everyone,

I need something like this but I am concerned after reading this thread that this mod may be a bit buggy and not be quite what I need.

However, maybe you can give me some insight or knowledge;

All I really want to do, is provide my users with the option to ignore Private Messages from any selected users, and thereby automatically set up a mutual block the other way as well to prevent one-sided harrassment.
If and when the originator of the block chooses to unignore the user, then normal PM traffic between the two will be restored.
However it must not be possible to block board admin or moderators.

What I don't want is for users to have to select an overall block whereby an ignored user's posts are blocked as well as PM's. This is because I feel ignoring the posts of potentially a large amount of users will make the flow of threads hard to follow. I would rather use other disciplinary techniques to address trolling or harrassment on actual forum posts.

Thanks for any thoughts or advice here on if/how my aim is achievable.

lee

Posted: Fri Sep 09, 2005 5:35 pm
by bonelifer
Try this ignore mod -->> http://www.phpbb.com/phpBB/viewtopic.php?t=215163

It supports PM's.

Posted: Fri Sep 09, 2005 5:39 pm
by leecovuk
thanks, I'll have a look at it.

Posted: Thu Sep 22, 2005 3:17 am
by reggien
raven007 wrote: ok got it working, now when person A ignores you the other person and you cant keep sending PM's to each other

//Get user ignore settings
$sql = "SELECT ignored_id FROM " . IGNORE_TABLE . " WHERE user_id = " . $userdata[user_id];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error retrieving ignore user data', '', __LINE__, __FILE__, $sql);
}
$ignored_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$ignored_ids[$row['ignored_id']] = true;
}


$sql = "SELECT user_id FROM " . IGNORE_TABLE . " WHERE ignored_id = " . $userdata[user_id];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error retrieving ignore user data', '', __LINE__, __FILE__, $sql);
}
$ignored_ids2 = array();
while( $row = $db->sql_fetchrow($result) )
{
$ignored_ids2[$row['user_id']] = true;
}

//end ignore


and modify

if ( (isset($ignored_ids[$to_userdata['user_id']]) && $ignored_ids[$to_userdata['user_id']]) || (isset($ignored_ids2[$to_userdata['user_id']]) && $ignored_ids2[$to_userdata['user_id']]) )

the items in BOLD are the things you will need to add


Cheers for the bug fix raven007, my pm system is working again. With your last modified code though, which file would I find that in?

Posted: Sat Mar 11, 2006 8:06 am
by NoDeity
Does this mod let users ignore admins and moderators?
Does it let moderators and admins ignore users?

If not, can you make it so the admin can specify whether or not that behavior is allowed?

If so, thank you and please don't change it unless you make that aspect of it admin-configurable.

I realize that the admins of most boards don't want to let users to ignore moderators or let moderators ignore users but I do want to be able to allow that on my board.