[BETA] Ignore Suite 1.1.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
oopanda
Registered User
Posts: 40
Joined: Sun May 14, 2006 8:55 pm

Post by oopanda »

Great mod nfs. Everything worked fine I just had to manually edit my templates and add new buttons to match my style. Other than that, everything works great. :)
Stefani
Registered User
Posts: 58
Joined: Tue Aug 19, 2003 7:55 pm

Post by Stefani »

Can you share with me your code in your privmsg.php?

I am having problems. What does your second added code look like? I can't figure it out and am getting parse errors. Thanks in advance.
Stefani
Registered User
Posts: 58
Joined: Tue Aug 19, 2003 7:55 pm

Post by Stefani »

Fixed it. There was an extra ) in there! NFS, after

Code: Select all

['Has_ignored'];
you had this:

Code: Select all

['Has_ignored']);
Here is the new code that worked for me.

Code: Select all

			if ( !($result = $db->sql_query($sql)) )
			{
				$error = TRUE;
				$error_msg = $lang['No_such_user'];
			}

if ( $userdata['user_level'] == USER && isset($ignored_ids[$to_userdata['user_id']]) && $ignored_ids[$to_userdata['user_id']] ) 
			{
				$error = TRUE;
				$error_msg = $lang['Has_ignored']; 
			}
			

			if (!($to_userdata = $db->sql_fetchrow($result)))
			{
				$error = TRUE;
				$error_msg = $lang['No_such_user'];
			}
nfs
Registered User
Posts: 49
Joined: Mon May 16, 2005 10:04 pm

Post by nfs »

Stefani wrote: There was an extra ) in there!

Quite right. I don't know how that snuck in there. The zipfile has been replaced.
yellashaker
Registered User
Posts: 75
Joined: Fri Mar 31, 2006 7:09 pm
Location: Salt Lake City
Contact:

Post by yellashaker »

I think I'm going to try this out now... I have a small board and already one person is being harassed enough to need it. I don't like banning people and he won't learn with the troll mod... so here I go!!!

w00t!


***edit***

Here I am an hour and 45min into it.... checked the SQL, checked the install..... keep getting this.....

Code: Select all

Error getting ignore listing

DEBUG MODE

SQL Error : 1146 Table 'unfougiv_phpb1.IGNORE_TABLE' doesn't exist

SELECT i.ignored_id, u.username, u.user_id FROM phpbb_users u, IGNORE_TABLE i WHERE i.user_id = 51 AND u.user_id = i.ignored_id

Line : 97
File : ignore.php
I need help cause I'm php and SQL stupid... Image



***Last Edit***

Okay I'm a dumb****

I tried a new way of holding files for backups and ones I was working on.... Unfortunately the names got switched and I only uploaded half the edited files..... I'll chalk it up to "i'm not supposed to be up this late."
Image
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Post by IPB_Refugee »

Hello,

first of all thanks a lot for this great mod! :P

Unfortunately I´ve got a problem with it: User A still can send PMs to user B although A is ignored by B.

Maybe the problem is due to this line:

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
			$to_userdata = $db->sql_fetchrow($result)
