vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Miscellaneous Hacks - Advanced Quick Search form like vBulletin.org (https://vborg.vbsupport.ru/showthread.php?t=196078)

veenuisthebest 11-11-2008 10:00 PM

Advanced Quick Search form like vBulletin.org
 

1. This is a search form similar to what you see at this forum (screenshot above) that includes searching by forums, all posts, titles only with a quick menu.

2. It includes quick tag search as well, if you want. Just remove comments to enable it.

3. Under Search Options, you'll find

Code:

My Posts
My Threads
New Posts
Today's Posts
Unanswered Threads
Advanced Search


4. XHTML valid

5. It would be convenient and easiest if we simply place the code in Ad Location Templates -> ad_header_logo template (if you're not using it for ad purposes ofcourse and the spot is free) OR

find this in header template:-

Code:

<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />&nbsp;</if>

and replace the code in red with the below code.

HTML Code:

<if condition="$show['searchbuttons']">
        <!-- header quick search form -->
        <form action="search.php?do=process" method="post">
        <input type="hidden" name="do" value="process" />
        <input type="hidden" name="quicksearch" value="1" />
        <input type="hidden" name="childforums" value="1" />
        <input type="hidden" name="exactname" value="1" />
        <input type="hidden" name="s" value="$session[sessionhash]" />
        <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<div><input type="text" name="query" size="30" style="font-size: 8pt;" />
<select name="forumchoice[]">
            <option value="-1" selected="selected">All Forums</option>
            <option value="1">Forum1</option>
            <option value="2">Forum2</option>
            <option value="3">Forum3</option>
          </select>
<select name="titleonly">
                <option value="0" selected="selected">All Posts</option>
                <option value="1" >Titles Only</option>
        </select><input name="search" value="Search" type="submit" class="button" /><a href="search.php" accesskey="4" rel="nofollow" id="navbar_search1" class=""><img src="$stylevar[imgdir_misc]/menu_open.gif" alt="" title="Advanced Search" border="0" /></a>
            <script type="text/javascript"> vbmenu_register("navbar_search1",1); </script>
</div>
</form>
<!-- <br />
<form action="tags.php" method="get">
<span id="tag_wrapper"><input type="text" id="tag_input" name="tag" size="25" style="font-size: 8pt" value="enter tag, and hit enter" onFocus="this.value=''" onBlur="this.value='enter tag, and hit enter'"/></span>
</form> -->

<div class="vbmenu_popup" id="navbar_search1_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr><td class="thead" align="left">Search Options</td></tr>
        <tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$bbuserinfo[userid]" rel="nofollow">My Posts</a></td></tr>
        <tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=process&amp;showposts=0&amp;starteronly=1&amp;exactname=1&amp;searchuser=$bbuserinfo[username]" rel="nofollow">My Threads</a></td></tr>
        <tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=getnew" rel="nofollow">New Posts</a></td></tr>
        <tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=getdaily" rel="nofollow">Today's Posts</a></td></tr>
        <tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=process&amp;replyless=1&amp;replylimit=0&amp;exclude=30&amp;nocache=1" rel="nofollow">Unanswered Threads</a></td></tr>
        <tr><td class="vbmenu_option" align="left"><a href="search.php$session[sessionurl]" accesskey="4" rel="nofollow">Advanced Search</a></td></tr>
        </table>
</div>
        <!-- / header quick search form -->
        </if>


6. To add searching within forums, simply find Forum1, Forum2 in the above code and replace them with your forum title and corresponding FORUM ID's in place of option values.

Extras:-


1. To enable quick tag search:-

Simply uncomment the second form after first instance of </form>. Ofcourse position it, style it as you like.

2. You would notice a Javascript effect in tag search form where there is no submit button and a hint text on focus and blur is placed. If you like, you can do the same for the first form ;)

Hope you find this useful. Please MARK AS INSTALLED if you use it.

Source: http://tech6.com/f51/advanced-quick-...etin-org-t588/

baghdad4ever 11-12-2008 02:15 PM

thanks

reserved for future

Stifmeister2 11-12-2008 02:45 PM

Any demo??

I'd like to see how this looks in a "normal" site...

veenuisthebest 11-12-2008 03:19 PM

It looks exactly like you see here.

veenuisthebest 11-12-2008 03:22 PM

and it is very easy to install, simply copy and paste the code in your ad_header_logo template for a quick look.

baghdad4ever 11-12-2008 03:33 PM

i dont understand the tag point

can you please explain it more?

veenuisthebest 11-12-2008 03:36 PM

Do you see a tag search form at yoursite.com/forum/tags.php

that is it.

baghdad4ever 11-12-2008 04:48 PM

yes i know it

but my question how to include it in your search form??

thanks

veenuisthebest 11-12-2008 06:11 PM

Then you probably didn't read the 1st point in extras.

Find this in code:-

HTML Code:

<!-- <br />
<form action="tags.php" method="get">
<span id="tag_wrapper"><input type="text" id="tag_input" name="tag" size="25" style="font-size: 8pt" value="enter tag, and hit enter" onFocus="this.value=''" onBlur="this.value='enter tag, and hit enter'"/></span>
</form> -->

Simply remove the comments to enable it.

HTML Code:

<br />
<form action="tags.php" method="get">
<span id="tag_wrapper"><input type="text" id="tag_input" name="tag" size="25" style="font-size: 8pt" value="enter tag, and hit enter" onFocus="this.value=''" onBlur="this.value='enter tag, and hit enter'"/></span>
</form>


glorify 11-13-2008 01:04 AM

Quote:

Originally Posted by Stifmeister2 (Post 1664250)
Any demo??


I'd like to see how this looks in a "normal" site...

Correct me if I'm wrong, but what you're asking is how it looks on a stock vb style template?

Love the mod, just don't have a place to put it in my modded template :(

veenuisthebest 11-13-2008 03:43 AM

Quote:

Originally Posted by glorify (Post 1664585)
Correct me if I'm wrong, but what you're asking is how it looks on a stock vb style template?

Love the mod, just don't have a place to put it in my modded template :(

At your gtp site..

you can put it inbetween the logo and the image at the right. I would suggest you to use just the quick text search (for members only), this is how i am doing at my site. check it out, you need to sign in to see.

it looks good and is compact as well

baghdad4ever 11-13-2008 09:03 AM

Quote:

Originally Posted by veenuisthebest (Post 1664366)
Then you probably didn't read the 1st point in extras.

Find this in code:-

HTML Code:

<!-- <br />
<form action="tags.php" method="get">
<span id="tag_wrapper"><input type="text" id="tag_input" name="tag" size="25" style="font-size: 8pt" value="enter tag, and hit enter" onFocus="this.value=''" onBlur="this.value='enter tag, and hit enter'"/></span>
</form> -->

Simply remove the comments to enable it.

HTML Code:

<br />
<form action="tags.php" method="get">
<span id="tag_wrapper"><input type="text" id="tag_input" name="tag" size="25" style="font-size: 8pt" value="enter tag, and hit enter" onFocus="this.value=''" onBlur="this.value='enter tag, and hit enter'"/></span>
</form>




thank you :D

installed

Stifmeister2 11-13-2008 02:53 PM

Quote:

Originally Posted by glorify (Post 1664585)
Correct me if I'm wrong, but what you're asking is how it looks on a stock vb style template?

Love the mod, just don't have a place to put it in my modded template :(

Yeah. I have customized styles. And I'm wondering where I might put this...

veenuisthebest 11-13-2008 02:57 PM

Quote:

Originally Posted by Stifmeister2 (Post 1664920)
Yeah. I have customized styles. And I'm wondering where I might put this...

Read post #11

Crashh 11-14-2008 12:34 PM

I have a question:

If i use this hack , can i filter threads by prefix?

veenuisthebest 11-14-2008 04:17 PM

Quote:

Originally Posted by Crashh (Post 1665513)
I have a question:

If i use this hack , can i filter threads by prefix?

1. That would require another form as the action script is different. And ofcourse another submit button that won't look good at all. Submitting two forms with one button can be done with JS but its not worth so much effort.

2. It would throw an invalid forum error when search made from index.php. You'll probably have to create *another* listbox containing all the forum list for workaround.

3. Though it would work great on forumdisplay.php BUT that page already has a prefix search, so...

Overall, its pretty useless I think. Keeping the Quick Search form on header should be made as compact and small as possible, no need of adding complexity to it.

Infact, I myself is using JUST a small input box for quick search. No forums list, no tag search, no dropdown menu, no titles/posts and not even the submit button lol

Crashh 11-14-2008 05:25 PM

Hmm... If i understand u correctly, it's difficult to make a search by prefix (like this forum)
I'm not a coder, maybe u'll make new hack like this forum, to search in sub-forums by prefix?

veenuisthebest 11-14-2008 06:14 PM

Its not difficult, just a simple form needs to be added.

btw I don't see a Search by prefix in this forum, its a 3.7 feature, not 3.6.

Crashh 11-14-2008 07:46 PM

Quote:

Originally Posted by veenuisthebest (Post 1665674)
Its not difficult, just a simple form needs to be added.

btw I don't see a Search by prefix in this forum, its a 3.7 feature, not 3.6.

Wow. If it's not difficult, can u do it? Please. I can't :(

Why u didn't see?
Look at the screenshot in attach, and u'll understand what i want :)

veenuisthebest 11-14-2008 08:43 PM

Its the MODS forum at vborg. Its totally custom.

Btw, if you want it that way on forumdisplay.php, then ITS A DEFAULT FEATURE of 3.7

Check on my site
http://www.tech555.com/forum/f51-vbulletin/

navik 11-15-2008 07:35 PM

Hi fellows! let me introduce you my site its

Code:

http://maya-empire.com/m-e/forum.php
im trying to put this kind of search into my web....but i've found out that my colaborator has changed the style im readin the header code....and im reading this

Code:

<!-- logo -->
<a href="http://www.maya-empire.com"><img src="/m-e/images/undergroundstyle/misc/maya_2008.jpg" alt="Ad" /></a>
  </div>

<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]

and beause of the instructuions i can't place the given code here...in the location where its supposed to be as far as i understand the html the code given here it's located into a table...and as you can se in my header code i dont have tables.....

Can someone help me configurating my header code please?

but.....i was thinking
it can be places into another templante right?? a table could be created beneath the line that has
USER CP Help Chat Member List...

i thik its called navbar

can someone could create a template modification that im proposing? im not a coder

i would like to help....but its an idea, maybe some coder havent thought of it....

i hope someone can make it....

Crashh 11-16-2008 09:30 AM

Quote:

Originally Posted by veenuisthebest (Post 1665770)
Btw, if you want it that way on forumdisplay.php, then ITS A DEFAULT FEATURE of 3.7
Check on my site
http://www.tech555.com/forum/f51-vbulletin/

Oh.. Yeapp.. I find it:)) But in footer of the page :))
Thx for help!

