Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Updated Search Timer Plugin

Quote Reply
Updated Search Timer Plugin
I started a new thread to make it easier to find.

I've updated the search timer plugin and added a user option to allow you to specify the number of decimal places to show.

You just need to put <%search_time%> in your search_results.html template.

Attached is the plugin.

Thanks.

(Let me know how it works)

PS. Remember you need Time::HiRes for it to work.

Last edited by:

PaulW: Dec 16, 2001, 4:46 AM
Quote Reply
Re: [PaulW] Updated Search Timer Plugin In reply to
Hi Paul,

Cool, let me know if you'd like to add it on Gossamer.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Updated Search Timer Plugin In reply to
Definitely. I was going to ask you anyway :)

Feel free to download the attachement and upload it to your server.

Thanks.

Last edited by:

PaulW: Dec 16, 2001, 1:57 PM
Quote Reply
Re: [PaulW] Updated Search Timer Plugin In reply to
Done! Feel free to update the wording. =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Updated Search Timer Plugin In reply to
Merci beaucoup Cool

Im not sure why I continue to speak in French - I used to hate it at school :)
Quote Reply
Re: [PaulW] Updated Search Timer Plugin In reply to
The new timer download seems corrupt.

From the plugin download menu...

Unable to load plugin /home/cgi-bin/db/admin/Plugins/Uninstalled/Timer.tar Reason: Unable to parse tar file: Checksum Error parsing tar file. Most likely this is a corrupt tar. Header:

~ ERASER


Free JavaScripts @ Insight Eye
Quote Reply
Re: [Eraser] Updated Search Timer Plugin In reply to
Hi,

Thanks for pointing that out. Thats strange. I've got a copy on my pc that works. It is 11kb - the version downloaded from GT is 8kb so I updated it with the 11kb file and it still downloads as 8kb.

I think this maybe something for Alex to deal with unless there is something in the plugin that the downloader/installer doesn't like.

You can always use the copy above attached to the post.


Last edited by:

PaulW: Dec 17, 2001, 5:48 AM
Quote Reply
Re: [PaulW] Updated Search Timer Plugin In reply to
Thanks for the plugin, Paul!

You may not have the Spider Plugin, but it doesn't work when using a spider=1 or spider_only=1 to search the database. You get an unknown tag (search_time) error. I have the Spider Plugin installed, and search both databases (Links and Spider). Maybe Alex could shed some light on this one...

Sean
Quote Reply
Re: [SeanP] Updated Search Timer Plugin In reply to
Hi,

I'm not familiar with the Spider plugin so I think Alex may have to help there Unsure
Quote Reply
Re: [PaulW] Updated Search Timer Plugin In reply to
Hi,

The problem with the download is that the plugin name was wrong. It must match exactly with the package name (i.e. it was listed as 'Search Timer', but in the code it was 'Timer').

As for the Spider, it's a problem with the plugin order. We don't have a nice editor to change this yet, but what you have to do is manually edit the plugin.cfg file, and look for search_results hook. The fourth argument is the order the hook will be run, make sure the search timer is a lower number then the Spider, and you should be fine.

We plan to add this into the Plugins menu in a later version.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Updated Search Timer Plugin In reply to
Oops now how did that happen. Blush

Thanks for fixing it.


Last edited by:

PaulW: Dec 17, 2001, 1:47 PM
Quote Reply
Re: [Alex] Updated Search Timer Plugin In reply to

In Reply To
As for the Spider, it's a problem with the plugin order. We don't have a nice editor to change this yet, but what you have to do is manually edit the plugin.cfg file, and look for search_results hook. The fourth argument is the order the hook will be run, make sure the search timer is a lower number then the Spider, and you should be fine.







My under the spider section, for hooks I have:

Code:


'hooks' => [
[
'search_results',
'PRE',
'Plugins::Spider::pre_search_results',
'1'
],
[
'search_results',
'POST',
'Plugins::Spider::post_search_results',
'1'
],
[
'reindex_database',
'POST',
'Plugins::Spider::post_reindex_database',
'1'
]
],


for the timer I have:

Code:


'hooks' => [
[
'search_results',
'PRE',
'Plugins::Timer::Start',
'1'
],
[
'search_results',
'POST',
'Plugins::Timer::Stop',
'1'
]
],


Do you mean I should change all three ones under the spider hook section to twos or something?

Sean
Quote Reply
Re: [SeanP] Updated Search Timer Plugin In reply to
Exactly! Well you only need to do it for the search_results entries, but it wont hurt anything for the others.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Updated Search Timer Plugin In reply to
Thanks, Alex! I'll give it a try...

Sean