Hello my friends
My forum is getting a lot of searches from anonymous users not registering or valuing the true essence of the community (which is helping others), so I have decided to create a component to remove the native discourse search engine (it really hides it) and show only the Google search engine, which searches within the forum’s domain (indexed content) and at the same time puts up advertising so it monetizes the searches by adsense.
So this component eliminates the ability for users to use Discourse’s native search engine. Instead, they will use the search engine powered by Google, and it allows adding monetization through it.
My original idea is to remove the native Discourse search engine for anonymous and users with TL0 - TL1, while to the rest of the registered users, hide the new Google search engine and show them the native one.
I wanted to put the search engine on the "
header " section, however I couldn’t find a way via CSS to place it inside the "
panel clearfix " class. I’m sure someone on the forum can help out with this.
Finally I did some css changes and put the Google’s search into the header nav:
- Repo & Info: https://github.com/SidVal/discourse-google-search#readme
- Public Demo: https://foros.consultoria-sap.com/
Hopefully someone will join the idea and we will improve this development together!
You take care of yourself and we all take care of ourselves!
Why not a Theme Creator preview?
About theme-creator, I tried to configure a new “google-search” to do testing directly from the theme-creator, but I get the error: “
Refused to load the script ... because it violates the following Content Security Policy directive:" script-src ....”