×
Kunena 5.2 Beta 1 Released (24 Sep 2020)

The Kunena team is thrilled to announce the first public beta release of Kunena 5.2, a native Joomla extension for Joomla 3.9. This is a development release and should be only be used for testing; this version is not recommended for live websites at this stage.

The purpose of this release is to encourage testing by downloading, installing and identifying any problems or shortcomings that people may discover. K 5.2.0 B1 is stable and we are aware that people will discover defects. We encourage you to use the forum to report defects, as soon as they are discovered, so that the development team can work through the problems before the release of K 5.1 as a stable product. Reporting defects does not mean that the problems can or will be fixed. The Kunena team is looking forward to hearing your feedback on how well we have achieved our design goals.

Question Search: fix highlight search results #3090

More
5 years 3 months ago - 5 years 3 months ago #1 by Cristiand
Hello,

github.com/Kunena/Kunena-Forum/issues/3090

Highlight search results.
I assume this highlights the words you were looking for on the search result list. Is this correct?

Seems disabled in version 403, what is broken about it? Any information on when it will be fixed or what is the state of it?
Last edit: 5 years 3 months ago by Cristiand.

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #2 by 810
its disabled since K1.6 but is still broken. Its on todo list

see: github.com/Kunena/Kunena-Forum/pull/3120
The following user(s) said Thank You: Cristiand

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #3 by Cristiand
in /components/com_kunena/views/search/view.html.php lines ~160
Went with:
$ressubject = preg_replace( "/(". $searchword .")(?=[^>]*(<|$))" . "/iu", '<span  class="searchword" >' . $searchword . '</span>', $ressubject);
$resmessage = preg_replace ( "/(". $searchword .")(?=[^>]*(<|$))" . "/iu", '<span  class="searchword" >' . $searchword . '</span>', $resmessage );

Seems to do the job fine and doesn't interfere with urls.

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #4 by 810
it will break when find a searchword in an image name, then the html will break

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #5 by Cristiand
Understandable, but the solution works for us, something that looks like this:

<img src="joomla/joomla.jpg" alt="joomla">

has this markup:

<div class="kmsgtext resultmsg">
&lt;img src="<span class="searchword">joomla</span>/<span class="searchword">joomla</span>.jpg" alt="<span class="searchword">joomla</span>"&gt; </div>

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #6 by 810
yes, then you see the html not the image itself

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.130 seconds