Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 08:38 pm EST
Geeklog Forums
Search Word Ranking Plugin
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
Hi All,
I've just finished writing a plugin that implements a log for search queries and provides an optional phpblock to display the top N results. And I would be very thankful, if you would download it, give it a go and let me know what you make of it.
Features:
Rouslan
EDIT @ 1-JUL-2011: New version also available:
Download: http://code.google.com/p/geeklog/downloads/detail?name=searchrank_1.1.0_1.6.0.tar.gz
New in 1.1.0:
I've just finished writing a plugin that implements a log for search queries and provides an optional phpblock to display the top N results. And I would be very thankful, if you would download it, give it a go and let me know what you make of it.
Features:
- Provides a Right Block, a Left Block or Nothing (to silently log the queries).
- Items in the block are clickable.
- Provides a log viewer and an option to clear the log.
- Groups hits to save disk space and be faster.
- Deletes entries after N days.
- Supports MySQL and PgSQL.
- Geeklog 1.6.0+ for MySQL.
- Geeklog 1.7.0+ for PgSQL.
Rouslan
EDIT @ 1-JUL-2011: New version also available:
Download: http://code.google.com/p/geeklog/downloads/detail?name=searchrank_1.1.0_1.6.0.tar.gz
New in 1.1.0:
- Better database performance
- Better log viewer
- Option to show top ten search queries in the site statistics
- Proper CSS layout
- Some new configuration settings
- Some updated icons
- Some small bugfixes
- Bulgarian translation
- Italian translation
- German translation
- Japanese translation
- Portuguese translation
12
13
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hi,
I downloaded the plugin. Automatic install was not possible certainly due to the folder name searchrank_1.0.0_1.6.0
You must rename the folder searchrank before make your archive (.tar.gz or zip)
I like your code to go to the configuration area :
<form name='searchrank_conf_link' action='{$_CONF['site_admin_url']}/configuration.php' method='POST'>"
. "<input type='hidden' name='conf_group' value='searchrank'></form>"
. "<div style='text-align: center; margin: 10px; width: 200px;'>"
. "<a style='text-decoration: none;' href='#' onclick=\"document.searchrank_conf_link.submit()\">"
. "<img alt='' src='{$imgpath}/configuration.png'" . XHTML . "><br" . XHTML . ">{$LANG_SEARCHRANK_1['conf_link']}</a>
I also found a bug. Apostrophe are not escape in search query.
Very nice plugin :shakehands:
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
I downloaded the plugin. Automatic install was not possible certainly due to the folder name searchrank_1.0.0_1.6.0
You must rename the folder searchrank before make your archive (.tar.gz or zip)
I like your code to go to the configuration area :
Text Formatted Code
<form name='searchrank_conf_link' action='{$_CONF['site_admin_url']}/configuration.php' method='POST'>"
. "<input type='hidden' name='conf_group' value='searchrank'></form>"
. "<div style='text-align: center; margin: 10px; width: 200px;'>"
. "<a style='text-decoration: none;' href='#' onclick=\"document.searchrank_conf_link.submit()\">"
. "<img alt='' src='{$imgpath}/configuration.png'" . XHTML . "><br" . XHTML . ">{$LANG_SEARCHRANK_1['conf_link']}</a>
I also found a bug. Apostrophe are not escape in search query.
Very nice plugin :shakehands:
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
8
14
Quote
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
Quote by: cordiste
Automatic install was not possible certainly due to the folder name searchrank_1.0.0_1.6.0
Thanks Ben, I recompressed the package the correct way. It should work now
Quote by: cordiste
I also found a bug. Apostrophe are not escape in search query.
Could you please clarify where the problem is. I used "addslashes" when saving to and "stripslashes" when retrieving from the database. So I'm not sure about where this problem is manifesting itself. Thanks.
Rouslan
6
10
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Oups sorry it is a bud from the forum plugin.
If I try a search on "Roccivic's first plugin" with forum plugin 2.7.4 enable, I get a SQL error:
An error has occurred:
This is being displayed as "Root Debugging" is enabled in your Geeklog configuration.
If this is a production website you must disable this option once you have resolved any issues you are investigating.
256 - An SQL error has occurred. Please see error.log for details. @ C:\wamp\www\geeklog-1.7.1\system\databases\mysql.class.php line 260
array(3) {
["sql"]=>
string(202) "SELECT id,name,forum,date,subject,comment,views,uid FROM gl_forum_topic WHERE 1=1 AND (comment LIKE '%Roccivic's first plugin%' OR subject LIKE '%Roccivic's first plugin%') ORDER BY date DESC LIMIT 0,5"
["ignore_errors"]=>
int(0)
["result"]=>
bool(false)
}
Very usefull plugin :shakehands:
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
If I try a search on "Roccivic's first plugin" with forum plugin 2.7.4 enable, I get a SQL error:
Text Formatted Code
An error has occurred:
This is being displayed as "Root Debugging" is enabled in your Geeklog configuration.
If this is a production website you must disable this option once you have resolved any issues you are investigating.
256 - An SQL error has occurred. Please see error.log for details. @ C:\wamp\www\geeklog-1.7.1\system\databases\mysql.class.php line 260
array(3) {
["sql"]=>
string(202) "SELECT id,name,forum,date,subject,comment,views,uid FROM gl_forum_topic WHERE 1=1 AND (comment LIKE '%Roccivic's first plugin%' OR subject LIKE '%Roccivic's first plugin%') ORDER BY date DESC LIMIT 0,5"
["ignore_errors"]=>
int(0)
["result"]=>
bool(false)
}
Very usefull plugin :shakehands:
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
9
11
Quote
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
Quote by: cordiste
How to only display the Most Searched block to root user?
::Ben
I think that in file functions.inc, near line 309, you should change the following:
Text Formatted Code
SEARCHRANK_housekeeping();$retval = array();
if ($_SR_CONF['showblock']) {
if (($side=='left' && $_SR_CONF['isleftblock'] == 1) || ($side=='right' && $_SR_CONF['isleftblock'] == 0)) { // Create a block
$results = SEARCHRANK_getResults(0, $_SR_CONF['maxresults']);
to
Text Formatted Code
SEARCHRANK_housekeeping();$retval = array();
if ($_SR_CONF['showblock'] && SEC_inGroup('Root')) {
if (($side=='left' && $_SR_CONF['isleftblock'] == 1) || ($side=='right' && $_SR_CONF['isleftblock'] == 0)) { // Create a block
$results = SEARCHRANK_getResults(0, $_SR_CONF['maxresults']);
I can make it a configuration option for next version
Rouslan
11
31
Quote
Ales
Anonymous
Congratulations, this is surely one of the most useful plugins, and longest expected
13
7
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Quote by: Roccivic
I can make it a configuration option for next version
I can make it a configuration option for next version
Thanks, It will be a nice feature.
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
12
15
Quote
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
Quote by: Laugh
A good idea for a plugin. I have always wondered what the top search queries are for my sites are to help better organize them.
I think it was Ivy's and Dirk's idea
http://project.geeklog.net/tracking/view.php?id=1279
Quote by: cordiste
Side and order sorting for this block would be also very usefull.
You can already choose if you want to show a right block or a left block in the settings. It's worded a bit awkward though, I guess.
You can set "Display Block on Left" to false to show the block on right.
And I agree, the block order should also be a configuration setting, so I will add it in.
Rouslan
11
8
Quote
Status: offline
ivy
Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
Hi Roccivic,
Thank you so much!
http://www.ivywe.co.jp/downloads/index.php/Search_Word_Ranking
I uploaded Japanese language file for this plugin.
Geeklog Japan https://www.geeklog.jp
Thank you so much!
http://www.ivywe.co.jp/downloads/index.php/Search_Word_Ranking
I uploaded Japanese language file for this plugin.
Geeklog Japan https://www.geeklog.jp
8
11
Quote
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
This plugin now has a home here: http://code.google.com/p/geeklog/ and the development of version 1.1.0 has already started. Feel free to submit bug reports, feature requests and patches to the tracker here: http://code.google.com/p/geeklog/issues/list
Rouslan
Rouslan
9
8
Quote
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
I've just packaged version 1.1.0 of the Search Word Ranking plugin and uploaded it to Google Code.
Download: http://code.google.com/p/geeklog/downloads/detail?name=searchrank_1.1.0_1.6.0.tar.gz
New in 1.1.0:
Download: http://code.google.com/p/geeklog/downloads/detail?name=searchrank_1.1.0_1.6.0.tar.gz
New in 1.1.0:
- Better database performance
- Better log viewer
- Option to show top ten search queries in the site statistics
- Proper CSS layout
- Some new configuration settings
- Some updated icons
- Some small bugfixes
- Bulgarian translation
- Italian translation
- German translation
- Japanese translation
- Portuguese translation
13
6
Quote
All times are EST. The time is now 08:38 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content