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)

SBlueman 05-08-2008 12:06 AM

Quote:

Originally Posted by noonespecial (Post 1483181)
PHP Code:

$icons $vbulletin->db->query_read_slave("
        SELECT iconid, iconpath, title, imagecategoryid
        FROM " 
TABLE_PREFIX "icon AS icon
        WHERE imagecategoryid NOT IN (0
$badcategories)
        ORDER BY title
    "
);

    if (!
$vbulletin->db->num_rows($icons))
    {
        return 
false;
    }

$show['posticons'] = false;

    while (
$icon $vbulletin->db->fetch_array($icons))
    {
    
$show['posticons'] = true;
    eval(
'$posticonbits .="' fetch_template('topicbits') . '";');        
    } 

That's how I did it with a plugin on forumdisplay_start

Also, how would I implement this? I am not understanding the instructions.

Strike3ForumsMH 05-27-2008 05:53 AM

If a fix could be found for later versions of 3.6x, I too would be very appreciative.

- Reid

Strike3ForumsMH 05-30-2008 12:41 AM

Actually, I got this to work on 3.68. After trying to rework everything and then going to upload, I saw that I simply missed a small file edit in the instructions. D'oh.

Thanks for the cool hack.

- Reid

Strike3ForumsMH 05-31-2008 08:12 AM

Quote:

Originally Posted by PhinisheDTom (Post 1321824)
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

Yeah, I would second this as well. It's really about the only thing wrong with the hack. Does anyone have a fix?

- Reid

Seiyaboy 06-04-2008 06:59 PM

Although people claim it doesn't work for 3.6.7PL1 and up, it works just fine for my vbulletin 3.6.10 forum. Thanks again for this wonderful mod.

trigatch4 07-11-2008 01:04 PM

How about 3.7.X? Wired1... you still around?

canntoon 07-27-2008 04:05 PM

Yeah I'm running 3.7.2 and I would really love to have this working. Are there even any similar alternatives at all? Seems like a common need for forums that nobody else has solved.

Manhand 09-13-2008 06:30 PM

Any update on this please? Would love this for 3.7

srh 01-08-2009 10:48 PM

I could really use this for ver. 3.7.x

Any alternatives?

boggseric 01-13-2010 02:55 AM

This pretty much works in 3.84 PL2. The only part that doesn't work is the unfilter link never shows up. Otherwise this filters the threads just like it is supposed to.


Once I figure out how to get that to work properly I will post the fix. For now you can do this:

On the last step of the instructions it says..
Code:

vB AdminCP -> Styles & Templates -> Style Manager -> (Select Style) -> Forum Display Templates -> FORUMDISPLAY

NOTE: there are 2 <if condition="$show['threadicons']"> lines. The 2nd one (that is preceded by <tr>) is the one to replace.


FIND:

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


REPLACE with:

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

I simply changed it to this which ALWAYS displays the unfilter link (which just refreshes the page if they haven't filtered):

Code:

        <if condition="$show['threadicons']">
                <if condition="$picon">
                        <td class="thead" colspan="2"><a href="$noiconurl">Unfilter</a></td>
                <else />
                        <td class="thead" colspan="2"><a href="$noiconurl">Unfilter</a>&nbsp;</td>
                </if>
        <else />
                <td class="thead">&nbsp;</td>
        </if>


Also note, on that last part of the instructions it mentions <tr>, those weren't in my template so I left that out.


All times are GMT. The time now is 02:00 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.01377 seconds
  • Memory Usage 1,749KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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