User Tools

Site Tools


zg:zeitgeist

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
zg:zeitgeist [2007/05/19 17:00] fgmzg:zeitgeist [2020/11/23 17:23] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Zeigeist ====== ====== Zeigeist ======
- 
 ===== Intro ===== ===== Intro =====
  
Line 7: Line 6:
   * Zeitgeist is essentially fashion for ideas. See a discussion about it on [[http://en.wikipedia.org/wiki/Zeitgeist|Wikipedia]].    * Zeitgeist is essentially fashion for ideas. See a discussion about it on [[http://en.wikipedia.org/wiki/Zeitgeist|Wikipedia]]. 
   * Why the name ? Because when this idea was first discussed, someone on Drupal (chx, I think) said 'Oooh, a Zeitgeist', and I liked it.   * Why the name ? Because when this idea was first discussed, someone on Drupal (chx, I think) said 'Oooh, a Zeitgeist', and I liked it.
-  * [[zg:d5|Preparing for D5]] 
  
 ===== Features ===== ===== Features =====
- 
- 
- 
 ==== Current ==== ==== Current ====
  
   * Log searches with their timestamp   * Log searches with their timestamp
-  * A customizable drupal block with the 'n' most recent searches. Since v1.4, 'n' is settable +  * A themable drupal block with the 'n' most recent searches. Since 4.7.x-1.4, 'n' is settable 
-  * A customizable drupal block with the 'm' most popular node searches during the current month. Since v1.5, 'm' is settable +  * A themable drupal block with the 'm' most popular node searches during the current month. Since 4.7.x-1.5, 'm' is settable 
-  * 4.7RC2 compatible. +  * A page displaying the most requested searches over a given time span 
- +  * 4.7.to 7.compatible.
- +
- +
- +
  
 ==== Wishlist ==== ==== Wishlist ====
  
-  * A page displaying the most requested searches over a given time span 
   * A RSS feed tracking all searches   * A RSS feed tracking all searches
   * A periodic (weekly) summary of the top queries, by email to the site admin   * A periodic (weekly) summary of the top queries, by email to the site admin
   * A setting to include queries by UID=1 or not   * A setting to include queries by UID=1 or not
-  * Make the customizable blocks themeable, not just customizable +  * Export the current table -> see offload.module
-  * Export the current table+
   * Empty the current table   * Empty the current table
  
 Looking further: Looking further:
  
-  * ability to log various site uses, instead of just searches. +  * ability to log various site uses, instead of just searches -> won't do, use other D6 logging modules. D6 was extended for that reason.
   * coupling with statistics.module   * coupling with statistics.module
-  * a cleaner way of trapping queries+  * a cleaner way of trapping queries (why not just hook_search ?)
  
 ===== Data ===== ===== Data =====
- +
   * Table 'zeitgeist' contains the search log   * Table 'zeitgeist' contains the search log
   * Variables:   * Variables:
Line 50: Line 39:
     * zeitgeist_latest_title: the customized title of the "recent searches" block (when displayed)     * zeitgeist_latest_title: the customized title of the "recent searches" block (when displayed)
     * In zeitgeist_latest_info and zeitgeist_latest_title, the string %count can be used to insert the value of zeitgeist_latest_count     * In zeitgeist_latest_info and zeitgeist_latest_title, the string %count can be used to insert the value of zeitgeist_latest_count
- 
  
 ===== Recurring issue ===== ===== Recurring issue =====
  
-As of 4.7, Drupal does not implement a standard logging API, be it for search or anything else. The net result is that code like zeitgeist.module, which needs to record data from core, must obtain them from undocumented behaviours. +As of 4.7.x/7.x, Drupal does not implement a standard search logging API. The net result is that code like zeitgeist.module, which needs to record data from core, must obtain them from undocumented behaviours. 
  
-  * The core patch from which this module has been born used to parse the standard "watchdog" table.  +  * The core patch from which this module has been born used to parse the standard "watchdog" table from the dblog module.  
-  * For zeitgeist.module 1.1 to 1.6, this meant parsing both the "search form" form and search URL, which led to various problems, notably regarding potential safety issues, and the algorithm proved unreliable over minor core releases changing search.module. +  * For zeitgeist.module 4.7.x-1.1 to 4.7.x-1.6, this meant parsing both the "search form" form and search URL, which led to various problems, notably regarding potential safety issues, and the algorithm proved unreliable over minor core releases changing search.module. 
-  * Version 1.7 only processes the "search form" form. This simplifies the code, but leave it vulnerable to search.module changes.+  * Later versions only alter search forms to add a submit handler. This simplifies the code, but leave it vulnerable to search.module changes.
  
-At some point, drupal core will probably evolve to include such a logging mechanism, and zeitgeist will then be able to use it. Should the module become popular, it is also conceivable that search.module add a recording hook, independent of other recording needs.+At some point, drupal core will probably evolve to include such a logging mechanism, and zeitgeist will then be able to use it. Should the module become popular, it is also conceivable that search.module add a recording hook, independent of other recording needs. Things have evolved for the better in Drupal 7, where a single form implementation is used for all search forms, allowing simpler and more generic logging from the form submit handler.
  
 Until this happens, it could be possible to use [[http://fr.php.net/manual/en/function.runkit-function-rename.php|runki_function_rename]] to: Until this happens, it could be possible to use [[http://fr.php.net/manual/en/function.runkit-function-rename.php|runki_function_rename]] to:
Line 72: Line 60:
  
 Problems: Problems:
 +
   * This would fail if the standard do_search did some stack checking, but the current version doesn't.   * This would fail if the standard do_search did some stack checking, but the current version doesn't.
   * This requires the experimental "runkit" PECL package, absent from most PHP installations, and apparently unstable   * This requires the experimental "runkit" PECL package, absent from most PHP installations, and apparently unstable
- 
  
zg/zeitgeist.1179594018.txt.gz · Last modified: 2020/11/23 17:23 (external edit)