Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Search Logger plugin - terms truncated to 25 characters

Quote Reply
Search Logger plugin - terms truncated to 25 characters
Hi!

I am using Search Logger plugin and search terms are truncated to 25 characters. Crazy

How to increase this to more than 25?

Thanks in advance!
Quote Reply
Re: [Payooo] Search Logger plugin - terms truncated to 25 characters In reply to
I think you need to edit the SearchLogger.pm file. Within the sub Top_Keywords you will find a line something like this

unless (length $term <= 25) {$term = substr ($term, 0, 25);}

just put a # symbol in front to stop it from being executed in the script.

#unless (length $term <= 25) {$term = substr ($term, 0, 25);}
Quote Reply
Re: [afinlr] Search Logger plugin - terms truncated to 25 characters In reply to
THANKS! afinlr


I am using SearchLogger Version 1.1 available at plugins download.
The SearchLogger.pm doesn't even contains sub Top_Keywords but searching
for "substr" gave me a clue :)

Is there any newer/other version available?

If anybody else (with not_so_much_of_programming_knowledge) wants to
change the number of characters tracked, here is the solution:

If you have already installed this plugin uninstall it and
edit Install.pm and SearchLogger.pm.



How to edit?
Go to Plugins > Box Uninstalled Plugins > Edit




In Install.pm change :

Term => { pos => 1, type => 'CHAR', size => '25', not_null => 1 },

(Change '25' to any number you like, maxium is 255)




In SearchLogger.pm change:

$query = substr ($query, 0, 24);

(Change 24 to your above selected number - 1)






Thats it.
Works great for me.

I hope everything here is OK and true :)
Quote Reply
Re: [Payooo] Search Logger plugin - terms truncated to 25 characters In reply to
Sorry - I think I got my version from the forum somewhere - try searching for SearchLogger - it may not be available any more. Mine also says 1.1 so it might even be an older version.

Laura.