Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by
I am looking to offer the user the last, similar or most important searches, but I do not see that searches are saved.

So, how would one go to save all searches, like terms, combination of terms or whole questions in a table ?

It could really be helpfyl to know, what the users are searchng for.


Q2A version: 1.6.2
+1 This is good and interesting idea..

2 Answers

+2 votes
selected by
Best answer
if you have the eventlogger enabled, the search terms get saved in db table qa_eventlog.

There you can just read them, count them, and display them frontend. Should be not that hard =)


PS: I disabled logging of the search event, as a bot once gave me about 10000 search requests in one day and filled up the database. This you should also take into consideration...
I turned that on and it works great . It as well stores the ip number, so I can check if within the last 50 searches are more than 20 from the same ip and either stop recording or block the ip.

I just need to reduce the eventlogger so it only stores searches and done.

After that I need to find how to show to a user related searches (searches which as well include the actual search term....)

Thanks !!!!
Great work You have done with Your live stream page.
Is there anywhere a sample how to output a simple list of events ?

Your question http://www.question2answer.org/qa/22480/any-way-to-exclude-search-events-from-event-logger already showed me how to save some events only....
+3 votes
You can capture searches with an event module in a plugin.
I prefer to start from the event logger, this seems to be easier for me...