#
#-----[ BEFORE, ADD ]------------------------------------------
#
			if ( $userdata['user_level'] == USER && isset($ignored_ids[$to_userdata['user_id']]) && $ignored_ids[$to_userdata['user_id']] )
			{
				$error = TRUE;
				$error_msg = $lang['Has_ignored'];
In my privmsg.php there is no line

Code: Select all

			$to_userdata = $db->sql_fetchrow
but only

Code: Select all

			if (!($to_userdata = $db->sql_fetchrow($result)))
I have added the code above the line mentioned. You can see my full privmsg.php here:

http://home.twin.at/wolfgang/privmsg.txt

Your help would be very appreciated!

Greetings from Austria!
Wolfgang
NoDeity
Registered User
Posts: 150
Joined: Thu Jul 17, 2003 9:43 am
Name: Brad Reddekopp

Post by NoDeity »

Would it be feasible to add the option to ignore a particular guest based on cookies or IP?
dkinzer
Registered User
Posts: 21
Joined: Mon Sep 05, 2005 3:20 am
Location: Portland, OR

Post by dkinzer »

This is an excellent mod. I have the Mail2Forum and Digests mods installed on my site and have modified them to honor the Ignore Lists. I can post the changes if anyone is interested.

Mail2Forum: http://www.phpbb.com/phpBB/viewtopic.php?t=60260
Digests:http://www.phpbb.com/phpBB/viewtopic.php?t=187868
Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net
nfs
Registered User
Posts: 49
Joined: Mon May 16, 2005 10:04 pm

Post by nfs »

IPB_Refugee wrote: Hello,

first of all thanks a lot for this great mod! :P

Unfortunately I´ve got a problem with it: User A still can send PMs to user B although A is ignored by B.

Maybe the problem is due to this line:

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
			$to_userdata = $db->sql_fetchrow($result)
#
#-----[ BEFORE, ADD ]------------------------------------------
#
			if ( $userdata['user_level'] == USER && isset($ignored_ids[$to_userdata['user_id']]) && $ignored_ids[$to_userdata['user_id']] )
			{
				$error = TRUE;
				$error_msg = $lang['Has_ignored'];
In my privmsg.php there is no line

Code: Select all

			$to_userdata = $db->sql_fetchrow
but only

Code: Select all

			if (!($to_userdata = $db->sql_fetchrow($result)))
I have added the code above the line mentioned. You can see my full privmsg.php here:

http://home.twin.at/wolfgang/privmsg.txt

Your help would be very appreciated!

Greetings from Austria!
Wolfgang

Tschüss.

You're right. There is a problem. Remove that block of code and then after, not before

Code: Select all

			if (!($to_userdata = $db->sql_fetchrow($result)))
			{
				$error = TRUE;
				$error_msg = $lang['No_such_user'];
			}
insert this

Code: Select all

			// Ignore Mod
			if ( $userdata['user_level'] == USER && isset($ignored_ids[$to_userdata['user_id']]) && $ignored_ids[$to_userdata['user_id']] )
			{
				$error = TRUE;
				$error_msg = $to_username . $lang['Has_ignored'];
			}
			// Ignore Mod
How to get this into the MOD is another question. I coded the MOD this way - and screwed it up, obviously :oops: - because older versions of privmsg.php didn't have the sql_fetchrow() call in an if statement. That makes pattern matching with Easymod pretty hard across versions.

Danke sehr for pointing out the bug. I'll post another message once I have the MOD in an downloadable form.
nfs
Registered User
Posts: 49
Joined: Mon May 16, 2005 10:04 pm

Post by nfs »

NoDeity wrote: Would it be feasible to add the option to ignore a particular guest based on cookies or IP?

That's not a simple thing to do. I guess the first question I would ask is, "Why are you letting guests post?" :lol:
NoDeity
Registered User
Posts: 150
Joined: Thu Jul 17, 2003 9:43 am
Name: Brad Reddekopp

Post by NoDeity »

In certain forums, permitting guests to post seems desirable to me and my mod team. Of course, there are always one or two jerks who abuse the privilege...
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Post by IPB_Refugee »

@nfs:

Thanks a lot for fixing the bug - the mod works great now! :P

(There should be an add on that A can´t send emails through the board to B when B ignores A. But maybe this mod does already exist. I have to do a search for it.)

@NoDeity:

Maybe your moderators should just delete these annoying postings of guests. (In my board I don´t allow guests to post.) You know that not everybody has a unique IP or cookies enabled...

Have a nice week!
Wolfgang
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Post by IPB_Refugee »

IPB_Refugee wrote: There should be an add on that A can´t send emails through the board to B when B ignores A. But maybe this mod does already exist.


I have done some searching and now I´m pretty sure that this mod doesn´t already exist. :(

And I have got one more suggestion: It would be great if it was possible to add a user to the ignore list directly on ignore.php (just like adding a member to a certain group on groupcp.php).

Kind regards
Wolfgang
mnp13
Registered User
Posts: 268
Joined: Fri Jan 06, 2006 11:48 pm
Contact:

Post by mnp13 »

I installed this via easy mod

I am getting this error when I search for new posts:

Code: Select all

Could not obtain matched posts list

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'poster_id NOT IN ( 108 )' at line 3

SELECT post_id FROM phpbb_posts WHERE post_time >= 1156880164AND poster_id NOT IN ( 108 )

Line : 266
File : search.php
Thank you
Michelle
nfs
Registered User
Posts: 49
Joined: Mon May 16, 2005 10:04 pm

Post by nfs »

mnp13, thank you for reporting the bug. It is now fixed and the fixed version is available for download.

If you don't want to reinstall the MOD when a one character change to search.php will do the trick, find the line

Code: Select all

if ( $ignored_sql != '' ) $ignored_sql = 'AND poster_id NOT IN (' . substr($ignored_sql, 2) . ' )';
and change it to

Code: Select all

if ( $ignored_sql != '' ) $ignored_sql = ' AND poster_id NOT IN (' . substr($ignored_sql, 2) . ' )';
IPB_Refugee, forbidding emails from ignored users to the person who ignored them is a bit of a mess. If a user decides to expose his email address, then there isn't any way of keeping it away from someone s/he's ignoring. It's not just a button at the bottom of every post. It's in the memberlist and the user's profile too. You can't just hide them there either, because guests can see those fields.

I like the idea of being able to add a name in ignore.php. I'll see if I can manage that without breaking something. ;)
Post Reply

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