PDA

View Full Version : Ignore Thread


zetetic
09-08-2004, 10:00 PM
This hack adds an "Ignore Thread" option to the thread tools menu and generates a list of threads you have ignored in your UserCP. This code was part of a larger customization job we paid to have written for us, and I did the best I could to cull out this single component for release here.

Yes, I did make sure the author was cool with me releasing the code before we paid for it, and he said we could do whatever we want with it. I'd give him credit here but I'm not sure he wants anyone to know lest they bug him for support. :)

IMPORTANT: I am new to php and did not write this hack, so don't expect much help if you have problems.

The hack consists of:

1 db modification
3 new phrases
3 new templates
3 templates to edit
7 files to edit

I particularly hope that you expert coders will have a look and make sure I didn't leave anything out or keep anything superfluous in, and/or suggest any possible ways to improve it or make it work with newer vB versions. I have tested it with a clean 3.0.1 install and had no issues.

Good luck!

Osterling
09-09-2004, 08:47 PM
will this work for 3.0

if so, this is a wonderful hack :)

zetetic
09-09-2004, 09:03 PM
will this work for 3.0

if so, this is a wonderful hack :)
The only way to know is to try. :)

I've only tested it on 3.0.1, but I don't know of any reason why it wouldn't work on 3.0.0. Just make sure you have good backups.

Bryan Ex
09-09-2004, 11:28 PM
I can use it! Thanks.

zetetic
09-10-2004, 12:11 AM
I can use it! Thanks.
I hope it works out for you. :)

Taco John
09-10-2004, 05:05 AM
Thanks Tom! It's working in 3.0.0 for me like a charm!

zetetic
09-10-2004, 12:21 PM
Thanks Tom! It's working in 3.0.0 for me like a charm!
Excellent. Glad to hear it. :)

Taco John
09-10-2004, 09:11 PM
One thing my users noted...

Good job on the ignore thread feature -- however, it doesn't work when you do a "new posts" search -- I put a few of the political threads on iggy & they're still coming up when I pull up new threads...But when I go to the forum, they're not there...

zetetic
09-10-2004, 09:33 PM
Good catch, TJ. :) See, the problem is that I have no way of knowing what templates and files were modified (and how) without doing a side-by-side compare. So everytime an issue pops up that's what I have to do. Okay, this seems to fix it (I'll update the text file in the OP next):


open /forum/search.php

find the first instance of:
AND ", $postQueryLogic) . "

add, after:
" . iif($bbuserinfo['ignoredthreads'], "AND post.threadid NOT IN($bbuserinfo[ignoredthreads])") . "

find:

ORDER BY lastpost DESC

add, before:

" . iif($bbuserinfo['ignoredthreads'], "AND threadid NOT IN($bbuserinfo[ignoredthreads])") . "

Casparian
04-03-2005, 02:12 AM
Don't suppose there's any such thing as an "ignore forum" option? We have a chit-chat forum and some of our users *hate* it, when they hit New Posts they can see a dozen OT posts. This hack would be useful if there was only the occasional one but I don't think it'll be enough :(

zetetic
04-03-2005, 04:07 PM
Don't suppose there's any such thing as an "ignore forum" option? We have a chit-chat forum and some of our users *hate* it, when they hit New Posts they can see a dozen OT posts. This hack would be useful if there was only the occasional one but I don't think it'll be enough :(
That's a good idea, Casparian. The logic is simple enough: Provide users with a way to select which forums they want to ignore, modify search.php to ignore those forums when returning "new posts", etc.

Unfortunately I'm not knowledgeable enough about hacking (yet) to say exactly how to do it. Maybe you should start a new thread in the modification requests forum.

sross
04-09-2005, 06:02 AM
I have it up and running on 3.0.7 seems really good so far. I did get an error trying to save the forumhome_lastpostby template, but I ignored it, yikes, but i see no errors anywhere on my site. Does anyone know if there is something wrong with the below template code? Thanks!

forumhome_lastpostby:

At the very top, add:
--------------------------------------------------------
<if condition="in_array($lastpostinfo[lastthreadid], $ignoredthreads)">
Ignored Thread

<else />
--------------------------------------------------------

At the very bottom, add:
--------------------------------------------------------
</if>
--------------------------------------------------------

popowich
05-16-2005, 02:12 PM
Don't suppose there's any such thing as an "ignore forum" option? We have a chit-chat forum and some of our users *hate* it, when they hit New Posts they can see a dozen OT posts. This hack would be useful if there was only the occasional one but I don't think it'll be enough :(

I am also looking for an "ignore forum" (that would exclude the forum posts from the new posts navbar) and an "ignore user" that does not display any posts by the user, both defined by my members in their user cp and not a system wide setting.

-Raymond

yoyoyoyo
08-19-2005, 03:43 AM
I have it up and running on 3.0.7 seems really good so far. I did get an error trying to save the forumhome_lastpostby template, but I ignored it, yikes, but i see no errors anywhere on my site. Does anyone know if there is something wrong with the below template code? Thanks!
I got the same error...

I don't think this is right:
<if condition="in_array($lastpostinfo[lastthreadid], $ignoredthreads)">
I think it is supposed to be more like:<if condition="in_array($lastpostinfo[lastthreadid], array($ignoredthreads))">

Fofer
01-14-2006, 02:33 AM
Anyone tried this on 3.5.x?

moonclamp
01-19-2006, 11:54 PM
Anyone tried this on 3.5.x?

I would love this to be ported :)

Hicksatpd
04-20-2006, 11:30 PM
Any updates? This would be great if I could have it for 3.5.4!

zetetic
04-22-2006, 06:47 PM
I haven't upgraded my forum to 3.5 yet :blush: but I'll be doing it within the next month or so. If someone hasn't beaten me to the punch I'll take a stab at porting this.

dknelson
04-26-2006, 11:29 AM
This is something that I am eagerly awaiting also.

dknelson
05-12-2006, 12:06 AM
Well folks...is this one a dead issue? Does anybody know of anything else like this?

Thanks,
Don

nytxn
05-14-2006, 04:01 PM
I'm also interested in a version for 3.5.x

nytxn
06-15-2006, 04:30 PM
Anyone? Bueller?

Tralala
06-15-2006, 08:42 PM
LOL. Seriously, folks.

Taco John
06-19-2006, 08:37 PM
I'm looking for this too for 3.5.4

Staxed
06-20-2006, 11:31 AM
this would be awesome for 3.5.4, and 3.6 (i'm using 3.6...), as well as for use here at vborg...i would love to be able to ignore all those hack threads that i'm never going to use...

dknelson
09-13-2006, 11:16 AM
Any updates on this for 3.6? Appears to be a dead issue. :(

zetetic
09-13-2006, 12:10 PM
Sorry folks, I haven't upgraded my own site to 3.5 yet, much less 3.6, largely because the coder who wrote this hack for us is no longer doing custom work. If I find someone else to port it for us (or get a chance to do it myself) before someone comes up with another solution, I'll be sure to update this thread.

nytxn
01-10-2007, 11:41 PM
for anyone interested, there is one for 3.6

Click me (https://vborg.vbsupport.ru/showthread.php?t=127487&highlight=Ignore+Thread)

zetetic
01-11-2007, 11:02 AM
Oops, sorry. I gave calorie permission to port this and forgot to post an update here.