vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Ignore Thread (https://vborg.vbsupport.ru/showthread.php?t=69261)

zetetic 09-08-2004 10:00 PM

Ignore Thread
 
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

Quote:

Originally Posted by exasko
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

Quote:

Originally Posted by Bryan Ex
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

Quote:

Originally Posted by Taco John
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...

Quote:

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:
PHP Code:

AND ", $postQueryLogic) . " 

add, after:
PHP Code:

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

find:

PHP Code:

ORDER BY lastpost DESC 

add, before:

PHP Code:

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


All times are GMT. The time now is 04:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01116 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete