Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
Additional search field within page
Avatar
hj #1
Member since Apr 2008 · 167 posts · Location: Lancaster, UK
Group memberships: Members
Show profile · Link to this post
Subject: Additional search field within page
I'd like to add a search field within a wiki page - as well as having the default search bar at the top.

The reason is.. I want to draw focus to a search function for a particular namespace (and only that namespace). In a perfect world this search box would be bigger and bolder than the default dokuwiki one (see my rudimentary screenshot attached - green text bit is me trying to find a suitable indexing plugin!).

I've looked at search plugins but can't see anything which fits the bill, but maybe I've missed something?  I notice on the dokuwiki plugins page https://www.dokuwiki.org/plugins that there is a secondary search box on the page which appears to search only for plugins (presumably searching the plugins: namespace).  It's this kind of thing I'm after, but would prefer a much larger bolder presentation.

Anyone any ideas how to achieve?
The author has attached one file to this post:
Screen shot 2019-03-29 at 12.15.03.jpg 108 kBytes
You have no permission to open this file.
Avatar
cziehr #2
Member since Jan 2011 · 579 posts · Location: 10119 Berlin
Group memberships: Members
Show profile · Link to this post
I think this plugin does what you want: https://www.dokuwiki.org/plugin:searchform

Maybe the new searchbox can be styled with css to your needs.
Avatar
hj #3
Member since Apr 2008 · 167 posts · Location: Lancaster, UK
Group memberships: Members
Show profile · Link to this post
Hi cziehr,

Yes!  That does what I want, indeed - thank you.  :-)

Not sure how to style with CSS - there's a plugin https://www.dokuwiki.org/plugin:cssperpage which might help, but I'm not sure where I write the CSS?  If I go to lib/tpl/dokuwiki/css there's a folder with 22 css and less files in it!  No idea where I'd add the CSS for my searchbox.  There's also half a dozen css files in lib/styles, just to confuse things!

But thanks for finding the search plugin, that's the function I wanted.
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4646 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
You could create a file in the conf directory called userstyle.css.  Put the searchbox css there.  This would give you an input text box with yellow background and a smaller button with blue Search label:
form#searchform__search input[type='text'] {
  background-color: yellow;
}
form#searchform__search input.button[type='submit'] {
  color: blue;
  width:10em;
}
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
This post was edited on 2019-03-30, 16:44 by turnermm.
Avatar
turnermm (Moderator) #5
Member since Oct 2009 · 4646 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In my previous post, it should have been userstyle.css, not .csss, which I have now corrected. Attached is a screen shot of what the above css would look like.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
The author has attached one file to this post:
searchbox.png 5.2 kBytes
You have no permission to open this file.
Avatar
hj #6
Member since Apr 2008 · 167 posts · Location: Lancaster, UK
Group memberships: Members
Show profile · Link to this post
Thanks Myron, that did the trick nicely.  :-)   I can make a few more CSS mods there and get it just how I like. (I do rudimentary CSS and can style basic elements, but run out of gas on the more advanced stuff!)

I'm curious as to where you found the 'searchform' IDs?.... form#searchform__search input etc.  I looked in the searchform plugin files and couldn't see any such IDs.

On a more general note, I assume that you always put user css in the conf directory..??

Thanks.
Avatar
Michaelsy #7
Member since Jun 2015 · 940 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
Quote by hj:
I'm curious as to where you found the 'searchform' IDs?.... form#searchform__search input etc.  I looked in the searchform plugin files and couldn't see any such IDs.

Let you inspire by the search results with this keywords in your favorite search engine: "using browser inspector"

HTH - Michael Sy.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
Avatar
turnermm (Moderator) #8
Member since Oct 2009 · 4646 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In the English versions of the browsers, the secret is view source
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-06-25, 22:06:02 (UTC +02:00)