Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Search results without hits and last changing
Avatar
Skipper.KA #1
Member for a month · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: Search results without hits and last changing
Hi,

I'm seraching for a opportunity to hide the additional information in the search result page.

For every result there are information of the found hits in the page and when it has been change last time. I would like to hide this information to improve clarity of the search result page.

Thanks in advance for any ideas.
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4446 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
A week or two ago I answered a closely related question:
   https://forum.dokuwiki.org/thread/16487
The code there requires a small change:
class action_plugin_fsearch extends DokuWiki_Action_Plugin
{

    public function register(Doku_Event_Handler $controller)
    {  
       $controller->register_hook('SEARCH_RESULT_FULLPAGE', 'BEFORE', $this, 'fullpage',array());
    }

    public function fullpage(Doku_Event $event, $param)
    {
      // $icon = "<br />TEST";
        //$event->data['resultHeader'][] = $icon;  
    $event->data['resultBody']['meta']= "";       
    }
       

}
Attached is the plugin.  Copy it to lib/plugins and unzip it there.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
The author has attached one file to this post:
fsearch.zip 698 Bytes
You have no permission to open this file.
Avatar
Skipper.KA #3
Member for a month · 4 posts
Group memberships: Members
Show profile · Link to this post
Thanks a lot for your solution, Mayron.

It is exactly what I was looking for!
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4446 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Generally, I guess, people prefer the metadata, but this makes a nice clean job of the output.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-01-17, 20:48:40 (UTC +01:00)