Can u paste here "template hack", how u insert filter in "header" on your site tech555.com ?

veenuisthebest 11-16-2008 10:24 AM

Quote:

Originally Posted by Crashh (Post 1666689)
Oh.. Yeapp.. I find it:)) But in footer of the page :))
Thx for help!

Can u paste here "template hack", how u insert filter in "header" on your site tech555.com ?

well that is different mod crashh ;)

Display Options Above Threads - as seen on vbulletin.org

Crashh 11-16-2008 10:39 AM

Quote:

Originally Posted by veenuisthebest (Post 1666711)

Ohhh. Thanks a lot ;)

leitel 12-06-2008 03:38 AM

Did I understand correctly that this is a default feature of 3.7? I couldn't find any option to switch this on.

Quote:

Originally Posted by veenuisthebest (Post 1665770)
Its the MODS forum at vborg. Its totally custom.

Btw, if you want it that way on forumdisplay.php, then ITS A DEFAULT FEATURE of 3.7

Check on my site
http://www.tech555.com/forum/f51-vbulletin/


Powlo 12-08-2008 02:37 PM

Thanks for this mod but i dont understand how it works. I am probably being a bit dim but here goes..

Where the code is..

PHP Code:

 <option value="1">Forum1</option

i am assuming i replace Forum1 with a the forum name of my chosing, right?

