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)

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!


All times are GMT. The time now is 07:30 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.01258 seconds
  • Memory Usage 1,769KB
  • 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
  • (3)bbcode_php_printable
  • (1)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