We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Search This Forum
Topic Started: Dec 6 2016, 12:32 AM (618 Views)
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code Name: Search This Forum

What the code does: Creates a search area to only search the forum you are in. Top View - Bottom View

How to use the code: Top view is default, for bottom view simply delete the text top from the script.

How to install the code:

Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
var locationW = 'top';
</script>
<script type="text/javascript" src="http://b2.ifrm.com/63/1/0/p702491/Search_This_Forum.js"></script>
Offline Profile Quote Post Goto Top
 
Sree
Member Avatar
Member
[ *  * ]
This is very useful!
Great code Cory!
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Common default feature of many forum software's. Surprised no one released/requested it until recently.
Offline Profile Quote Post Goto Top
 
Sree
Member Avatar
Member
[ *  * ]
Cory
Dec 8 2016, 10:41 PM
Common default feature of many forum software's. Surprised no one released/requested it until recently.
I agree.
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

I could have sworn Joe created something like this on Outline or something. Nice code nonetheless.
Offline Profile Quote Post Goto Top
 
polocolo
Member Avatar
Member
[ *  *  * ]
Thank you!
Offline Profile Quote Post Goto Top
 
Joe
Member Avatar


DaPizzaMan
Dec 9 2016, 04:50 PM
I could have sworn Joe created something like this on Outline or something. Nice code nonetheless.
Haha, I did. I must not have released it, I just put it on the board. I also threw it into the toolbox code I have for here. :zombie:

Nice code Cory! If you're curious, mine looked like this:
Code: HTML
 
if (location.href.indexOf("/forum/") !== -1) {
var f_id = location.href.split("/forum/")[1].split("/")[0];

function resolved_search() {
var date = new Date;
var query = $("input[name = search]").val();
$("div.resolved ").html("Searching, please wait..");
window.location = main_url + "search/?c=1&q=" + query + "&type=topic&sort=desc&forum%5B%5D=" + f_id + "&s_m=2&s_d=25&s_y=2008&e_m=" + parseInt(date.getMonth() + 1, 10) + "&e_d=" + date.getDate() + "&e_y=" + date.getFullYear()
}
$(
"div.cat-buttons:first").after('<div class="search" style="display:none;width:100%;clear:both"><table><tr><th>Search this forum</th></tr><tr><td><div class="resolved"><input type="text" name="search"> <button type="submit" onclick="javascript:resolved_search();">Search</button></td></div></tr></table><br /></div>');
$("div.search").slideDown("slow");
$("input[name=search]").keypress(function(e) {
if (e.keyCode == 13) resolved_search()
})
}
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply