MyBB Community Forums

Full Version: Searching posts with keywords
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to work on a mod that replaces certain text with a link that searches all the posts for other posts with that same text.  

I was wondering what the best way to setup that search would be?

I know I can replace the text with something like the following:
<form method="post" action="./search.php" target="_blank" style="display:inline;">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="posts" />
<input type="hidden" class="textbox" name="keywords" value="text" />
<a href="#" style="display:inline; onclick="document.forms[0].submit()">text</a>
</form> 

But that is forcing extra lines in my post.  I was wondering if there was something better I could replace it with that wasn't so ugly?

Thanks!