Search Log

Search Log 2.9

No permission to download
And a suggestion:

Can you make a litle statistic abaove the table with the X most used search words? And X should be configurable over ACP. Thanks. :)
 
@AndyB - Is there any specific reason you decided to write the SQL queries in the controller itself? Curious to know if there are any advantages of this approach. For example -

Code:
// run query
$db->query("
INSERT INTO xf_search_log
(search_date, user_id, username, search_query, forum_constraints, user_constraints, title_constraints, newer_than, result_count)
VALUES
('$searchDate', '$userId', '$username', '$searchQuery', '$forumConstraints', '$userConstraints', '$titleConstraints', '$newerThan', '$resultCount')
");
 
Code:
$db->query("
            INSERT INTO xf_search_log
                (search_date, user_id, username, search_query, forum_constraints, user_constraints, title_constraints, newer_than, result_count)
            VALUES
                ('$searchDate', '$userId', '$username', '$searchQuery', '$forumConstraints', '$userConstraints', '$titleConstraints', '$newerThan', '$resultCount')
        ");

Might want to sanitize some of these variables before blindly inserting them, or use a DataWriter
 
Is it possible to click on the "Result Count" and see the results of the query as otherwise it i do it manually, it shows up in the search log. If not, it can be considered as suggestion for future version. Great add-on!
 
Since I've upgraded to 2.5 i've got a lot of errors in the logs

ErrorException: Fatal Error: Call to a member function result_metadata() on a non-object - library/Zend/Db/Statement/Mysqli.php:220
 
Hi

Is it possible to make a link to display the X most used same search words? So we can use for SEO.

edit:
Oh - **** hapens, I ask this also a time ago. Sorry. :(

Regards
 
Last edited:
Minor update. It looks like you could use 1 more character for the "Time" column so the time can always display consistently on one line.

As is, 8:43 AM is on one line, but 10:10 AM turns into two lines.

FYI.
 
The display layout is dependent on screen size and the size of some of the other fields.

For example, I have a search where someone typed in a couple sentences forcing some of the other fields to get smaller.

There isn't a bug. At best there is a min field size that could be forced for some columns such as time to keep them looking nice, forcing some others such as the query column to wrap earlier.
 
Thanks for this free addon, @AndyB :)

Just one thing I noted: The table width is such that it doesn't work correctly in the scenario where the sidebar is visible on all pages (and therefore, sidebar is there on the search log page as well). This makes some content in the last column unreadable.
 
Top Bottom