2007-02-22, 11:53 PM
I've been working on this one for quite a while, mainly because I don't get that much time to make plugins for MyBB anymore
Anyway, first off I would like to thank the following people:
Christian - For helping solve initial "teething" problems.
Zaher1988 - For spending well over an hour in msn with me, trying to work out why a simple template change wasn't working...
MiNT - For constant verbal abuse...I mean support...heh heh heh...
Search Highlight
This plugin is something I've always wanted in MyBB since I converted from phpBB, and finally I have got around to making it.
Essentially it highlights your search terms, both in the post search results, and in the posts themselves so that you can easily scroll down the page and spot what you are looking for without having to read every single post or use a browser search function.
Installation
Simply download the attached file (highlight.php), upload to your plugins folder, and activate.
How to use...
You can use this plugin in two ways:
1) Do a regular search and click a result link to see that thread with your highlighted search terms.
2) Whilst in a thread, add "&highlight={Search Terms}" to the end of the url, where the {Search Terms} are the words you want to highlight.
You can separate terms using a "+":
showthread.php?tid=1&highlight=hello+goodbye
or a space:
showthread.php?tid=1&highlight=hello goodbye
If you can't be bothered to type "&highlight=" every time, you can use the shorthand version: "&hl="
It should be noted that if the showthread url is like this: showthread.php?tid=1&pid=1#pid1, the &hl={Search Terms} MUST go before the "#" like so:
showthread.php?tid=1&pid=1&hl=Hello Goodbye#pid1
Screenshots
[attachment=5536][attachment=5535][attachment=5537]
Known Issues
-Links to "next page" on search results and threads do not include the highlight code. I am working on fixing this!
Live Example
My forums (http://www.drpoodle.com/forums) have this plugin installed, so feel free to try it out there.
Enjoy!
-DrPoodle
Anyway, first off I would like to thank the following people:
Christian - For helping solve initial "teething" problems.
Zaher1988 - For spending well over an hour in msn with me, trying to work out why a simple template change wasn't working...
MiNT - For constant verbal abuse...I mean support...heh heh heh...
Search Highlight
This plugin is something I've always wanted in MyBB since I converted from phpBB, and finally I have got around to making it.
Essentially it highlights your search terms, both in the post search results, and in the posts themselves so that you can easily scroll down the page and spot what you are looking for without having to read every single post or use a browser search function.
Installation
Simply download the attached file (highlight.php), upload to your plugins folder, and activate.
How to use...
You can use this plugin in two ways:
1) Do a regular search and click a result link to see that thread with your highlighted search terms.
2) Whilst in a thread, add "&highlight={Search Terms}" to the end of the url, where the {Search Terms} are the words you want to highlight.
You can separate terms using a "+":
showthread.php?tid=1&highlight=hello+goodbye
or a space:
showthread.php?tid=1&highlight=hello goodbye
If you can't be bothered to type "&highlight=" every time, you can use the shorthand version: "&hl="
It should be noted that if the showthread url is like this: showthread.php?tid=1&pid=1#pid1, the &hl={Search Terms} MUST go before the "#" like so:
showthread.php?tid=1&pid=1&hl=Hello Goodbye#pid1
Screenshots
[attachment=5536][attachment=5535][attachment=5537]
Known Issues
-Links to "next page" on search results and threads do not include the highlight code. I am working on fixing this!
Live Example
My forums (http://www.drpoodle.com/forums) have this plugin installed, so feel free to try it out there.
Enjoy!
-DrPoodle