Improvement to result display in smart search

Results are truncated to a number of characters from the begining, so unless your query falls there, you won't see it in the results view, which may confuse the user who did the search.

This improves the truncation so that characters around the search query are shown. If it was the last word in the article, then chosen amount of characters before it will be shown (or after if it was at the begining), otherwise it aims for the search query to be in the middle of excerpt for optimal understanding.

If the match was not in the body of the description, then the first XXX characters will be shown like before.

Maybe such function would be useful to add to JHtml.string?
Update default_result.php
Update search.php
replaced previous solution by improved one
fixed typo
fixed typo
Reverted to first solution

The last solution integrating userState introduced a new issue where the ordering field was hold even when not passed in. So the userState is dropped again and the ordering field is evaluated on every page load.
Fixed typo

Replaced the expected REQUEST variables for filter order and filter order direction by commonly used variable names.
Update search.php
Update joomla.sql
Update joomla.sql
Update joomla.sql
Update joomla.sql
Hide the template thumb on phones

Tracker:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33666&start=0
[#33685] Featured article order now orders by a tertiary date
Make class properties protected instead of private so that they can be used by subclasses. Access  with static:: rather than self:: so that subclasses can maintain their own instances.
PR Request on Github from Joomla Code Patch

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30235

Angelika Reisiger was supplying a patch on joomlacode which has been patched here too now.
Update default.php
Update default.php
[#32744] All Modules type Articles Categories using same category