DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:searchpattern

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:searchpattern [2013-06-16 10:22] – update description translation and features 93.83.201.94plugin:searchpattern [2024-03-29 12:24] (current) – [SearchPattern Plugin] 87.174.165.192
Line 7: Line 7:
 type       : Syntax, Admin type       : Syntax, Admin
 lastupdate : 2013-06-16 lastupdate : 2013-06-16
-compatible : 2009-02-14b2009-12-252010-11-072013-03-06 "Weatherwax RC1"2012-10-13 "Adora Belle"+compatible : LemmingAnteaterRincewindAngua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, !Hogfather, !Kaos
 depends    :  depends    : 
 conflicts  conflicts 
Line 17: Line 17:
 ===== Information ===== ===== Information =====
  
-Ver. //2013-06-16// of SearchPattern plugin has been released (bugfixed fr lang file). Now the regex mode has a new option to output the specified or all matches and the plugin can call a handler method of other plugins for outputting the matches.+Ver. //2013-06-16c// of SearchPattern plugin has been released. Now the regex mode has a new option to output the specified or all matches and the plugin can call a handler method of other plugins for outputting the matches. A new admin option 'dispheadl' allows you to hide the table headline with search options (e.g. regex code) in result table. Bugfixed french translation and bad-option settings. \\
 This is used in the new version 2013-04-13 of the [[plugin:todo|Todo Plugin]]. \\ This is used in the new version 2013-04-13 of the [[plugin:todo|Todo Plugin]]. \\
-**Update Instructions:** The version //2013-04-15// is fully compatible to the previous versions, so an update to newest version should have no impact to older functionality (an update needs no additional configuration steps).+**Update Instructions:** The version //2013-06-16b// is fully compatible to the previous versions, so an update to newest version should have no impact to older functionality (an update needs no additional configuration steps).
  
 Ver. //0.2// of SearchPattern plugin has been released. You are now able to restrict the search area to selectable pages/namespaces. //All feedback is very welcome in the [[#Discussions|dedicated section]].// Ver. //0.2// of SearchPattern plugin has been released. You are now able to restrict the search area to selectable pages/namespaces. //All feedback is very welcome in the [[#Discussions|dedicated section]].//
Line 31: Line 31:
 $lang['ndqerr_admin_title'] = 'En cas d\'erreur sur des apostrophes non doublécute;es :';**\\ $lang['ndqerr_admin_title'] = 'En cas d\'erreur sur des apostrophes non doublécute;es :';**\\
 //Thanks to Frédéric for reporting it// //Thanks to Frédéric for reporting it//
 +// --- fixed in version 2013-06-16 [[user>leibler]]  2013/06/16 10:27//
 +
  
 ===== Download and Installation ===== ===== Download and Installation =====
  
-Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the following URL. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
-^ Download latest release | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_latest.zip | Latest release 2013-06-16]] |+^ Download latest release | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_latest.zip | Latest release 2013-06-16c]] |
 ^ Download bug fixed former release | [[http://dw-searchpattern.googlecode.com/files/dw_searchpattern_latest.tar.gz|dw_searchpattern_latest.tar.gz]] | ^ Download bug fixed former release | [[http://dw-searchpattern.googlecode.com/files/dw_searchpattern_latest.tar.gz|dw_searchpattern_latest.tar.gz]] |
  
Line 45: Line 47:
 | 0.2 | 2010/07/05 | [[http://dw-searchpattern.googlecode.com/files/dw_searchpattern_0_2.tar.gz|dw_searchpattern_0_2.tar.gz]] | Add capability to restrict search area \\ Retro-compatible with ver 0.1 | | 0.2 | 2010/07/05 | [[http://dw-searchpattern.googlecode.com/files/dw_searchpattern_0_2.tar.gz|dw_searchpattern_0_2.tar.gz]] | Add capability to restrict search area \\ Retro-compatible with ver 0.1 |
 | 0.2a | 2013/04/15 | [[http://dw-searchpattern.googlecode.com/files/dw_searchpattern_0_2a.tar.gz|dw_searchpattern_0_2a.tar.gz]] | Fix a bug preventing user with special ACLs to view results \\ Prevent PHP warnings to appear by extensive test on variables | | 0.2a | 2013/04/15 | [[http://dw-searchpattern.googlecode.com/files/dw_searchpattern_0_2a.tar.gz|dw_searchpattern_0_2a.tar.gz]] | Fix a bug preventing user with special ACLs to view results \\ Prevent PHP warnings to appear by extensive test on variables |
 +| 0.2b | 2013/06/17 | [[http://dw-searchpattern.googlecode.com/files/dw_searchpattern_0_2b.tar.gz|dw_searchpattern_0_2b.tar.gz]] | Fix a bug returning a NULL for $INFO that was prenventing using the short '-' & '-:' options \\ Seems to have appear with latest Dokuwiki release |
 | 2013-04-11 | 2013/04/11 | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_20130411.zip|dokuwiki-searchpattern_20130411.zip]] | //Use the newest version// | | 2013-04-11 | 2013/04/11 | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_20130411.zip|dokuwiki-searchpattern_20130411.zip]] | //Use the newest version// |
 | | | | add regex match output with new option $ (dollar) | | | | | add regex match output with new option $ (dollar) |
Line 57: Line 60:
 | 2013-04-15 | 2013/04/15 | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_20130415.zip|dokuwiki-searchpattern_20130415.zip]] | Bugfix incorrect XHTML or PHP warnings in log \\ Bugfix quickaclcheck only handles pages (not namespaces) \\ Translation of language file to german | | 2013-04-15 | 2013/04/15 | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_20130415.zip|dokuwiki-searchpattern_20130415.zip]] | Bugfix incorrect XHTML or PHP warnings in log \\ Bugfix quickaclcheck only handles pages (not namespaces) \\ Translation of language file to german |
 | 2013-06-16 | 2013/06/16 | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_20130616.zip|dokuwiki-searchpattern_20130616.zip]] | Bugfix fr language (french translation) file | | 2013-06-16 | 2013/06/16 | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_20130616.zip|dokuwiki-searchpattern_20130616.zip]] | Bugfix fr language (french translation) file |
 +| 2013-06-16b | 2013/06/16 | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_20130616b.zip|dokuwiki-searchpattern_20130616b.zip]] | Bugfix admin bad-options setting if using call plugin handler option. \\ add new admin setting 'dispheadl' to hide search options/regex headline in result table \\ |
 +| 2013-06-16c | 2013/06/16 | [[http://www.eibler.at/dokuwiki-todo/download/dokuwiki-searchpattern_20130616c.zip|dokuwiki-searchpattern_20130616c.zip]] | Additional french translations - thanks to Frédéric |
  
  
Line 290: Line 295:
     - The request can be caught and a warning message is displayed (request is processed anyway and results are displayed)     - The request can be caught and a warning message is displayed (request is processed anyway and results are displayed)
     - The request can be caught and processed normally (fault is ignored)     - The request can be caught and processed normally (fault is ignored)
 +  - Configure if the headline with the search options should be displayed or not
 +    - The search options (e.g. regex code) is displayed as table headline
 +    - The table headline is hidden (no search options/query/regex code is displayed)
  
 ==== Through Configuration File ==== ==== Through Configuration File ====
Line 309: Line 317:
 //**$conf['ignopt']**// represents case 5 of previous paragraph.\\ //**$conf['ignopt']**// represents case 5 of previous paragraph.\\
 //**'warning'**// and //**'nowarn'**// respectively represent behavior 5.I and 5.II of previous paragraph. //**'warning'**// and //**'nowarn'**// respectively represent behavior 5.I and 5.II of previous paragraph.
 +
 +//**$conf['dispheadl']**// represents case 6 of previous paragraph.\\
 +//**'disp'**// and //**'nodisp'**// respectively represent behavior 6.I and 6.II of previous paragraph.
  
 ===== Other Things ===== ===== Other Things =====
Line 328: Line 339:
   - <del>Implement custom handler method mechanism to use other plugins for output</del>  --- by [[user>leibler]] //v2013-04-11//    - <del>Implement custom handler method mechanism to use other plugins for output</del>  --- by [[user>leibler]] //v2013-04-11// 
   - <del>Integration with [[plugin:todo|Todo]] plugin</del>  --- by [[user>leibler]] //v2013-04-11//    - <del>Integration with [[plugin:todo|Todo]] plugin</del>  --- by [[user>leibler]] //v2013-04-11// 
 +  - <del>Documentation: Hi leibler, you mention "A new option allows you to hide the table headline with search options (e.g. regex code) in result table". Please state the name of the option, I'd like to use it in a general regex (no '_' plugin). -tw_bert-</del> --- please use the admin menu configuration setting "dispheadl" - a specific handler can overrule this setting because it has full control over the output. I modified the description to clarify. by [[user>leibler]] //v2014-02-02// 
 +  - Format a string using different colors following a regex like: (?<=^[A-Z]{2}\|{1})(?=([0-9]*)), text: RA|10556|8|3^4, to color the second field 
 + 
 ===== Discussions ===== ===== Discussions =====
  
Line 387: Line 400:
 anton anton
 > Could you post your exact call line to searchpattern as well as error message (either the one displayed in the browser or the one displayed on PHP log) ? - MR - > Could you post your exact call line to searchpattern as well as error message (either the one displayed in the browser or the one displayed on PHP log) ? - MR -
 +>> Hi Anton, I fixed this bug for former release branch in version 0.2b. I'll tell Leo about the bug and he will probably do the same for newer version. Bye. -MR-
 +
 +Hi
 +How to exclude some result in a regex request ?
 +for exemple I want with the todo pluging to have all todo exept assigned todos ?
 +Thanks for this usefull pluging :-D
 +Doumé
 +
 +Hi,\\
 +in my Wiki, the searchpattern-plugin (and therfore the todolist) doesn't function. I tried with the command ''~~SEARCHPATTERN#'/<todo[^#>]*>.*?<\/todo[\W]*?>/'?? _ToDo ??~~''. Instead of any result, I get the error message ''Fatal error: no such method _searchpatternHandler in E:\xampp\htdocs\dokuwiki\inc\plugin.php on line 258''. What goes wrong?\\
 +Best regards, Juergen
 +
 +Hi,\\
 +My wiki crashed with a blank screen on entry & loss of all files when looking at it with cpanel or filezilla. This was during an attempt to upgrade from Greebo to Hogfather. While rebuilding from scratch it crashed again as I installed SearchPattern plugin, this time with failure to load login. It worked again after I deleted the searchpattern subdir from lib/plugins. I  don't have any idea what is going on but I'm thinking that SearchPattern introduced some fatal condition.
 +
 +I can see that making SearchPattern involved a lot of work, and I really would like a regex capability.  maybe I'll try to install it some later time. //---<<willsteward2016@gmail.com>> 2020.08.26//
 +
 +----
 +As WillSteward posted I also get a non functioning wiki when installing the plugin.  I've tried on two different instances and get the same error although both instances have similar plugins so I've not yet ruled out if there is a clash with another plugin.
 +
 +The error I get is : 
 +
 +''dokuwiki\Exception\FatalException: Declaration of syntax_plugin_searchpattern::handle($match, $state, $pos, &$handler) must be compatible with dokuwiki\Extension\SyntaxPlugin::handle($match, $state, $pos, Doku_Handler $handler)
 +An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the searchpattern plugin.
 +
 +More info has been written to the DokuWiki error log.''
 +
 +This is in a big banner at the top of the page with no other text showing.  It happens on all pages, whether or not they contain the markup for the plugin.  Deleting the plugin folder restores a working wiki.  2022-09-29
 +
 +Hi !
 +
 +I also use //searchparttern//, but some corrections are required to make it works with Dokuwiki Hogfather, Igor and also PHP 8.1.
 +
 +  * **Line 255** :
 +    * Replace ''function handle($match, $state, $pos, &$handler){''
 +    * with : ''function handle($match, $state, $pos, Doku_Handler $handler){''
 +  * **Line 373** :
 +    * Replace : ''function render($format, &$renderer, $data) {''
 +    * With : ''function render($format, Doku_Renderer $renderer, $data) {''
 +  * **Line 379**((PHP 8.1 compatibility)) :
 +    * Replace : ''search($wikidata, $conf['datadir'], search_pattern, $data);''
 +    * With : ''search($wikidata, $conf['datadir'], 'search_pattern', $data);''
 +  * **Line 393** ::
 +    * Replace : ''function report($data, &$renderer, $params){''
 +    * With : ''function report($data, Doku_Renderer $renderer, $params){''
 +
 +//By reading these discussions, I've just discovered [[plugin:pagequery]] plugin, gona try it soon :) !//
 +
 + --- [[user>chtiland|chtiland]] //2023-03-05 16:30//
plugin/searchpattern.1371370934.txt.gz · Last modified: 2013-06-16 10:22 by 93.83.201.94

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki