View New Posts - ignore from a user?

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Ideas Centre
Locked
njhorn
Registered User
Posts: 7
Joined: Mon Nov 14, 2005 3:16 am

View New Posts - ignore from a user?

Post by njhorn » Sun Dec 28, 2008 11:04 pm

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!
Last edited by ameeck on Tue Dec 30, 2008 11:21 am, edited 1 time in total.
Reason: Moved to 3.0.x MOD Requests

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: View New Posts - ignore from a user?

Post by ameeck » Mon Dec 29, 2008 9:36 am

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)); 

njhorn
Registered User
Posts: 7
Joined: Mon Nov 14, 2005 3:16 am

Re: View New Posts - ignore from a user?

Post by njhorn » Mon Dec 29, 2008 11:32 pm

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 :(

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: View New Posts - ignore from a user?

Post by ameeck » Tue Dec 30, 2008 9:53 am

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.

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: View New Posts - ignore from a user?

Post by mtrs » Sun Jan 04, 2009 4:16 pm

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)
I abandoned all of my mods.

Locked

Return to “[3.0.x] MOD Requests”