Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Add Quick Search Anywhere
Topic Started: Dec 15 2007, 12:28 AM (2,864 Views)
Fission
Member Avatar
I am really awesome
[ *  *  * ]
Preview, it is to the right and right underneath the submenu.

This adds a search box anywhere you put it.

Quote:
 

<form method="post" action="boardurl/search/?c=1">
<div>
<input type="text" size="20" value="" name="q"/>
<button type="submit">Search</button>
</div>
</form>


Replace this with the size of the search input area

Replace this with the url of your board, up to the point after the name. For instance, http://s1.zetaboards.com/Burning_Sand_Inferno/ would be valid, while http://s1.zetaboards.com/Burning_Sand_Inferno/online/ would not.

You can switch around these two lines:

Code:
 

<input type="text" size="20" value="" name="q"/>

<button type="submit">Search</button>


Depending on where you want the button and text box, relative to each other.

Yes, I know this is all part of the default ZetaBoards code, but it is quite useful.

I will get a testing board up soon, but for now it's an active board. Preview is now a test board.
Edited by Fission, Dec 15 2007, 01:17 AM.
Offline Profile Quote Post Goto Top
 
jediman (S)
Member Avatar
Hmmmm......
[ *  *  * ]
Spiffy. It works very well :p
Offline Profile Quote Post Goto Top
 
Eureka
Member
[ *  *  * ]
Fission
Dec 15 2007, 12:28 AM
Preview, it is to the right and right underneath the submenu.

This adds a search box anywhere you put it.

Quote:
 

<form method="post" action="boardurl/search/?c=1">
<div>
<input type="text" size="20" value="" name="q"/>
<button type="submit">Search</button>
</div>
</form>


Replace this with the size of the search input area

Replace this with the url of your board, up to the point after the name. For instance, http://s1.zetaboards.com/Burning_Sand_Inferno/ would be valid, while http://s1.zetaboards.com/Burning_Sand_Inferno/online/ would not.

You can switch around these two lines:

Code:
 

<input type="text" size="20" value="" name="q"/>

<button type="submit">Search</button>


Depending on where you want the button and text box, relative to each other.

Yes, I know this is all part of the default ZetaBoards code, but it is quite useful.

I will get a testing board up soon, but for now it's an active board. Preview is now a test board.
Suggestion: rather than have them put the boardurl, couldn't you just do it for them?

Quote:
 

<form method="post" action=main_url+"search/?c=1">
<div>
<input type="text" size="20" value="" name="q"/>
<button type="submit">Search</button>
</div>
</form>
Offline Profile Quote Post Goto Top
 
Fission
Member Avatar
I am really awesome
[ *  *  * ]
Thanks. I'm not really that good... in fact, I only know HTML and CSS. I'll add that.

Edit: that doesn't work.
Edited by Fission, Dec 15 2007, 01:13 AM.
Offline Profile Quote Post Goto Top
 
jediman (S)
Member Avatar
Hmmmm......
[ *  *  * ]
Eureka do you know how to get this inside of the submenu on the far left???
Offline Profile Quote Post Goto Top
 
Fission
Member Avatar
I am really awesome
[ *  *  * ]
I tried this by using parts of short Javascript code that adds links to the submenu. I'm going to do some more testing, and will post it here if/when I get it to work.
Offline Profile Quote Post Goto Top
 
Eureka
Member
[ *  *  * ]
@ jediman: It's possible. ;) Exactly how do you want it displayed? Please be as specific as possible.

@ Fission: My way requires that you enable JavaScript, not plain HTML, but it does prevent the board name errors that people may get. ;)
Offline Profile Quote Post Goto Top
 
jediman (S)
Member Avatar
Hmmmm......
[ *  *  * ]
Well like, in the submenu, I want to place the search inside of the sub menu, on the far left as far as possible in the submenu.
Offline Profile Quote Post Goto Top
 
Eureka
Member
[ *  *  * ]
Try this:
Quote:
 

<script>
/* Quick Search in Submenu by Eureka of TCZ [thecodingzone.com] */
var _txtCol = "white";
// submenu img may be too small (height-wise)...this should fix that if it is too small
$(function(){$("#submenu").css("height","1.5em").prepend("<span style='color:"+_txtCol+";text-align:left;float:left;'>Quick Search: <form method='post' action='"+main_url+"search/?c=1'><input type='text' size='20' value='' name='q' /></form></span>");});
</script>


I can't guarantee it'll work. I made this on the spot. :P The _txtCol changes the "Quick Search:" text color.
Edited by Eureka, Dec 15 2007, 07:25 PM.
Offline Profile Quote Post Goto Top
 
jediman (S)
Member Avatar
Hmmmm......
[ *  *  * ]
It sort of works except half is on the sub menu the other half isnt
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · User Created Codes · Next Topic »
Add Reply