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

Reply
 
Thread Tools
[Add-on] Thread Prefixes: Quick Prefix Filter Details »»
[Add-on] Thread Prefixes: Quick Prefix Filter
Version: 1.00, by gavinzac gavinzac is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

Version: 3.6.0 Rating:
Released: 09-03-2006 Last Update: Never Installs: 60
Template Edits
 
No support by the author.

Requires Thread Prefixes:
https://vborg.vbsupport.ru/showthread.php?t=123033

This just adds a little drop down to filter a forum by prefix. It will only show up if the forum has prefixes enabled. On my site I use it so that I don't need to have lots of little subforums, I have one central forum per area of the site and this filter lets them see all of one prefix type in the manner of a subforum, which in my opinion is tidier. See screenshots for my example.

Admin CP -> Styles & Templates -> Style manager --> [Style you want to edit] --> Edit templates --> Forum Display --> FORUMDISPLAY

Find:
PHP Code:
<if condition="$pagenav"
Insert above/before:
PHP Code:
<!-- START FILTER TEMPLATE EDIT -->
<
td class="smallfont"></form>
<
form action="forumdisplay.php" method="get">
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
input type="hidden" name="f" value="$forumid/>
<
input type="hidden" name="page" value="$pagenumber/>
<
input type="hidden" name="pp" value="$perpage/>
<
input type="hidden" name="sort" value="lastpost" $sort[lastpost] />
<
input type="hidden" name="order" value="desc" $order[desc] />
<
input type="hidden" name="daysprune" value="-1" $daysprunesel[all] />
        <if 
condition="$show['threadprefix']">
Show this type of thread$threadprefixes
<input type="submit" class="button" value="Show" /></form></if></td>
<!-- 
END FILTER TEMPLATE EDIT --> 
You can edit the "type of thread" text to whatever suits your forum.

Its working fine on mine, just let me know if there are any errors.

If you use it, please click Install!

Show Your Support

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

Comments
  #22  
Old 03-19-2007, 10:37 AM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This broke my inline moderation on the FORUMDISPLAY. The only forum where inline mod. would work was where I had thread prefixes installed.

I instead am using:
Code:
<!-- START FILTER TEMPLATE EDIT -->
<if condition="$show['threadprefix']">
</form>
<td class="smallfont">
<form action="forumdisplay.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="f" value="$forumid" />
<input type="hidden" name="page" value="$pagenumber" />
<input type="hidden" name="pp" value="$perpage" />
<input type="hidden" name="sort" value="lastpost" $sort[lastpost] />
<input type="hidden" name="order" value="desc" $order[desc] />
<input type="hidden" name="daysprune" value="-1" $daysprunesel[all] />
<strong>Filter by prefix:</strong> $threadprefixes
<input type="submit" class="button" value="Show" /></form></td></if>
<!-- END FILTER TEMPLATE EDIT -->
I reverted the FORUMDISPLAY completely and started adding code back in until I narrowed it down that this was what was causing my problems..

Well, anyway, in case anyone else was having this problem, there's the fix.
Reply With Quote
  #23  
Old 03-20-2007, 08:40 AM
gavinzac's Avatar
gavinzac gavinzac is offline
 
Join Date: Jan 2006
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheMilkCarton View Post
This broke my inline moderation on the FORUMDISPLAY. The only forum where inline mod. would work was where I had thread prefixes installed.

I instead am using:
Code:
<!-- START FILTER TEMPLATE EDIT -->
<if condition="$show['threadprefix']">
<td class="smallfont"></form>
<form action="forumdisplay.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="f" value="$forumid" />
<input type="hidden" name="page" value="$pagenumber" />
<input type="hidden" name="pp" value="$perpage" />
<input type="hidden" name="sort" value="lastpost" $sort[lastpost] />
<input type="hidden" name="order" value="desc" $order[desc] />
<input type="hidden" name="daysprune" value="-1" $daysprunesel[all] />
<strong>Filter by prefix:</strong> $threadprefixes
<input type="submit" class="button" value="Show" /></form></td></if>
<!-- END FILTER TEMPLATE EDIT -->
I reverted the FORUMDISPLAY completely and started adding code back in until I narrowed it down that this was what was causing my problems..

Well, anyway, in case anyone else was having this problem, there's the fix.

ah thanks TMC, i see where i fudged up now cant I edit my code as such to save anyone having to insert and then edit it?
Reply With Quote
  #24  
