vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   [Add-on] Thread Prefixes: Quick Prefix Filter (https://vborg.vbsupport.ru/showthread.php?t=125776)

gavinzac 09-03-2006 10:00 PM

[Add-on] Thread Prefixes: Quick Prefix Filter
 
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! :)

Ascor 09-04-2006 04:36 PM

very nice and usefull, thank you, installed :)

Hornstar 09-05-2006 09:00 AM

you got a live demo, I think it may help me grasp this a little better.

Thanks.

gavinzac 09-05-2006 03:18 PM

Quote:

Originally Posted by hornstar1337
you got a live demo, I think it may help me grasp this a little better.

Thanks.

http://www.speakout.biz/forum/problems-advice/

my site require registration but maybe someone else could post theirs?
Theres not much more to it than the screenshots anyway. its just a simple drop-down list that filters to threads with only the selected prefix.

kj_ugs 09-05-2006 04:57 PM

is it possible to limit this to one forum or is it site wide?

gavinzac 09-06-2006 08:43 AM

Quote:

Originally Posted by kj_ugs
is it possible to limit this to one forum or is it site wide?

it only appears if a particular forum has Thread Prefixes enabled. you could limit it to one specific forum with thread prefixes enabled by adding an <if> statement around the whole thing.

Hornstar 09-14-2006 09:43 AM

I saw this release the other day and thought it was nothing special lol, but even before that I have been looking everywhere for the prefix hack, but wasnt searching for the word prefix led me knowwhere lol, so now that I understand what this does, it is really good.

Thanks, clicks install.

gavinzac 09-15-2006 08:07 AM

Quote:

Originally Posted by hornstar1337
I saw this release the other day and thought it was nothing special lol, but even before that I have been looking everywhere for the prefix hack, but wasnt searching for the word prefix led me knowwhere lol, so now that I understand what this does, it is really good.

Thanks, clicks install.

yeah it might be better if i had a demo version. have you got it installed on a live, public site? :)

Simplicity 10-07-2006 02:13 PM

In the forums that this mod acts in (forums with active prefix fields) it seems to break the AJAX menu system. No dropdown menus work, however forums where it isnt running do have working AJAX menus.

Any idea why this would be?

vB v3.6.1

gavinzac 10-08-2006 06:45 AM

could i have a link to your forum to check it out? i presume you mean the DHTML menu, rather than an ajax modification?

Ascor 10-10-2006 04:02 AM

After upgrade to 3.6.2 an doing the template edit you can check the select box thread for moderation, but the counter say 0 post selectec and is not showing the "selected" color row :/

edit: and i have just cheked, same problem as Simplicity, the menu are out, ("forum tools" and "search in this forum")

AyeCapn 10-11-2006 04:11 AM

<if condition="$pagenav">

Searched for thss in 3.6.2 and couldn't find it in FORUMDISPLAY
:(

gavinzac 10-11-2006 09:01 AM

i guess theres something changed about 3.6.1+, i dont know i havent upgraded yet. Ill post any edits if/when i upgrade :( sorry guys, although i really dont see how this would affect any of that, its just a form and submit button.

AyeCapn 10-11-2006 12:43 PM

Dear gavinzac,

Due to repeated failures to meet expectations, your services will no longer be required with our firm. You have 15 minutes to clean out your desk. Security will escort you to the front door.

Have a nice day.

Sincerely,

The Management





:o

gavinzac 10-12-2006 08:48 AM

If you do want to put this into 3.6.2, just find the new topic button and put it in after that. I can't garauntee it'll work but I don't see why it wouldnt, its just a form. I'm guessing people have somehow screwed up the form that lets you inline moderate when they did this.

Janet Jackson 10-16-2006 02:36 AM

I tested this add-on just to see if it worked on a 3.6.2 board and it did (without affecting AJAX or moderation options). Unfortunately the forums where I have prefixes enabled aren't publicly visible, so I can't show you. Anyway, to be honest I find this a better solution myself.

gavinzac 10-16-2006 09:01 AM

glad to see i was right, it works :D

thats fair enough, two ways of doing the same things really, but you should really put rel="nofollow" on those links. search engines will go crazy. also, if theres a prefix thats not on the first page it'd be a pain to find one and then click it.

Janet Jackson 10-16-2006 03:10 PM

Quote:

Originally Posted by gavinzac
thats fair enough, two ways of doing the same things really, but you should really put rel="nofollow" on those links. search engines will go crazy.

It's there already ;)
Quote:

also, if theres a prefix thats not on the first page it'd be a pain to find one and then click it.
Good point, didn't think of that.

Ascor 10-22-2006 07:14 AM

I confirm this was a template issus, now all work good in 3.6.2 ^^
Thank you Janet Jackson and thank's again gavinzakc :)

gavinzac 10-23-2006 10:48 AM

Quote:

Originally Posted by Ascor
I confirm this was a template issus, now all work good in 3.6.2 ^^
Thank you Janet Jackson and thank's again gavinzakc :)

out of curiousity, what template are you using? i could have a look and see if theres some way to make them 100% compatible.

TheMilkCarton 03-19-2007 10:37 AM

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. :)

gavinzac 03-20-2007 08:40 AM

Quote:

Originally Posted by TheMilkCarton (Post 1207215)
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 :D cant I edit my code as such to save anyone having to insert and then edit it?

twgogo 03-21-2007 01:09 PM

Good job~ ^^

Pottsy 04-18-2007 07:05 AM

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!

Pottsy 04-18-2007 10:16 AM

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.

gavinzac 04-19-2007 05:31 PM

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.

4x4 Mecca 04-30-2007 01:17 AM

Thanks Pottsy! You really helped.

kompakt 05-03-2007 11:27 AM

Thanks Pottsy, that worked for me too...

tspore 11-23-2007 10:04 PM

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!!

sub_ubi 04-04-2008 06:10 AM

Thank you Pottsy, works great on 3.6.8 PL2!

Ronin Six 05-08-2008 03:24 PM

Anyone know if there's a similar mod to this (other than the Clickable Prefix Mod) for v3.7?

sub_ubi 02-20-2009 04:37 PM

would love to see something like this for 3.7/3.8!

Wonksta 05-08-2009 12:58 PM

Quote:

Originally Posted by sub_ubi (Post 1750029)
would love to see something like this for 3.7/3.8!

Same!!!!!

Cagonni 06-09-2009 04:10 AM

Quote:

Originally Posted by sub_ubi (Post 1750029)
would love to see something like this for 3.7/3.8!

it should be..

Alfa1 12-19-2010 02:12 AM

A vb 3.8.6 version would be nice to have.

Wonksta 03-30-2011 07:02 AM

Quote:

Originally Posted by Alfa1 (Post 2136205)
A vb 3.8.6 version would be nice to have.

Bump!

st80m 05-14-2012 04:49 PM

I would love to see this mod for VB 4.1.12

Any thoughts of upgrading it?

sub_ubi 08-02-2012 01:56 AM

I'd like to see a vb4 version as well!


All times are GMT. The time now is 07:16 AM.

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.01348 seconds
  • Memory Usage 1,860KB
  • 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
  • (3)bbcode_code_printable
  • (5)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete