vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Quick Search dropdown for prefixes (https://vborg.vbsupport.ru/showthread.php?t=264890)

princesspepper 06-08-2011 12:41 PM

Quick Search dropdown for prefixes
 
Does anyone know of a quick search drop down menu mod for prefixes? For example, like the dropdown at the top of this board, so you can quicksearch from the main menu to only pull up threads with a selected prefix.

Thanks in advance! :)

--------------- Added [DATE]1307559829[/DATE] at [TIME]1307559829[/TIME] ---------------

I have written my own, so if anyone is interested in the code, here it is. This is for VB 4.1.3

In FORUMDISPLAY template...

Find :

Code:

<ul class="popupgroup forumdisplaypopups" id="forumdisplaypopups">


Add after :

Code:

<!-- ADDED PREFIX SORT TO TOP -->

<vb:if condition="$show['threadslist']">
<vb:if condition="$prefix_options">

<li>
<form id="forum_display_options" action="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php" method="get">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="f" value="{vb:raw forumid}" />
<input type="hidden" name="page" value="{vb:raw pagenumber}" />
<input type="hidden" name="pp" value="{vb:raw perpage}" />
<input type="hidden" name="daysprune" value="{vb:rawphrase beginning}" />
<input type="hidden" name="sort" value="{vb:rawphrase last_post_time}" />
<input type="hidden" name="order" value="desc" />

<label for="sel_prefixid" style="float:left; padding:5px 10px 0 0;">{vb:rawphrase prefix}</label>
</li>

<li>
<select name="prefixid" class="primary" id="sel_prefixid">
<option value="" {vb:raw prefix_selected.anythread}>{vb:rawphrase any_thread_meta}</option>
<option value="-2" {vb:raw prefix_selected.anyprefix}>{vb:rawphrase any_prefix_meta}</option>
<option value="-1" {vb:raw prefix_selected.none}>{vb:rawphrase no_prefix_meta}</option>
{vb:raw prefix_options}
</select>
<p class="description">{vb:rawphrase select_threads_with_prefix_description}</p>
</li>

<li>
<input type="submit" class="button" value="{vb:rawphrase show_threads}" style="padding: 9px 0 0 0;" />
</li>

</form>

</vb:if>
</vb:if>

<!-- END PREFIX SORT TO TOP -->

If anyone has a better way of styling this, please feel free to add info. :)

thermax04 06-08-2011 06:14 PM

can you provide a demo page for this mod

g00gl3r 02-16-2012 03:49 PM

1 Attachment(s)
I can confirm this works. I've removed the style for the submit button though as the padding didn't look right. Screenshot attached.


All times are GMT. The time now is 03:10 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.00980 seconds
  • Memory Usage 1,718KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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