Old 03-21-2007, 01:09 PM
twgogo's Avatar
twgogo twgogo is offline
 
Join Date: Mar 2007
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good job~ ^^
Reply With Quote
  #25  
Old 04-18-2007, 07:05 AM
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Location: UK
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting a javascript error (object required) when viewing a forumdisplay, only on forums with this hack and only on ie. This gives an error and disables navbar popups only in ie.

The error happens on the last line of this snippet (found in vbulletin_global):

Code:
// add popups to pagenav elements
		var pagenavs = fetch_tags(document, 'td');
		for (var n = 0; n < pagenavs.length; n++)
		{
			if (pagenavs[n].hasChildNodes() && pagenavs[n].firstChild.name && pagenavs[n].firstChild.name.indexOf('PageNav') != -1)
I've tried both blocks of code - the main mod and the one above. Using 3.6.5.

Any clues - I'm a bit stuck!
Reply With Quote
  #26  
Old 04-18-2007, 10:16 AM
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Location: UK
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I think I've fixed this (error and no pop up navbar in IE) - but you may want to check this because I am no coder...

This mod is a form, but it's stuck in the middle of another form. If the mod is displayed, it just terminates the first form. This is how I fixed it:

Admin CP -> Styles & Templates -> Style manager --> [Style you want to edit] --> Edit templates --> Forum Display --> FORUMDISPLAY

Find and delete:

PHP Code:
<form action="inlinemod.php?forumid=$forumidmethod="post" id="inlinemodform">
<
input type="hidden" name="url" value="$url/>
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
input type="hidden" name="forumid" value="$forumid/> 

Find:

PHP Code:
<if condition="$pagenav"

Insert above/before:

PHP Code:
<!-- START FILTER TEMPLATE EDIT -->
<if 
condition="$show['threadprefix']">
<
td class="smallfont">
<
form action="forumdisplay.php" method="get">
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
input type="hidden" name="f" value="$forumid/>
<
input type="hidden" name="page" value="$pagenumber/>
<
input type="hidden" name="pp" value="$perpage/>
<
input type="hidden" name="sort" value="lastpost" $sort[lastpost] />
<
input type="hidden" name="order" value="desc" $order[desc] />
<
input type="hidden" name="daysprune" value="-1" $daysprunesel[all] />
Show only the following$threadprefixes
<input type="submit" class="button" value="Show" /></form></td></if>
<!-- 
END FILTER TEMPLATE EDIT -->

<!-- 
Form code moved from section Threads List -->
<
form action="inlinemod.php?forumid=$forumidmethod="post" id="inlinemodform">
<
input type="hidden" name="url" value="$url/>
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
input type="hidden" name="forumid" value="$forumid/>
<!-- 
End of Form code moved from section Threads List --> 
This works for me on 3.6.5, it removes the error message in IE, and doesn't break inline moderation.
Reply With Quote
  #27  
Old 04-19-2007, 05:31 PM
gavinzac's Avatar
gavinzac gavinzac is offline
 
Join Date: Jan 2006
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good work pottsy.

I will no longer be using this hack, or thread prefixes, so feel free to submit the correct code as your own modification for the latest version.
Reply With Quote
  #28  
Old 04-30-2007, 01:17 AM
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Pottsy! You really helped.
Reply With Quote
  #29  
Old 05-03-2007, 11:27 AM
kompakt's Avatar
kompakt kompakt is offline
 
Join Date: Dec 2004
Location: FL
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Pottsy, that worked for me too...
Reply With Quote
  #30  
Old 11-23-2007, 10:04 PM
tspore tspore is offline
 
Join Date: Jan 2006
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know that this mod wasn't designed for it, as well as I am getting errors when using it on 3.6.8 with a bad if condition, but I was wondering 2 things?
#1 - Can we get it updated to work in 3.6.8?
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in ....
line #53

#2 - would it be possible to have a search for all the forums by prefix. Right now I can only within advanced search put words in for it to search, as well as it won't search multiple forums.

Thanks!!
Reply With Quote
  #31  
Old 04-04-2008, 06:10 AM
sub_ubi sub_ubi is offline
 
Join Date: Dec 2004
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Pottsy, works great on 3.6.8 PL2!
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 03:44 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.04636 seconds
  • Memory Usage 2,353KB
  • Queries Executed 27 (?)
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
  • (3)bbcode_code
  • (5)bbcode_php
  • (1)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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