[BETA] Simple Ignore 1.4.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
aboyd
Registered User
Posts: 193
Joined: Mon May 10, 2004 7:30 pm
Location: USA
Contact:

Post 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
User avatar
aboyd
Registered User
Posts: 193
Joined: Mon May 10, 2004 7:30 pm
Location: USA
Contact:

Post 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
Ravenhearte
Registered User
Posts: 96
Joined: Fri Oct 10, 2003 3:45 pm
Location: Just this side of sane.
Contact:

Post 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.
User avatar
aboyd
Registered User
Posts: 193
Joined: Mon May 10, 2004 7:30 pm
Location: USA
Contact:

Post 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
raven007
Registered User
Posts: 82
Joined: Tue May 17, 2005 9:19 pm

Post 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
raven007
Registered User
Posts: 82
Joined: Tue May 17, 2005 9:19 pm

Post 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
Last edited by raven007 on Wed Aug 03, 2005 4:04 am, edited 2 times in total.
raven007
Registered User
Posts: 82
Joined: Tue May 17, 2005 9:19 pm

Post by raven007 »

does anyone know how to MOD PMS so they show the IGNORE button there too?
raven007
Registered User
Posts: 82
Joined: Tue May 17, 2005 9:19 pm

Post by raven007 »

does anyone know how to MOD PMS so they show the IGNORE button there too?
User avatar
aboyd
Registered User
Posts: 193
Joined: Mon May 10, 2004 7:30 pm
Location: USA
Contact:

Post 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
anothername
Registered User
Posts: 31
Joined: Wed Aug 03, 2005 1:36 pm
Contact:

Post 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.
leecovuk
Registered User
Posts: 166
Joined: Mon Apr 11, 2005 2:11 pm

Post 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
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3542
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

Try this ignore mod -->> http://www.phpbb.com/phpBB/viewtopic.php?t=215163

It supports PM's.
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
leecovuk
Registered User
Posts: 166
Joined: Mon Apr 11, 2005 2:11 pm

Post by leecovuk »

thanks, I'll have a look at it.
reggien
Registered User
Posts: 84
Joined: Sat Feb 12, 2005 5:59 am

Post 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?
NoDeity
Registered User
Posts: 150
Joined: Thu Jul 17, 2003 9:43 am
Name: Brad Reddekopp

Post 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.
Post Reply

Return to “[2.0.x] MODs in Development”