[OzzModz] Google Search

[OzzModz] Google Search 2.0.0

No permission to download

Ozzy47

Well-known member
Ozzy47 submitted a new resource:

[OzzModz] Google Search - Integrates Google Search Engine in your forum

Requirements:
XenForo 2.2.0+

Description:

This addon integrates Google Search Engine in your forum allowing users to search the forum with Google search.

Moreover, Google search can be automatically performed if standard XenForo search system haven't found anything or failed.

You must register your Google Search Engine and put its ID in the addon options or the addon will not work.

Remake of the...

Read more about this resource...
 
Can somebody post an image of an example results page? I'm still behind a firewall in dev, can't expose the dev site to Google yet, and so can't test it live yet. I do not like the layout of XF search results and am wondering what the google result looks like. Thanks!!
 
I have a error which started when I installed the Xenforo security update v2.2.11.

One of these pops up in the logs every time someone searches. When I disable this add-on it doesn't do this.

  • ErrorException: [E_WARNING] Attempt to read property "result_count" on null
  • src/XF/Pub/Controller/Search.php:153
  • Generated by: Unknown account
  • Oct 12, 2022 at 2:42 PM

Stack trace​

#0 src/XF/Pub/Controller/Search.php(153): XF::handlePhpError(2, '[E_WARNING] Att...', '/home2/sd/publi...', 153)
#1 src/XF/Mvc/Dispatcher.php(352): XF\Pub\Controller\Search->actionResults(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'Results', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Search), Object(XF\Mvc\Reply\Reroute))
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Search), Object(XF\Mvc\Reply\Reroute))
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#6 src/XF.php(524): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state​

array(4) {
["url"] => string(16) "/search/1298819/"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Last edited:
I have a error which started when I installed the Xenforo security update v2.2.11.

One of these pops up in the logs every time someone searches. When I disable this add-on it doesn't do this.

It was a bug present for a couple of hours in Xenforo v2.2.11 in the end and not in @Ozzy47's add-on!


I downloaded/ran the update again, manually, and this time it didn't have the error.

Sorry @Ozzy47! 😁
 
BTW: Why do we still use the old-fashioned system to click on search and enter a word?
The page with results - forum or Google - now:

Results for search: search-word

We are in 2023 and the usability for a second search is really bad here.
Instead of this, we could have another form with the used search word.


Results for

[____________ old search-word ____________________] [SEARCH AGAIN]

If you want to use the old method, do!
If you need only one search, it doesn't hurt.

But if you need a second, third or 100th search, you don't have to use the click for the xenforo search again and again.

I guess this would save some 10.000 clicks per year for me alone; maybe some 100.000 or more for my users.

And no, I don't want to have another addon or template.
But the search form on this result page would be a real improvement.
 
My installation is working except for one problem. The Google search is not finding anything on the forum.
There are two likely causes as the forum is a members forum within a website.
Am I using the correct url in the Google search engine, it is set to the Xenforo root.
The second, possibly more likely issue is that the forum is password protected. It this an issue even though the search is initiated behind the password?
Note the Google search will find items on the website if the url is set to the website rather than the Xenforo root.
 
It this an issue even though the search is initiated behind the password?
The most likely issue is Google needs to have indexed the content to be able to provide search results (as this searches the XF site)... without being able to index the content, it can't give you any returns.
 
Hi @Ozzy47 , I've installed the add-on and included my Google Search engine ID, but I'm not seeing any option for Google search in the forum layout. Are there any configurations other than the one I see under Admin > Options?

I'm using XF 2.2.8.

Thanks!

Screenshot 2023-07-20 at 14.15.11.webp
Screenshot 2023-07-20 at 14.16.35.webp
 
Back
Top Bottom