[PLUGIN] Search for Bludit

User avatar
lhenriksson
Jr. Bludit
Posts: 9
Joined: Wed Aug 02, 2017 10:38 pm
Location: Sweden
Contact:

Hi all,

I woke up sick today and thought, why not use this day alone to create a search plugin for Bludit. I recently pushed the first working version to GitHub and thought I should make a post here. Hope someone will find this useful.

The plugin is positioned at siteBodyEnd at blog page and posts. It uses jQuery to submit the search to a .php file that is located in the plugin folder.

It uses a small "hack" to search the files/database for posts that have the searched words.

I don't know how smart and accepted it is to do the search the way the plugin does. But it works for me.

You can find the plugin live at the bottom of https://lhenriksson.se/blog

The code can be found here https://github.com/lhenriksson/Bludit-search
The web should be a beautiful place created with and care.
https://lhenriksson.se
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Thank you very, very much! This is what people were asking for.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
amr
Master Bludit
Posts: 56
Joined: Fri Apr 22, 2016 8:36 am
Location: Egypt
Contact:

hello , thanks verry much !!! , how it works because i cant see it in the footer :(
User avatar
lhenriksson
Jr. Bludit
Posts: 9
Joined: Wed Aug 02, 2017 10:38 pm
Location: Sweden
Contact:

amr wrote: Tue Aug 29, 2017 4:53 pm hello , thanks verry much !!! , how it works because i cant see it in the footer :(
It should be placed in the Theme::plugins('siteBodyEnd') of the theme. It works fine for me. Need some information to find the problem. :)

The first version only shows on blog/posts, but have updated the plugin with settings to choose where it shoud show(page/post/blog), just download the latest from GitHub :)

Is your Bludit installation in a subdirectory?
What theme do you use?
Does the .css and .js file exist in the head tag (check the sourcecode)
The web should be a beautiful place created with and care.
https://lhenriksson.se
Frederick
Jr. Bludit
Posts: 3
Joined: Wed Sep 13, 2017 5:46 pm

Any idea of how to replace the searchbox of the Core theme with this plugin? :cry:
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Frederick wrote: Wed Sep 13, 2017 5:54 pm Any idea of how to replace the searchbox of the Core theme with this plugin? :cry:
I do not understand what you mean with core theme? And what a plugin has to do with a theme?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Frederick
Jr. Bludit
Posts: 3
Joined: Wed Sep 13, 2017 5:46 pm

Edi wrote: Wed Sep 13, 2017 6:05 pm
Frederick wrote: Wed Sep 13, 2017 5:54 pm Any idea of how to replace the searchbox of the Core theme with this plugin? :cry:
I do not understand what you mean with core theme? And what a plugin has to do with a theme?
Core theme for Bludit: https://github.com/anaggh/core

I want to replace the searchbox with the searchbox of this plugin but I can't.
User avatar
lhenriksson
Jr. Bludit
Posts: 9
Joined: Wed Aug 02, 2017 10:38 pm
Location: Sweden
Contact:

I will look at the theme and try to find a solution tomorrow!

Can probably to a easy work around for the theme!
The web should be a beautiful place created with and care.
https://lhenriksson.se
Frederick
Jr. Bludit
Posts: 3
Joined: Wed Sep 13, 2017 5:46 pm

lhenriksson wrote: Wed Sep 13, 2017 9:07 pm I will look at the theme and try to find a solution tomorrow!

Can probably to a easy work around for the theme!
Thanks you so much! I really appreciate your work.
User avatar
lhenriksson
Jr. Bludit
Posts: 9
Joined: Wed Aug 02, 2017 10:38 pm
Location: Sweden
Contact:

Updated version.
  • Now possible to manually add the search box html code into theme so it can be placed anywhere you want. (The HTML code is printed in the settings page of the plugin)
  • If your theme dosn't have jQuery, you can select so the plugin adds the jQuery script.
One important thing to make the plugin work is that the plugin folder is named "search". That's because the script checks inside that folder.

So please download the new version.

I'm sorry if there's any bugs or the source code is bad, it has been coded with a text editor on my mobile.
The web should be a beautiful place created with and care.
https://lhenriksson.se
Post Reply