Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Filter Threads By Post Icon Details »»
Filter Threads By Post Icon
Version: 2.1.0, by Wired1 Wired1 is offline
Developer Last Online: Dec 2021 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.1 Rating:
Released: 08-07-2006 Last Update: 09-27-2006 Installs: 63
Template Edits
Code Changes  
No support by the author.

The 3.5.x version of this hack can be found here.

This hack allows you to click on a post icon, and it will show only the threads with this particular post icon. Once this happens an unfilter button will appear, allowing the user to once again view all threads.

As for WHY someone would want this, here's an answer to that question:

Some forums use the forum icons to convey if a thread has been sufficiently answered or not, or to convey some other meaning. If a poster wants to look for unanswered threads, they could sort by the icon used for the thread.

Think of this as a poor man's thread prefix hack

# of php page edits: 1
# of template edits: 2

Should take less than 5 min to install.

Don't forget to hit INSTALL!

------------------
9-27-06: updated version number, clarified instructions, no actual code change

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-07-2006, 10:18 PM
Benj's Avatar
Benj Benj is offline
 
Join Date: May 2006
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks alot for this will be using
Reply With Quote
  #3  
Old 08-07-2006, 10:42 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problemo.
Reply With Quote
  #4  
Old 08-07-2006, 11:00 PM
Benj's Avatar
Benj Benj is offline
 
Join Date: May 2006
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyway of having a vba block that only shows new threads with a certain post icon .... just a thought
Reply With Quote
  #5  
Old 08-08-2006, 02:11 AM
ragintajin ragintajin is offline
 
Join Date: Sep 2003
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How server intensive is this?
Reply With Quote
  #6  
Old 08-08-2006, 03:01 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Benj
anyway of having a vba block that only shows new threads with a certain post icon .... just a thought
That'd be a different hack, as it wouldn't be a filter, nor would it be in the main thread view of a forum. It's certainly doable though, I'd post it in the request area.


Quote:
Originally Posted by ragintajin
How server intensive is this?
Damned if I know lol! Can't see it as being that intensive, I'd guess less than a search, as the basic idea is something like IF ICON THEN SHOW ELSE HIDE
Reply With Quote
  #7  
Old 08-08-2006, 05:01 AM
Stoebi Stoebi is offline
 
Join Date: Apr 2006
Location: Germany, Berlin
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, nice hack, but i would like to sort "picon = 0" too, please.

Regards, Stoebi
Reply With Quote
  #8  
Old 08-08-2006, 12:22 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stoebi
Hi, nice hack, but i would like to sort "picon = 0" too, please.

Regards, Stoebi
For whatever reason, picon 0 and 1 are the same thing, works on 1 just fine. This may take a bit to figure out. If anyone has an idea, feel free to chime in.
Reply With Quote
  #9  
Old 09-28-2006, 01:25 AM
oz_moses oz_moses is offline
 
Join Date: Oct 2004
Location: Sydney
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice work, I really like this.

I did find step 2 slightly different from your instructions when using VB 3.6.1 - here's what I did instead

After:
Code:
	if ($daysprune != -1)
	{
		if ($vbulletin->userinfo['userid'] AND in_coventry($vbulletin->userinfo['userid'], true))
		{
			$tachyjoin = "LEFT JOIN " . TABLE_PREFIX . "tachythreadpost AS tachythreadpost ON " .
				"(tachythreadpost.threadid = thread.threadid AND tachythreadpost.userid = " . $vbulletin->userinfo['userid'] . ")";
			$datecut = " AND (thread.lastpost >= " . (TIMENOW - ($daysprune * 86400)) . " OR tachythreadpost.lastpost >= " . (TIMENOW - ($daysprune * 86400)) . ")";
		}
		else
		{
			$datecut = "AND lastpost >= " . (TIMENOW - ($daysprune * 86400));
			$tachyjoin = "";
		}
		$show['noposts'] = false;
	}
	else
	{
		$tachyjoin = "";
		$datecut = "";
		$show['noposts'] = true;
	}
Add:
Code:
 // Start Filter Threads By Post Icon Code Snippet

    if ($picon > 0 && is_numeric($picon) && $picon < 5000) { //who knows if all this is necessary - better safe than sorry 
      $pqr = " AND thread.iconid = '$picon' "; 
      $datecut .= $pqr; 
      } else 
        $picon = ""; 

 // End Filter Threads By Post Icon Code Snippet
Demo at http://www.gothetahs.com/forum/index.php if anyone's interested.
Reply With Quote
  #10  
Old 09-28-2006, 01:47 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks. Clarified the instructions to be more vague
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:27 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04374 seconds
  • Memory Usage 2,298KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete