Page 2 of 5

Posted: Sun Jul 16, 2006 7:40 pm
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. :)

Posted: Sun Jul 16, 2006 7:43 pm
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.

Posted: Sun Jul 16, 2006 7:50 pm
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'];
			}

Posted: Mon Jul 17, 2006 4:48 am
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.

Posted: Thu Jul 27, 2006 11:00 am
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."

Posted: Sat Jul 29, 2006 2:43 am
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

Posted: Mon Jul 31, 2006 6:02 pm
by NoDeity
Would it be feasible to add the option to ignore a particular guest based on cookies or IP?

Posted: Sat Aug 05, 2006 2:09 am
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

Posted: Fri Aug 11, 2006 11:58 pm
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.

Posted: Sat Aug 12, 2006 12:02 am
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:

Posted: Sat Aug 12, 2006 4:39 am
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...

Posted: Mon Aug 14, 2006 9:10 am
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

Posted: Sun Aug 27, 2006 7:54 pm
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

Posted: Tue Aug 29, 2006 7:37 pm
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

Posted: Wed Aug 30, 2006 5:27 pm
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. ;)