vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - Filter Threads By Post Icon (https://vborg.vbsupport.ru/showthread.php?t=123339)

Wired1 08-07-2006 10:00 PM

Filter Threads By Post Icon
 
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

Benj 08-07-2006 10:18 PM

thanks alot for this will be using :D

Wired1 08-07-2006 10:42 PM

No problemo.

Benj 08-07-2006 11:00 PM

anyway of having a vba block that only shows new threads with a certain post icon .... just a thought

ragintajin 08-08-2006 02:11 AM

How server intensive is this?

Wired1 08-08-2006 03:01 AM

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

Stoebi 08-08-2006 05:01 AM

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

Regards, Stoebi

Wired1 08-08-2006 12:22 PM

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.

oz_moses 09-28-2006 01:25 AM

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.

Wired1 09-28-2006 01:47 AM

thanks. Clarified the instructions to be more vague :)

RobParker 12-30-2006 03:04 PM

Installed and this works fine.

Has anyone been able to add a collapsable box to the top of their forums which includes the post icons and allows you to filter by post icons from there (similar to what the SomethingAwful forums use for those familar with them)?

bigdm 04-08-2007 06:10 PM

is there a way i can set it to display the icons for all, but only let registered members filter posts??

*im sure there is, i just cant work it out

sportsfroma2 04-09-2007 11:49 PM

First off, Great hack, works well and is a great idea... Something I have been looking for quite some time. Thanks for this.

AS a result of how good this hack is, I have a couple of questions on how I would do a couple of things:

1) I would like to make it MANDATORY that a post icon (or would it be a thread icon?) has to be selected to start a new thread.

2) Is there any way to have different sets of thread/post icons depending on the forum/subforum?

3) Eliminate the hot threads/locked threads column, which is usually to the left of the post icons in the default template. I would like to do this so I can user bigger/wider post icons.

Thanks!

vitnuce 04-13-2007 07:43 AM

Bookmarked for the future use..

Thanks for great hack, Wired :)

Muellmann 04-14-2007 01:09 AM

That's cool, i have installed it.

nicolerork 04-17-2007 12:19 AM

Does this work for 3.6.5? I tried modifying the templates, but I couldn't even find some of the codes to change.

rokked 05-05-2007 05:18 PM

is there a way to display the post icons in a list on the forumdisplay?

Skedoozy 05-11-2007 08:18 PM

Hmm I have installed but when I click on a post icon it does not filter. The unfilter option comes up but everything is the same.

Skedoozy 05-11-2007 08:27 PM

Quote:

Originally Posted by oz_moses (Post 1085036)
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.


This solved my problem. Thanks!!

Antivirus 05-25-2007 12:05 PM

hmm... doesn't seem to work on v3.6.7 PL1. Any ideas?

SBlueman 05-26-2007 06:26 PM

Very cool, I combined this mod with the Require post icon mod and am happy with the results. Thanks!

SBlueman 06-03-2007 06:30 AM

Question....is there a way to ignore sticky threads when you sort?

IceFanatic 06-04-2007 04:19 AM

Does this work with 3.6.7 PL1???

I've wanted this forever!

Skedoozy 06-05-2007 11:06 PM

Yeah, this stopped working with 3.6.7 PL1. Pleasssssssse update!?

Skedoozy 06-09-2007 09:01 PM

Wired1 said he would be working on this during the weekend, hopefully we see an update! ;)

noonespecial 06-13-2007 08:16 AM

What if I wanted to show ... say threads with 4 different icons? But filter out the rest?

IceFanatic 06-15-2007 08:03 PM

Any update for v3.6.7 PL1?

ABMAC 06-18-2007 05:26 PM

Quote:

Originally Posted by Antivirus (Post 1254430)
hmm... doesn't seem to work on v3.6.7 PL1. Any ideas?

I just installed it on 3.6.7 and it works great!

bitHacker 07-16-2007 10:06 PM

Very Good mod.
However, when editing old threads and changing their icons, they don't apper in the forum display...
New threads show the thread post icon, and I was able to filter without a problem.

nevermind, did bad edit of the PHP file... my bad :-)

cynthetiq 08-12-2007 04:24 PM

I have been trying to get this to work on 3.6.8 and for some reason, I make the coding changes in the php file and the templates but I get nothing. I will go over my edits one more time to make sure I'm not doing something incorrect.

cynthetiq 08-18-2007 01:34 PM

I can't get this to work properly... I am using an extremepixels template and I don't have items to find an replace in the forumdisplay template. If you'd like to see my forumdisplay template I can try to PM or email it to you. I hit the 20000 char limit.

Code:


<tr>
 <if condition="$show['threadicons']">
  <td class="thead" colspan="2">&nbsp;</td>
 <else />
  <td class="thead">&nbsp;</td>
 </if>

thanks in advance.

PhinisheDTom 08-20-2007 07:14 PM

Simple, easy to implement, and it works exactly as advertised. Thanks for your efforts! The only problem, though, is that most of my users keep up with recent activity by using "/search.php?do=getnew", and the hack doesn't work on the search results page. Any ideas about how the search PHP code and template can be modified to allow the threadbit part of the hack to filter search results by post icon?

-Tom

sensimilla 08-26-2007 06:51 AM

Fantastic, thanks.

sensimilla 09-22-2007 11:37 AM

Its not working for me. vb 3.6.8 with seo enabled

Skedoozy 09-28-2007 07:43 PM

I guess he couldn't get it to work with 3.6.7 and up. :/ shame. Really loved this mod.

SBlueman 10-15-2007 04:30 AM

Anyone know if this can work on 3.6.8?

Wired1 10-15-2007 04:06 PM

Completely forgot about this hack lol! I'll dig through the code sometime soon, see why it's not working.

SBlueman 11-10-2007 10:47 PM

Any word on an update for this?

Wired1 11-16-2007 05:25 AM

nope :) forgot again, busy @ work. I'll see if I can get to it this weekend. Most likely it'll be a minor code change to get it to work.

Rob1986 01-03-2008 06:47 PM

Is this working for 3.6.8? Really would like this awesome mod.


All times are GMT. The time now is 06:15 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.01420 seconds
  • Memory Usage 1,818KB
  • 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
  • (5)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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