Giter Club home page Giter Club logo

dokuwiki-plugin-searchstats's People

Contributors

bryanbutlergit avatar imhodad avatar sawachan avatar splitbrain avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

dokuwiki-plugin-searchstats's Issues

No Start/End time displayed

Currently there's no start / end time displayed for the statistics.
It would be of great help to know, which period of time the statistics cover.

PHP8: TypeError: closedir(): Argument #1 ($dir_handle) must be of type resource or null, bool given

TypeError: closedir(): Argument #1 ($dir_handle) must be of type resource or null, bool given

An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the searchstats plugin.

More info has been written to the DokuWiki error log.
2022-02-05 22:39:07TypeError: closedir(): Argument #1 ($dir_handle) must be of type resource or null, bool given /usr/local/www/wiki/lib/plugins/searchstats/helper.php(63)
    #0 /usr/local/www/wiki/lib/plugins/searchstats/helper.php(63): closedir()
    #1 /usr/local/www/wiki/lib/plugins/searchstats/action.php(34): helper_plugin_searchstats->getSearchWordArray()
    #2 /usr/local/www/wiki/lib/plugins/searchstats/admin.php(32): action_plugin_searchstats->getSearchWordArray()
    #3 /usr/local/www/wiki/inc/Action/Admin.php(33): admin_plugin_searchstats->handle()
    #4 /usr/local/www/wiki/inc/ActionRouter.php(83): dokuwiki\Action\Admin->preProcess()
    #5 /usr/local/www/wiki/inc/ActionRouter.php(48): dokuwiki\ActionRouter->setupAction()
    #6 /usr/local/www/wiki/inc/ActionRouter.php(60): dokuwiki\ActionRouter->__construct()
    #7 /usr/local/www/wiki/inc/actions.php(16): dokuwiki\ActionRouter::getInstance()
    #8 /usr/local/www/wiki/doku.php(122): act_dispatch()
    #9 {main} 

Patch: Change of SaveFolder Location

I'm using the Plugin in a Farm setup and had to change the save folder location.

I don't know if $conf['indexdir'] is a sensible place for it, but maybe one could even remove the Plugins config option?

Anyway, here's the patch:

diff -urN -x'*~' searchstats/conf/default.php /usr/local/www/dokuwiki/lib/plugins/searchstats/conf/default.php
--- searchstats/conf/default.php    2010-09-15 21:08:40.000000000 +0200
+++ /usr/local/www/dokuwiki/lib/plugins/searchstats/conf/default.php        2010-12-22 12:49:52.000000000 +0100
@@ -3,6 +3,6 @@
  * Options for the searchstats plugin
  */

-$conf['searchstats_savefolder']    = 'data/index/searchstats';   // sets folder where search words are stored
+$conf['searchstats_savefolder']    = 'searchstats';   // sets folder where search words are stored

-?>
\ No newline at end of file
+?>
diff -urN -x'*~' searchstats/helper.php /usr/local/www/dokuwiki/lib/plugins/searchstats/helper.php
--- searchstats/helper.php  2010-09-15 21:08:40.000000000 +0200
+++ /usr/local/www/dokuwiki/lib/plugins/searchstats/helper.php      2010-12-22 12:50:51.000000000 +0100
@@ -69,9 +69,10 @@
    }

    function _getSaveFolder() {
-           return $this->getConf('searchstats_savefolder');
+           global $conf;
+           return $conf['indexdir'].'/'.$this->getConf('searchstats_savefolder');
    }

 }

-?>
\ No newline at end of file
+?>

Quickfix for the ft_queryparser issue

I added a dirty little fix for the "2nd parameter" issue by adding the missing "$Indexer" according to how the function is used in http://xref.dokuwiki.org/reference/dokuwiki/inc/fulltext.php.source.html#l38

--- action.php~     2010-12-22 12:44:03.000000000 +0100
+++ action.php      2011-06-29 17:33:10.000000000 +0200
@@ -43,7 +43,7 @@
             * @author               Michael Schuh <[email protected]>
             */
            function _getSearchWords(&$event, $param) {
-                   $q = ft_queryParser($event->data['query']);
+                   $q = ft_queryParser(idx_get_indexer(),$event->data['query']);
                    if(is_array($q['highlight'])) {
                            $this->_checkSaveFolder();
                            foreach($q['words'] as $saveWord) {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.