Page 1 of 1

View New Posts - ignore from a user?

Posted: Sun Dec 28, 2008 11:04 pm
by njhorn
Question for the smart people here...

I am using the lastrss autoposting bot to populate certain forums on my board with news stories regarding sports stories from ESPN, Fox Sports, etc... One annoying side effect of this is that new rss posts are created hourly, and posts from my normal users get buried in the "view new posts" link due to the amount of stories posted hourly...

Is there a mod or a change I can make to "view new posts" to change the sql statement it uses to ignore any posts from a specific user? All of my rss posts come from a user call "rssbot" with a uid of 315...

Thanks!

Re: View New Posts - ignore from a user?

Posted: Mon Dec 29, 2008 9:36 am
by ameeck
Would filtering out specific forums be ok? If yes, find this in search.php:

Code: Select all

    case 'newposts': 
on a new line, add this, 5 being the forum ID:

Code: Select all

$ex_fid_ary[] = 5; 
If you have more forums, add this instead:

Code: Select all

$ex_fid_ary = array_merge($ex_fid_ary, array(5, 6, 7, 8)); 

Re: View New Posts - ignore from a user?

Posted: Mon Dec 29, 2008 11:32 pm
by njhorn
Thanks ameeck...

Filtering out forums would probably do it, although I would like replies to the rss posts to show up in view new posts, and since the replies are in those same forums I think that would be a problem :(

Re: View New Posts - ignore from a user?

Posted: Tue Dec 30, 2008 9:53 am
by ameeck
Well you would have to remake the whole query, since it pulls topics and you'd have to add an additional filter to get topics which have one post by that user. I'll look into it though if I have time.

Re: View New Posts - ignore from a user?

Posted: Sun Jan 04, 2009 4:16 pm
by mtrs
njhorn wrote:Filtering out forums would probably do it, although I would like replies to the rss posts to show up in view new posts, and since the replies are in those same forums I think that would be a problem :(
Open
search.php

Find

Code: Select all

						WHERE t.topic_last_post_time > ' . $user->data['user_lastvisit'] . '
							AND t.topic_moved_id = 0
After add

Code: Select all

							AND t.topic_last_poster_id <> 222
This way new topics or new last posts in a topic by bot_id = 222 will be ignored from new posts search.

Also, I made a small mod to ignore new posts in some forums, configurable for users with custom profile fields. [BETA] New posts search excluded forums (0.0.1)