How to add a search field?
Hi all,
I can't find any documentation about how to add a search field to the forums -- other than to add a community plugin.
The closest thing I can find is a document about how MySQL does searching -- http://vanillaforums.org/docs/search -- but that document doesn't say exactly how to add the search field.
Help?
Best Answers
-
peregrine MVP
the problem if you are using the embedfriendly theme and you choose hide sidepanels you won't see the search box. So you will need to manipulate things if you want it to show up and you have hidden side panel. you will need to look at what hide the panels. you might be able to remove the panel class from just the search box of look at the javascript (if any) or the css to get search panel but not other panels.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
1 -
peregrine MVP
panels are hidden in embedfriendly theme via the singlecolumn.css
If you still want singlecolumn
you could just add
{searchbox} in default.master.tpl in front of the dashboard link or after signout and style accordingly in singlecolumn.css. Just don't put the id="Panel" attached to any element if you want it visible.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
0
Answers
vanilla has a built in search field
There was an error rendering this rich post.
Thank you 422. How do I implement it? I'd like to place it at the top of the categories page. There's no documentation I've been able to find as of yet.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks @peregrine -- will try that later today or tomorrow and report back the results.
vanilla/library/vendors/SmartyPlugin is a wealth of information and it is very easy to create your own. I'm surprised this has never been mentioned.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
{asset name="Panel"}
</div>
Hi @peregrine -- sure enough, the default.master.tpl in EmbedFriendly (which I'm using) already had that section you listed. Is it that I need to enable the search box? If so, how do I do that?
@peregrine -- how did you drop in that grey/white alternating bar code display in your post above?
@philag i dont get why you want to add this when it is already added, are you using a custom theme?
There was an error rendering this rich post.
Depending on the theme you are using, it will have a default.master.tpl or a default.master.php. If you have the EmbedFriendly them the Search box should show up because it looks at the default.master.tpl file.
I haven't looked into where the tpl's are called from. But if your theme has a tpl - you can just add the above if it doesn't already have it. If you are using php, the other code line 10-16 in the post above may work.
cut and paste your code. then select (hilight it with you mouse) then press the C in the buttonbar.
the bold markdown is hit or miss so the bold html tags work better. The code and pre tags aren't the greatest within this context.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
the problem if you are using the embedfriendly theme and you choose hide sidepanels you won't see the search box. So you will need to manipulate things if you want it to show up and you have hidden side panel. you will need to look at what hide the panels. you might be able to remove the panel class from just the search box of look at the javascript (if any) or the css to get search panel but not other panels.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
panels are hidden in embedfriendly theme via the singlecolumn.css
If you still want singlecolumn
you could just add
{searchbox} in default.master.tpl in front of the dashboard link or after signout and style accordingly in singlecolumn.css. Just don't put the id="Panel" attached to any element if you want it visible.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
So that's why -- that fixed it
See I did that, and then it started interpreting the
<div class="SearchBox">
instead of just showing the characters. Even when I do tinker with the spaces a bit -- did I mention I prefer Texile to Markdown -- I don't get the alternating grey/white bars with the line numbers like you did in this comment -- http://vanillaforums.org/discussion/comment/162439/#Comment_162439 -- it's just a single white-background block:Weird -- now it gives me the alternating grey/white background with the line numbers.
Nope, EmbedFriendly. @peregrine figured it out: the single-columnar config for EmbedFriendly hides the search field because that search field is part of the aside-column.
Well i never knew that.
There was an error rendering this rich post.
@422 sounds like an opportunity for ya - single column with search box that embeds well for the people who don't want to mess with css. But the search will only be there as a token because it can't find much on anything anyway .
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I dont touch embed themes mate, i have enough on my plate lol.
There was an error rendering this rich post.
yep they are a nightmare.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.