What about subforums? I have several subforums with the same name but in different categories so i guess it will have to include the parent too.

I cant see how this works as ive added the code on a test forum ive changed nothing in the code but it will still perform a search and retrieve results even though i dont have a forum called 'Forum1'.

Hope you can help.

{EDIT}
Scrap all that, sorry chaps just read instruction 6 doh!

Powlo 12-08-2008 07:53 PM

Ok ive installed it and its Fantastic for my forum. Thanks.

There is one thing i dont like though..

If for example you selected a category from the drop down list but left the search area blank it will default to the advanced search paget. Would it not be possible for it to list the latest posts in the selected category instead? Now that for me would make this perfect.

Cheers

mesdar 12-12-2008 02:56 AM

Very nice

Thanks

leroub 12-28-2008 02:27 AM

Hi all....

I need your help... i want to allow a portion of the search option for groups 6 and 12 ... I try this, but it doesn't work... :(

Code:

<if condition="$show['searchbuttons']">
    <form action="search.php?do=process" method="post">
    <input type="hidden" name="do" value="process" />
    <input type="hidden" name="quicksearch" value="1" />
    <input type="hidden" name="childforums" value="1" />
    <input type="hidden" name="exactname" value="1" />
    <input type="hidden" name="s" value="$session[sessionhash]" />
    <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<div>
  <div align="center">
    <input type="text" name="query" size="30" style="font-size: 8pt;" />
    <select name="forumchoice[]">
      <option value="-1" selected="selected">Tout le site</option>
      <option value="3,4">Tutoriels</option>
      <option value="12">Forums d'aide</option>
                <if condition="is_member_of($bbuserinfo, 6,12)">
                  <option value="27"> Images famille</option>
                  <option value="19,20,21,22,23,25">Messages perso</option>
              </if>
    </select>
    <select name="titleonly">
      <option value="0" selected="selected">Dans le texte complet</option>
      <option value="1" >Seulement dans le titre</option>
    </select>
    <input name="search" value="Recherche" type="submit" class="button" />
    <a href="search.php" accesskey="4" rel="nofollow" id="navbar_search1" class=""></a>
    <script type="text/javascript"> vbmenu_register("navbar_search1",1); </script>
  </div>
</div>
</form>
    </if>

I also tried, "is_member_of($userinfo, 6,12)", but doesn't work... :(

thx in advance for your help... :up:

veenuisthebest 12-28-2008 09:11 AM

It should be

HTML Code:

<if condition="is_member_of($vbulletin->userinfo, 6, 12)">

leroub 12-28-2008 12:29 PM

thx master... :up::D:up:

TaMpE 12-30-2008 06:15 AM

What do I put if I want to do

"All Forum" etc.

I see value is -1 but what about of other sections of "All blahblah" etc?

Will the numbers become like -2 -3 etc?

Thanks mate INSTALLED!

€dit: I can't see these!

My Posts
My Threads
New Posts
Today's Posts
Unanswered Threads
Advanced Search

I have place this mod in my navbar template and replaced it with <br />. My CountUp mod was used to be there and now I have replaced that mod with this, I like the position but I want to see the options above.

How can I make them visible?



Thank you,
TaMpE

WarLion 01-02-2009 03:10 AM

this is so cool i been waiting for somthing like this thank so much
INSTALLED!!!!!

trickfly 01-06-2009 12:19 PM

How do I allow my guests to openly search the forums without being taken to the search page and having to enter the CAPTCHA image.

Here is my site:

www.SymbianGalaxy.org

Try test out the search feature in the header as a guest and you should be taken to the search page asking you to verify the CAPTCHA image.

When a user is logged in, they can use the search without having to be taken to the search page, so how do I allow this for the guests ?

Any help would be great!

Thanks,
Trickfly

veenuisthebest 01-06-2009 12:23 PM

admincp -> vbulletin options -> Human Verification Options -> Verify Guest Searches -> Set to NO

soundbarrierpro 01-06-2009 03:00 PM

I'd like to put this under my navbar in the header. How do I do that? I have no $navbar in the header template.

Scalemotorcars 01-13-2009 06:50 PM

Thanks for this. :up:

This really should be a default in the vb code or at least an option.

Marked installed :D

For anyone that want to see this under the navbar I simply flipped the buttons to the top and added a <div> with members only <if> Heres the link http://scalemotorcars.com/forum/index.php

And a screenshot with it below.

soundbarrierpro 01-13-2009 07:05 PM

Quote:

Originally Posted by Scalemotorcars (Post 1711272)
Thanks for this. :up:

This really should be a default in the vb code or at least an option.

Marked installed :D

For anyone that want to see this under the navbar I simply flipped the buttons to the top and added a <div> with members only <if> Heres the link http://scalemotorcars.com/forum/index.php

And a screenshot with it below.

Can you pm me your code that you did? I tried everything to make it work like you have and I can't figure it out. Or maybe post your re-configured code?

Thanks

tjmaxwell 04-29-2009 08:11 PM

Hi, I'm using the Video Directory hack along with VBAdvanced Dynamics as a file manager, which are all integrated with VB and have their own search functions. I would like to integrate those features using this hack so users can search my forums, blogs, video directory, and file database using one form. Is this possible, and if so, can someone explain to me how to do it? Thanks.

TaMpE 07-03-2009 10:32 PM

I get this when I try to put this in one of my "NOTICES" box.

Code:

Your submission could not be processed because a security token was invalid.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.

How can I fix this?


All times are GMT. The time now is 05:03 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.01680 seconds
  • Memory Usage 1,889KB
  • 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
  • (6)bbcode_code_printable
  • (6)bbcode_html_printable
  • (1)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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