You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(103) |
Jul
(105) |
Aug
(16) |
Sep
(16) |
Oct
(78) |
Nov
(36) |
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(100) |
Feb
(155) |
Mar
(84) |
Apr
(33) |
May
(22) |
Jun
(77) |
Jul
(36) |
Aug
(37) |
Sep
(183) |
Oct
(74) |
Nov
(235) |
Dec
(165) |
2002 |
Jan
(187) |
Feb
(183) |
Mar
(52) |
Apr
(10) |
May
(15) |
Jun
(19) |
Jul
(43) |
Aug
(90) |
Sep
(144) |
Oct
(144) |
Nov
(171) |
Dec
(78) |
2003 |
Jan
(113) |
Feb
(99) |
Mar
(80) |
Apr
(44) |
May
(35) |
Jun
(32) |
Jul
(34) |
Aug
(34) |
Sep
(30) |
Oct
(57) |
Nov
(97) |
Dec
(139) |
2004 |
Jan
(132) |
Feb
(223) |
Mar
(300) |
Apr
(221) |
May
(171) |
Jun
(286) |
Jul
(188) |
Aug
(107) |
Sep
(97) |
Oct
(106) |
Nov
(139) |
Dec
(125) |
2005 |
Jan
(200) |
Feb
(116) |
Mar
(68) |
Apr
(158) |
May
(70) |
Jun
(80) |
Jul
(55) |
Aug
(52) |
Sep
(92) |
Oct
(141) |
Nov
(86) |
Dec
(41) |
2006 |
Jan
(35) |
Feb
(62) |
Mar
(59) |
Apr
(52) |
May
(51) |
Jun
(61) |
Jul
(30) |
Aug
(36) |
Sep
(12) |
Oct
(4) |
Nov
(22) |
Dec
(34) |
2007 |
Jan
(49) |
Feb
(19) |
Mar
(37) |
Apr
(16) |
May
(9) |
Jun
(38) |
Jul
(17) |
Aug
(31) |
Sep
(16) |
Oct
(34) |
Nov
(4) |
Dec
(8) |
2008 |
Jan
(8) |
Feb
(16) |
Mar
(14) |
Apr
(6) |
May
(4) |
Jun
(5) |
Jul
(9) |
Aug
(36) |
Sep
(6) |
Oct
(3) |
Nov
(3) |
Dec
(3) |
2009 |
Jan
(14) |
Feb
(2) |
Mar
(7) |
Apr
(16) |
May
(2) |
Jun
(10) |
Jul
(1) |
Aug
(10) |
Sep
(11) |
Oct
(4) |
Nov
(2) |
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
(13) |
Apr
(11) |
May
(18) |
Jun
(44) |
Jul
(7) |
Aug
(2) |
Sep
(14) |
Oct
|
Nov
(6) |
Dec
|
2011 |
Jan
(2) |
Feb
(6) |
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(11) |
Feb
(3) |
Mar
(11) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(4) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
(1) |
2015 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2016 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(6) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2022 |
Jan
(11) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(3) |
Dec
(3) |
2024 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <mat...@li...> - 2005-02-04 19:02:26
|
山下 香穂(32歳)この度は山下メール創刊号のご送信が遅くなってしまい ご迷惑をおかけいたしました。 記念すべきこの第1回目は私自らが担当させていただきます。 時は2005年。心にぽっかりと穴が空いた人が多いこの頃です。 そんなあなたの心の隙間をお埋めいたします。お金は一銭もいただきません。 私、山下は大人の女性のための交際グループ『Adolescence』を結成いたしました。 特に女性の会員数に男性の会員数が追いつかない状況となっております。 そこで、このような形で過去に登録いただいたお客様にメールを させて頂くこととなりました。もし、怪しいと思ったり、全く興味がない方は このメールを破棄してくださいますようよろしくお願いいたします。 女性会員の中には生活的にも金銭的にも余裕があるのに今の生活には 「ものたりなさ」を感じている会員様が多く、このグループで男性の方と知り合い 「今よりもっと充実した生活をしたい」と思っている会員様がほとんどです。その ような女性会員様は、今の自分を満たしてくれるお礼としての謝礼などを考えてる 女性も多数在籍しております。 さらに、私どものグループでは女性をご紹介する際に写真や動画などをご覧いた だいて、ご希望の女性をお選びいただくことも可能となっております。 日本全国に会員様がおりますので、同じ地域の方のみのご紹介となっております。 お手数なのですが、以下の事柄をお教えください。 Q1:あなた様のお住まいの地域(都道府県のみで結構です) Q2:お好みのタイプは? 以下の3つよりお選びください 1【恋人募集】・・・・・・・真面目な恋愛を考えている貴方に 2【サポート希望】・・・・・サポートしてほしい 3【セックスフレンド】・・・割り切った関係 4【SM】・・・・・・・・・S女・M女 ------------------------------------------------------------------------------------------------------- 折り返しご連絡いただいた地域、好みの近い女性をご紹介させていただきます。 好みの女性のタイプを複数ある場合には 例:サポートと割り切りの場合 サポート+割り切り (この場合女性のジャンルはサポートになります) このようにお送りください。 ---------------------------------------------------------------------------------------------------------- もし、ご紹介をご希望でしたら、お手数ですがこのメールにご返信をお願いしま す。折り返し担当の方からご案内のメールをお返しいたします。 尚、ご紹介は完全無料となっておりますのでお気軽にどうぞ。 この山下メールSpecialは過去に登録いただいたお客様に向けて送信しております。 当グループの登録などに一切覚えのない方はご面倒ですが、このメールに「配信不要」 と沿えてご返送ください。受け取り次第、登録解除の手続きをいたします。 グループ『Adolescence』主宰 山下 香穂 |
From: Dan F. <dfr...@cs...> - 2005-02-04 18:40:48
|
Reini Urban wrote: > Discussion moved to http://phpwiki.org/AutoCompletion > > I'm still waiting for Mircho's answer, but I believe it will work out. > Dan, could you please add a chapter there about your Moonbadger code? > wikilens.org seems to be down very often now, so I couldn't have a > look yet. I added a small section on wikilens code. I apologize for wikilens downtime! It was down from Jan. 10 - Feb. 2 because our machine was hacked. It is back up (yay!). It still needs a little work because the machine has been completely reinstalled, and there are bits and pieces missing or with inappropriate versions. I also asked Mircho about adopting a GPL-compatible license. He said, "It's public domain! Go ahead and use it!" However, the package doesn't have anything *saying* it's in public domain. I'd feel more comfortable if it explicitly declared some GPL-compatible license. Dan |
From: Reini U. <ru...@x-...> - 2005-02-04 17:42:18
|
Discussion moved to http://phpwiki.org/AutoCompletion I'm still waiting for Mircho's answer, but I believe it will work out. Dan, could you please add a chapter there about your Moonbadger code? wikilens.org seems to be down very often now, so I couldn't have a look yet. For the meantime I supported the simple livesearch feature from http://blog.bitflux.ch/wiki/LiveSearch to test performance. The js has to be downloaded seperately (Apache license) Reini Urban schrieb: > Dan Frankowski schrieb: >>> "RFE - Form Autocompletion" >>> http://serversideguy.blogspot.com/2004/12/google-suggest-dissected.html >> 1. http://codeproject.com/jscript/jsactb.asp >> Pros: >> + I know it and like it >> + Friendly author ("Use it however you like!") >> Cons: >> + Inappropriate license for a GPL project. (It uses creative commons >> license, which isn't even for software.) >> + Only uses a local list in Javascript, not server-side. >> + Some quirks, like when you click away from it, it doesn't go away. >> >> 2. http://momche.net/publish/article.php?page=acdropdown >> Pros: >> + Looks fully featured >> - has both local and remote modes >> - drops down with a scrollbox, which acts more the way people would >> expect-- scrollbar, vanishes when you click away >> + Friendly author ("Use it however you like!") >> Cons: >> + I've never actually used it >> + No license at present. I'm trying to convince the author to release >> it under a GPL-compatible license (see >> http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses). >> Check it out, email the author to choose a GPL-compatible license, so >> PhpWiki can use it! >> >> There's another simple one, without scrolldown as with google, but looks > and works ok. Apache license. > http://blog.bitflux.ch/wiki/LiveSearch > > Not supported: > * Konqueror > * Opera > * Internet Explorer 5.2.3 (Mac) > > http://the.taoofmac.com/ uses it also. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Charles C. <ch...@ru...> - 2005-02-04 16:22:22
|
Attached are my latest updates to the AnalyseAccessLog plugin. Major changes - split out the queries into lib/plugin/AnalyseAccessLog.inc - wrote the AnalyseActionLogPlugin wiki page - added a parameter to allow the output table to be centered (trying to right justify the table causes problems in both IE and Mozilla). I think that this is now pretty much done. The only enhancement that might be interesting is some facility to mark each query with the list of database engines that it is known to successfully run against. I would be delighted to add new queries against the access log, if anyone is willing to write... Random thoughts I thought about making it easier to write new queries on wiki pages but the security implications were horrendous. Much of the framework could easily be repurposed to write arbitrary queries against the database where the wiki data is held. Do we want to go that way? Regards, Charles |
From: Danielle Y. <JQL...@ya...> - 2005-02-04 06:50:13
|
Wide range of medss available to choose in our stores. Saveee uup to 7o % Vicodiin, Viiagraa, Ciallis, Vallium, Xanaax and many moore.. http://vigra4.info/in.php?aid=56 Happy New Year wG4TLfQhI6jwGX5AOF7po40G2AYDjU0VnVgwgZ9gsdylJ1FzAfpWdL7 |
From: Arnaud F. <ar...@cr...> - 2005-02-03 17:42:52
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Arnaud Fontaine wrote: | Arnaud Fontaine wrote: | | | | if(!$page->getName()) { | | Forget this patch ... first the test was false (better to test if it's | set ...) and second, the theme fault not because of an unknown method on | $page ... | | Still investigating ... | | | Arnaud Just replace 'action'=>$dbh->isWikiPage with 'action'=>$request->_dbi->isWikiPage Pfff ... finally ;) Arnaud -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAmKqyAf3wgFyy1ARAshUAJ4rvqlY1R1j+xJluYbXrd+fVX30kQCgofik rbT6MVCK1QmqJQpixPQOWuY= =S2KC -----END PGP SIGNATURE----- |
From: Arnaud F. <ar...@cr...> - 2005-02-03 17:10:41
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Arnaud Fontaine wrote: | | if(!$page->getName()) { Forget this patch ... first the test was false (better to test if it's set ...) and second, the theme fault not because of an unknown method on $page ... Still investigating ... Arnaud -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAlseyAf3wgFyy1ARAupKAKDTKyUvK+5b2ekI4NqOJCmkpY6a8gCg5U9O cns+KyzMaw+4GLrqjg18qJ4= =xmqJ -----END PGP SIGNATURE----- |
From: Charles C. <ch...@ru...> - 2005-02-03 15:37:36
|
Attached is a patch to include my latest updates to this plugin. I have included the patch inline and also attached a file incase the message gets badly mangled. Changes: - change parameter: mode is now queryName - changed query names and column names to include spaces - make it easier to add a new query - fix use of _() - new parameters to filter the contents of the accesslog - new parameter to caption tables - new parameter to display the actual SQL for debugging purposes - make output table look nicer TODO: provide mechanism to make it easier to put the queries in a configuration file Regards, Charles Index: AnalyseAccessLog.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/AnalyseAccessLog.php,v retrieving revision 1.1 diff -u -r1.1 AnalyseAccessLog.php --- AnalyseAccessLog.php 2 Feb 2005 20:41:02 -0000 1.1 +++ AnalyseAccessLog.php 3 Feb 2005 15:22:36 -0000 @@ -19,6 +19,7 @@ along with PhpWiki; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + /** * A plugin that provides a framework and some useful queries to analyse the SQL * access log. This information may be sensitive and so is limited to @@ -32,105 +33,97 @@ /** * Build the query string * - * FIXME - some or all of these queries may be MySQL specific / non-portable + * FIXME - some or all of these queries may be MySQL specific / non- + * portable. Can someone suggest a way to detect the underlying database + * engine and then load an engine specific set of queries? * - * FIXME - is there a more correct way to get the name of the accesslog - * table? + * To add a new query, add a new + * "} elseif ($queryName=='your new query name') {" + * section towards the end of this function, using one of the exiting + * queries as a template. I have used the convention that, while + * constructing the query string, + * - each clause is on a separate line and + * - each clause has the required trailing punctuation or space. * * The column names displayed are generated from the actual query column - * names, so make sure that each column in the query is given a user - * friendly name. Note that the column names are passed to _() and so may be - * translated. - * - * If there are query specific where conditions, then the construction - * " if ($where_conditions<>'') - * $where_conditions = 'WHERE '.$where_conditions.' ';" - * should be changed to - * " if ($where_conditions<>'') - * $where_conditions = 'AND '.$where_conditions.' ';" - * and in the assignment to query have something like - * " $query= "SELECT " - * ."referer " - * ."FROM $accesslog " - * ."WHERE referer IS NOT NULL " - * .$where_conditions + * names, I suggest that each column in the query is given a user friendly + * name. */ function _getQueryString(&$args) { // extract any parametrised conditions from the arguments, // in particular, how much history to select $where_conditions = $this->_getWhereConditions($args); - // get the correct name for the table - //FIXME is there a more correct way to do this? + // get the correct table name global $DBParams; - $accesslog = (!empty($DBParams['prefix']) ? $DBParams['prefix'] : '')."accesslog"; + $accesslog = (!empty($DBParams['prefix']) ? $DBParams['prefix'] : '').'accesslog'; $query = ''; - if ($args['mode']=='referring_urls') { - if ($where_conditions<>'') - $where_conditions = 'WHERE '.$where_conditions.' '; - $query = "SELECT " - ."left(referer,length(referer)-instr(reverse(referer),'?')) AS Referring_URL, " - ."count(*) AS Referral_Count " + $queryName = $args['queryName']; + + if ($queryName=='Referring URLs') { + $query = 'SELECT ' + ."left(referer,length(referer)-instr(reverse(referer),'?')) AS 'Referring URL', " + ."count(*) AS 'Referral Count' " ."FROM $accesslog " - .$where_conditions - ."GROUP BY Referring_URL"; + .($where_conditions ? 'WHERE '.$where_conditions : '') + ."GROUP BY 'Referring URL'"; - } elseif ($args['mode']=='referring_domains') { - if ($where_conditions<>'') - $where_conditions = 'WHERE '.$where_conditions.' '; + } elseif ($queryName=="Referring Domains") { $query = "SELECT " - ."left(referer, if(locate('/', referer, 8) > 0,locate('/', referer, 8) -1, length(referer))) AS Referring_Domain, " - ."count(*) AS Referral_Count " + ."left(referer, if(locate('/', referer, 8) > 0, locate('/', referer, 8) -1, length(referer))) AS 'Referring Domain', " + ."count(*) AS 'Referral Count' " ."FROM $accesslog " - .$where_conditions - ."GROUP BY Referring_Domain"; + .($where_conditions ? 'WHERE '.$where_conditions : '') + ."GROUP BY 'Referring Domain'"; - } elseif ($args['mode']=='remote_hosts') { - if ($where_conditions<>'') - $where_conditions = 'WHERE '.$where_conditions.' '; + } elseif ($queryName=="Remote Hosts") { $query = "SELECT " - ."remote_host AS Remote_Host, " - ."count(*) AS Access_Count " + ."remote_host AS 'Remote Host', " + ."count(*) AS 'Access Count' " ."FROM $accesslog " - .$where_conditions - ."GROUP BY Remote_Host"; + .($where_conditions ? 'WHERE '.$where_conditions : '') + ."GROUP BY 'Remote Host'"; - } elseif ($args['mode']=='users') { - if ($where_conditions<>'') - $where_conditions = 'WHERE '.$where_conditions.' '; + } elseif ($queryName=="Users") { $query = "SELECT " ."remote_user AS User, " - ."count(*) AS Access_Count " + ."count(*) AS 'Access Count' " ."FROM $accesslog " - .$where_conditions + .($where_conditions ? 'WHERE '.$where_conditions : '') ."GROUP BY User"; - } elseif ($args['mode']=='host-users') { - if ($where_conditions<>'') - $where_conditions = 'WHERE '.$where_conditions.' '; + } elseif ($queryName=="Host Users") { $query = "SELECT " - ."remote_host AS Remote_Host, " + ."remote_host AS 'Remote Host', " ."remote_user AS User, " - ."count(*) AS Access_Count " + ."count(*) AS 'Access Count' " ."FROM $accesslog " - .$where_conditions - ."GROUP BY Remote_Host, User"; + .($where_conditions ? 'WHERE '.$where_conditions : '') + ."GROUP BY 'Remote Host', User"; } return $query; } function getDefaultArguments() { return array( - 'mode' => 'referring_domains', - // referring_domains, referring_urls, remote_hosts, users, host-users - 'caption' => '', - // blank means use the mode as the caption/title for the output - 'local_referrers' => 'true', // only show external referring sites - 'period' => '', // the type of period to report: - // may be weeks, days, hours, minutes, or blank for all - 'count' => '0' // the number of periods to report - ); + 'queryName' => '', // the name of the query to execute, see _getQueryString() + // "Referring Domains", "Referring URLs", "Remote Hosts", + // "Users", "Host Users" + // but note that this is subject to change + 'caption' => '', // blank means use the mode as the caption/title for the output + 'debugShowQuery' => '', // if set, show the query string in the table footer + 'period' => '', // the type of history period to retrieve, see _getWhereConditions() + // may be weeks, days, hours, minutes, or blank for all + 'count' => '0', // the number of periods to retrieve - must be a number + 'user' => '', // empty/default to retrieve all users, or a specific user or + // <NONE> for no user + 'host' => '', // empty/default to retrieve all remote_hosts, or a specific host + 'referrer' => '', // empty/default to retrieve all referrers, + // <NONE> to retrieve no referrer or + // otherwise matched to the start of the referrer string + 'local_referrers' => 'true' // if not true, return only external referring sites + ); } function getName () { @@ -143,48 +136,52 @@ function getVersion() { return preg_replace("/[Revision: $]/", '', - "\$Revision: 1.1 $"); + "\$Revision: 0.1 $"); } function run($dbi, $argstr, &$request, $basepage) { - // flag that the output may not be cached - i.e. it is dynamic - $request->setArg('nocache', 1); + // flag that the output is dynamic and may not be cached + $request->setArg('nocache',1); if (!$request->_user->isAdmin()) - return HTML::p(_("The requested information is available only to Administrators.")); + return HTML::p(_("The requested information is available only to administrators.")); - if (!ACCESS_LOG_SQL) // need read access + if (!ACCESS_LOG_SQL==2) return HTML::p(_("The SQL_ACCESS_LOG is not enabled.")); // set aside a place for the table headers, see _setHeaders() - $this->_theadrow = HTML::tr(); $this->_headerSet = false; + $this->_theadRow = HTML::tr(); $args = $this->getArgs($argstr, $request); $query = $this->_getQueryString($args); - if ($query=='') - return HTML::p(sprintf( _("Unrecognised parameter 'mode=%s'"), - $args['mode'])); + if (!$query) + return HTML::p(sprintf(_("Unrecognised 'queryName=%s'"), + $args['queryName'])); // get the data back. - // Note that this must be done before the final generation ofthe table, - // otherwise the headers will not be ready + // Note that this must be done before the final generation of the html table, + // otherwise the headers will not be ready $tbody = $this->_getQueryResults($query, $dbi); - return HTML::table(array( 'border' => 1, - 'cellspacing' => 1, - 'cellpadding' => 1), - HTML::caption(HTML::h1(HTML::br(),$this->_getCaption($args))), - HTML::thead($this->_theadrow), + $caption = $this->_getCaption($args); + + return HTML::table(array('border' => 1, + 'cellspacing' => 2, + 'cellpadding' => 3, + 'summary' => $caption), + HTML::caption(HTML::br(), HTML::h1($caption)), + HTML::thead($this->_theadRow), + HTML::tfoot(HTML::tr(HTML::td(array('colspan' => 100), $args['debugShowQuery'] ? $query : ''))), $tbody); } function _getQueryResults($query, &$dbi) { $queryResult = $dbi->genericSqlIter($query); - if (!$queryResult) { - $tbody = HTML::tbody(HTML::tr(HTML::td(_("<empty>")))); + if (!$queryResult or !$queryResult->count()) { + $tbody = HTML::tbody((HTML::tr(HTML::td(_("_ no result _"))))); } else { $tbody = HTML::tbody(); while ($row = $queryResult->next()) { @@ -204,7 +201,7 @@ function _setHeaders($row) { if(!$this->_headerSet) { foreach ($row as $key => $value) { - $this->_theadrow->pushContent(HTML::th(_($key))); + $this->_theadRow->pushContent(HTML::th($key)); } $this->_headerSet = true; } @@ -226,25 +223,54 @@ } $since = $since * $args['count']; if ($since>0) { - if ($where_conditions<>'') - $where_conditions = $where_conditions.' AND '; $since = time() - $since; - $where_conditions = $where_conditions."time_stamp > $since"; + $where_conditions = (!$where_conditions ? '' : $where_conditions.' AND ') + ."time_stamp>$since"; + } + if (1==2) { // this section is to ensure that the period names are available for translation + _("minutes"); _("hours"); _("days"); _("weeks"); + } + } + + $host = $args['host']; + if ($host) + $where_conditions = (!$where_conditions ? '' : $where_conditions.' AND ') + ."remote_host='$host'"; + + $user = $args['user']; + if ($user) { + if ($user=='<NONE>') { + $where_conditions = (!$where_conditions ? '' : $where_conditions.' AND ') + ."(remote_user IS NULL OR remote_user='' OR remote_user=' ' OR remote_user='-')"; + } else { + $where_conditions = (!$where_conditions ? '' : $where_conditions.' AND ') + ."remote_user='$user'"; + } + } + + $referrer = $args['referrer']; + if ($referrer) { + if ($referrer=='<NONE>') { + $where_conditions = (!$where_conditions ? '' : $where_conditions.' AND ') + ."(referer IS NULL OR referer='' OR referer=' ' OR referer='-')"; + } else { + $len = strlen($referrer); + $where_conditions = (!$where_conditions ? '' : $where_conditions.' AND ') + ."left(referer,$len)<>'$referrer'"; } } if ($args['local_referrers']<>'true') { - if ($where_conditions<>'') - $where_conditions = $where_conditions.' AND '; $localhost = SERVER_URL; $len = strlen($localhost); - $where_conditions = $where_conditions."left(referer,$len)<>'$localhost'"; + $where_conditions = (!$where_conditions ? '' : $where_conditions.' AND ') + ."left(referer,$len)<>'$localhost'"; } - // The assumed contract is that there is a space at the end of the - // conditions string,so that following SQL clauses (such as GROUP BY) - // will not cause a syntax error - if ($where_conditions<>'') + // the assumed contract is that there is a space at the end of the condtions string, + // so that following SQL clauses (such as GROUP BY) will not cause a syntax error + // but we want a blank string if there are no where conditions. + if ($where_conditions) $where_conditions = $where_conditions.' '; return $where_conditions; @@ -252,10 +278,10 @@ function _getCaption(&$args) { $caption = $args['caption']; - if ($caption=='') - $caption = _($args['mode']); - if ($args['period']<>'' && $args['count']) - $caption = $caption." - ".$args['count']." "._($args['period']); + if (!$caption) + $caption = $args['queryName']; + if ($args['period'] && $args['count']) + $caption = $caption.' - '.$args['count'].' '._($args['period']); return $caption; } |
From: Arnaud F. <ar...@cr...> - 2005-02-03 14:36:25
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, A friend and I are investigating the locale problem ... I found a few cleaning to do in the code and found some strange stuff. First, the cleaning : Index: lib/main.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/main.php,v retrieving revision 1.205 diff -r1.205 main.php 809c809 < if (0 and $GLOBALS['LANG'] != 'en') { - --- | if ($GLOBALS['LANG'] != 'en') { 1764c1764 < ?> \ No newline at end of file - --- | ?> (what did you want to do there ?) Index: lib/WikiUserNew.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiUserNew.php,v retrieving revision 1.124 diff -r1.124 WikiUserNew.php 1461c1461 < if ($value == '' or empty($value)) - --- | if (empty($value)) 2379c2379 < ?> \ No newline at end of file - --- | ?> empty($value) is equivalent to (!isset($value) or $value == NULL) Index: navbar.tmpl =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/themes/default/templates/navbar.tmpl,v retrieving revision 1.35 diff -r1.35 navbar.tmpl 3c3 < - --- | if(!$page->getName()) { 59c59,61 < } ?> - --- | } | } | ?> I already sent this one ... And now, the funny stuff ... I forced the locale to fr in IniConfig.php because it was switching from fr_FR to C ... Index: lib/IniConfig.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/IniConfig.php,v retrieving revision 1.77 diff -r1.77 IniConfig.php 591a592 | $LANG = 'fr'; 625a627 | setlocale(LC_MESSAGES, 'fr_FR'); 1107c1109 < ?> \ No newline at end of file - --- | ?> setting the locale there (setlocale) corrected the problem ... Hmmm .... Reini ?? Any idea ?? Arnaud -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAjb1yAf3wgFyy1ARAmklAJ99KHSP6I/5W+qvCDt60Mue5ffFEgCglsvW MORKYz4uojLJVwsB9xxERkM= =aMEQ -----END PGP SIGNATURE----- |
From: Arnaud F. <ar...@cr...> - 2005-02-03 11:39:13
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Arnaud Fontaine wrote: | | Le 3 f=E9vr. 05, =E0 05:19, Charles Corrigan a =E9crit : | |> The change to navbar.tmpl to "add Discussion link" broke PhpWiki for = me. |> Error meessage in the apache error log is |> [Thu Feb 03 12:06:40 2005] [error] PHP Fatal error: Call to a member |> function on a non-object in d:\\my |> documents\\eclipse\\workspace\\phpwiki\\phpwiki\\lib\\Template.php(139= ) |> : |> eval()'d code on line 12 |> | | Hmm ... it seems it has something to do with a call to a $revision method. | | In many cases, $revision doesn't exist so you have to test it | (something like if(!empt($revision)) before calling its methods. | navbar.tmpl contains many calls to $revision methods. | | The test is supposed to be done with HIDE-TOOLBARS but it's actually | broken. Ok ... In default/template/navbar.tmpl Index: navbar.tmpl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/phpwiki/phpwiki/themes/default/templates/navbar.tmpl,v retrieving revision 1.35 diff -r1.35 navbar.tmpl 3c3 < - --- | if(!$page->getName()) { 59c59,61 < } ?> - --- | } | } | ?> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAg09yAf3wgFyy1ARAoRqAJ4ndPMIovqdEl2hcIQ0iny+wu7CagCeP+fW BvZKeLOrQKUZstiopdYJ3Mg=3D =3DVe5Z -----END PGP SIGNATURE----- |
From: Charles C. <ch...@ru...> - 2005-02-03 11:19:12
|
In my apache error log I found another error message repeated many times regarding call-time pass-by-reference. The fix is lib/PageList.php - PageList->_sortPages() - line 1114 - replace usort(&$this->_pages, array($this, '_pageCompare')); with usort($this->_pages, array($this, '_pageCompare')); regards, Charles |
From: Arnaud F. <ar...@cr...> - 2005-02-03 10:36:40
|
Le 3 f=E9vr. 05, =E0 04:45, Charles Corrigan a =E9crit : > In my apache error log I found an error message repeated many times > regarding call-time pass-by-reference. The fix is > > lib/WikiDB.php - WikiDB->renamePage() - line 499 - replace > $oldpage->sendPageRenameNotification($to, &$meta, $emails,=20 > $userids); > with > $oldpage->sendPageRenameNotification($to, $meta, $emails,=20 > $userids); > > The definition > function sendPageRenameNotification($to, &$meta, $emails,=20 > $userids) { > has the pass by reference marker so it looks like this is a cut and=20 > paste > error. > Are you using php5 ? If so, php5 pass objects by reference, not by copy. So the &$object=20 syntax from php4 is obsolete. -- Arnaud Fontaine CRAO Jabber: sh...@ra... |
From: Arnaud F. <ar...@cr...> - 2005-02-03 10:34:55
|
Le 3 f=E9vr. 05, =E0 05:19, Charles Corrigan a =E9crit : > The change to navbar.tmpl to "add Discussion link" broke PhpWiki for =20= > me. > Error meessage in the apache error log is > [Thu Feb 03 12:06:40 2005] [error] PHP Fatal error: Call to a member > function on a non-object in d:\\my > = documents\\eclipse\\workspace\\phpwiki\\phpwiki\\lib\\Template.php(139)=20= > : > eval()'d code on line 12 > Hmm ... it seems it has something to do with a call to a $revision =20 method. In many cases, $revision doesn't exist so you have to test it =20 (something like if(!empt($revision)) before calling its methods. navbar.tmpl contains many calls to $revision methods. The test is supposed to be done with HIDE-TOOLBARS but it's actually =20 broken. -- Arnaud Fontaine CRAO Jabber: sh...@ra... |
From: <sa...@el...> - 2005-02-03 07:04:55
|
HTML Message - Inspiration 7.6 & Kidspiration 2.1 Licensing Software |
From: Reini U. <ru...@x-...> - 2005-02-03 04:41:47
|
Dan Frankowski schrieb: > Reini Urban wrote: >> just detected this, using google suggest: >> http://www.google.com/webhp?complete=1&hl=en >> >> "RFE - Form Autocompletion" >> http://serversideguy.blogspot.com/2004/12/google-suggest-dissected.html >> >> We'd need a new xml-rpc function to return simple queries in >> javascript src: titlesearch, username, plugins, categories, and such. > > > This would be awesome. > > We have started to use auto-complete textboxes in a couple places in the > as-yet-unreleased MoonBadger version of WikiLens. (The code is done, but > our machine is hacked and down until next week or later.) One spot is to > add buddies (auto-complete username); another spot is to add pages to a > list (auto-complete lists you own, auto-complete any pagename to add to > a list). These boxes currently work by generating the complete list > server-side and embedding it in the page for the Javascript to use (!!). > Obviously, this does not scale as the number of users or pages grows > very large. > > By the way, I looked around for auto-complete textboxes, and found 2 I > like: > > 1. http://codeproject.com/jscript/jsactb.asp > Pros: > + I know it and like it > + Friendly author ("Use it however you like!") > Cons: > + Inappropriate license for a GPL project. (It uses creative commons > license, which isn't even for software.) > + Only uses a local list in Javascript, not server-side. > + Some quirks, like when you click away from it, it doesn't go away. > > 2. http://momche.net/publish/article.php?page=acdropdown > Pros: > + Looks fully featured > - has both local and remote modes > - drops down with a scrollbox, which acts more the way people would > expect-- scrollbar, vanishes when you click away > + Friendly author ("Use it however you like!") > Cons: > + I've never actually used it > + No license at present. I'm trying to convince the author to release > it under a GPL-compatible license (see > http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses). > Check it out, email the author to choose a GPL-compatible license, so > PhpWiki can use it! > > Also, I guess there's a 3. I wrote my own that's in MoonBadger. The > advantage is that I got to skip all the confusing licensing issues. The > disadvantage is that it is not nearly as fully-featured. I really see it > as a placeholder until a better GPL solution comes along. There's another simple one, without scrolldown as with google, but looks and works ok. Apache license. http://blog.bitflux.ch/wiki/LiveSearch Not supported: * Konqueror * Opera * Internet Explorer 5.2.3 (Mac) http://the.taoofmac.com/ uses it also. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Charles C. <ch...@ru...> - 2005-02-03 04:20:01
|
The change to navbar.tmpl to "add Discussion link" broke PhpWiki for me. Error meessage in the apache error log is [Thu Feb 03 12:06:40 2005] [error] PHP Fatal error: Call to a member function on a non-object in d:\\my documents\\eclipse\\workspace\\phpwiki\\phpwiki\\lib\\Template.php(139) : eval()'d code on line 12 Sorry I have not been able to work out the fix, I just reverted to the previous version and then it worked for me. regards, Charles |
From: Charles C. <ch...@ru...> - 2005-02-03 03:45:48
|
In my apache error log I found an error message repeated many times regarding call-time pass-by-reference. The fix is lib/WikiDB.php - WikiDB->renamePage() - line 499 - replace $oldpage->sendPageRenameNotification($to, &$meta, $emails, $userids); with $oldpage->sendPageRenameNotification($to, $meta, $emails, $userids); The definition function sendPageRenameNotification($to, &$meta, $emails, $userids) { has the pass by reference marker so it looks like this is a cut and paste error. regards, Charles |
From: Reini U. <ru...@x-...> - 2005-02-02 15:55:31
|
Charles Corrigan schrieb: >>One note: please use _("") and not _(''), xgettext requires " > > OK, I redid the plugin below, replacing _('') with _(""). One thing I am not certain of - do all calls to _() have to use "" or is > _($key) legal? _($key) is legal but not extracted by xgettext, which collects all the strings for the pot file. So you must be sure to have the string defined somewhere else, otherwise no translation will be printed. And we don't like it, since it's hard to maintain. _WikiTranslation uses the php hash for these kind of tricks. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Charles C. <ch...@ru...> - 2005-02-02 15:19:06
|
Reini Urban wrote > There are some more useful accesslog plugins in the works for > which I had no time yet. RhNav (FractalNavigation) by Walter > Rafelsberger. > http://phpwiki.sourceforge.net/phpwiki/FractalNavigationPlugin > Also author of the shamino_com theme. I will have a look. I did look at lib/plugin/RecentReferrals.php but decided it was not flexible enough for what I wanted to do. > One note: please use _("") and not _(''), xgettext requires " OK, I redid the plugin below, replacing _('') with _(""). One thing I am not certain of - do all calls to _() have to use "" or is _($key) legal? While I was re-doing the file, I also added further documentation regarding adding new queries. New file lib/plugin/AnalyseAccessLog.php <?php /* Copyright 2005 Charles Corrigan and $ThePhpWikiProgrammingTeam This file is (not yet) part of PhpWiki. PhpWiki is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. PhpWiki is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PhpWiki; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** * A plugin that provides a framework and some useful queries to analyse the SQL * access log. This information may be sensitive and so is limited to * administrator access only. * * To add a new query, see _getQueryString() */ class WikiPlugin_AnalyseAccessLog extends WikiPlugin { /** * Build the query string * * FIXME - some or all of these queries may be MySQL specific / non-portable. * Can someone suggest a way to detect the underlying database engine and * then load an engine specific set of queries? * * FIXME - is there a more correct way to get the name of the accesslog * table? * * To add a new query, add a new "} elseif { ($args['mode']=='new-query-name')" * section towards the end of this function, using one of the exiting queries * as a template. I have used the convention that, while constructing the * query string, * - each clause is on a separate line and * - each clause has the required trailing punctuation or space. * * The column names displayed are generated from the actual query column * names, so make sure that each column in the query is given a user * friendly name. Note that the column names are passed to _() and so may be * translated. * * If there are query specific where conditions, then the construction * if ($where_conditions<>'') * $where_conditions = 'WHERE '.$where_conditions.' '; * should be changed to * if ($where_conditions<>'') * $where_conditions = 'AND '.$where_conditions.' '; * and in the assignment to the query have something like * $query= "SELECT " * ."referer " * ."FROM $accesslog " * ."WHERE referer IS NOT NULL " * .$where_conditions */ function _getQueryString(&$args) { // extract any parametrised conditions from the arguments, // in particular, how much history to select $where_conditions = $this->_getWhereConditions($args); // get the correct name for the table //FIXME is there a more correct way to do this? global $DBParams; $accesslog = (!empty($DBParams['prefix']) ? $DBParams['prefix'] : '')."accesslog"; $query = ''; if ($args['mode']=='referring_urls') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."left(referer,length(referer)-instr(reverse(referer),'?')) AS Referring_URL, " ."count(*) AS Referral_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY Referring_URL"; } elseif ($args['mode']=='referring_domains') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."left(referer, if(locate('/', referer, 8) > 0, locate('/', referer, 8) -1, length(referer))) AS Referring_Domain, " ."count(*) AS Referral_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY Referring_Domain"; } elseif ($args['mode']=='remote_hosts') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."remote_host AS Remote_Host, " ."count(*) AS Access_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY Remote_Host"; } elseif ($args['mode']=='users') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."remote_user AS User, " ."count(*) AS Access_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY User"; } elseif ($args['mode']=='host-users') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."remote_host AS Remote_Host, " ."remote_user AS User, " ."count(*) AS Access_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY Remote_Host, User"; } return $query; } function getDefaultArguments() { return array( 'mode' => 'referring_domains', // see _getQueryString(), currently one of // referring_domains, referring_urls, remote_hosts, users, host-users 'caption' => '', // blank means use the mode as the caption/title for the output 'local_referrers' => 'true', // only show external referring sites 'period' => '', // the type of history period to retrieve, see _getWhereConditions() // may be weeks, days, hours, minutes, or blank for all 'count' => '0' // the number of periods to retrieve ); } function getName () { return _("AnalyseAccessLog"); } function getDescription () { return _("Show summary information from the access log table."); } function getVersion() { return preg_replace("/[Revision: $]/", '', "\$Revision: 0.1 $"); } function run($dbi, $argstr, &$request, $basepage) { // flag that the output may not be cached - i.e. it is dynamic $request->setArg('nocache',1); if (!$request->_user->isAdmin()) return HTML::p(_("The requested information is available only to administrators.")); if (!ACCESS_LOG_SQL==2) return HTML::p(_("The SQL_ACCESS_LOG is not enabled.")); // set aside a place for the table headers, see _setHeaders() $this->_headerSet = false; $this->_theadRow = HTML::tr(); $args = $this->getArgs($argstr, $request); $query = $this->_getQueryString($args); if ($query=='') return HTML::p(sprintf( _("Unrecognised parameter 'mode=%s'"), $args['mode'])); // get the data back. // Note that this must be done before the final generation of the html table, // otherwise the headers will not be ready $tbody = $this->_getQueryResults($query, $dbi); return HTML::table(array( 'border' => 1, 'cellspacing' => 1, 'cellpadding' => 1), HTML::caption(HTML::h1(HTML::br(),$this->_getCaption($args))), HTML::thead($this->_theadRow), $tbody); } function _getQueryResults($query, &$dbi) { $queryResult = $dbi->genericSqlIter($query); if (!$queryResult) { $tbody = HTML::tbody((HTML::tr(HTML::td(_("_nothing_"))))); } else { $tbody = HTML::tbody(); while ($row = $queryResult->next()) { $this->_setHeaders($row); $tr = HTML::tr(); foreach ($row as $value) { // output a '-' for empty values, otherwise the table looks strange $tr->pushContent(HTML::td( empty($value) ? '-' : $value )); } $tbody->pushContent($tr); } } $queryResult->free(); return $tbody; } function _setHeaders($row) { if(!$this->_headerSet) { foreach ($row as $key => $value) { $this->_theadRow->pushContent(HTML::th(_($key))); } $this->_headerSet = true; } } function _getWhereConditions(&$args) { $where_conditions = ''; if ($args['period']<>'') { $since = 0; if ($args['period']=='minutes') { $since = 60; } elseif ($args['period']=='hours') { $since = 60 * 60; } elseif ($args['period']=='days') { $since = 60 * 60 * 24; } elseif ($args['period']=='weeks') { $since = 60 * 60 * 24 * 7; } $since = $since * $args['count']; if ($since>0) { if ($where_conditions<>'') $where_conditions = $where_conditions.' AND '; $since = time() - $since; $where_conditions = $where_conditions."time_stamp>$since"; } } if ($args['local_referrers']<>'true') { if ($where_conditions<>'') $where_conditions = $where_conditions.' AND '; $localhost = SERVER_URL; $len = strlen($localhost); $where_conditions = $where_conditions."left(referer,$len)<>'$localhost'"; } // the assumed contract is that there is a space at the end of the condtions string, // so that following SQL clauses (such as GROUP BY) will not cause a syntax error if ($where_conditions<>'') $where_conditions = $where_conditions.' '; return $where_conditions; } function _getCaption(&$args) { $caption = $args['caption']; if ($caption=='') $caption = _($args['mode']); if ($args['period']<>'' && $args['count']) $caption = $caption." - ".$args['count']." "._($args['period']); return $caption; } } ?> |
From: Reini U. <ru...@x-...> - 2005-02-02 11:59:54
|
Charles Corrigan schrieb: > I have written a new plugin to allow me to analyse the SQL access log (if > available). I hope others find it useful. Thanks. Sounds useful. There are some more useful accesslog plugins in the works for which I had no time yet. RhNav (FractalNavigation) by Walter Rafelsberger. http://phpwiki.sourceforge.net/phpwiki/FractalNavigationPlugin Also author of the shamino_com theme. One note: please use _("") and not _(''), xgettext requires " -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Charles C. <ch...@ru...> - 2005-02-02 09:36:43
|
I have written a new plugin to allow me to analyse the SQL access log (if available). I hope others find it useful. One issue - some or all of the queries that I have written may use the MySQL specific dialect of SQL. However, most of the plugin provides the framework to parametrise the queries and to display the results and, I hope, I have documented how to add new queries. Use of the plugin requires administrator access as some of the information may be sensitive. regards, Charles <?php /* Copyright 2005 Charles Corrigan and $ThePhpWikiProgrammingTeam This file is (not yet) part of PhpWiki. PhpWiki is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. PhpWiki is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PhpWiki; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** * A plugin that provides a framework and some useful queries to analyse the SQL * access log. This information may be sensitive and so is limited to * administrator access only. * * To add a new query, see _getQueryString() */ class WikiPlugin_AnalyseAccessLog extends WikiPlugin { /** * Build the query string * * FIXME - some or all of these queries may be MySQL specific / non-portable * * FIXME - is there a more correct way to get the name of the accesslog * table? * * The column names displayed are generated from the actual query column * names, so make sure that each column in the query is given a user * friendly name. Note that the column names are passed to _() and so may be * translated. * * If there are query specific where conditions, then the construction * " if ($where_conditions<>'') * $where_conditions = 'WHERE '.$where_conditions.' ';" * should be changed to * " if ($where_conditions<>'') * $where_conditions = 'AND '.$where_conditions.' ';" * and in the assignment to query have something like * " $query= "SELECT " * ."referer " * ."FROM $accesslog " * ."WHERE referer IS NOT NULL " * .$where_conditions */ function _getQueryString(&$args) { // extract any parametrised conditions from the arguments, // in particular, how much history to select $where_conditions = $this->_getWhereConditions($args); // get the correct name for the table //FIXME is there a more correct way to do this? global $DBParams; $accesslog = (!empty($DBParams['prefix']) ? $DBParams['prefix'] : '')."accesslog"; $query = ''; if ($args['mode']=='referring_urls') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."left(referer,length(referer)-instr(reverse(referer),'?')) AS Referring_URL, " ."count(*) AS Referral_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY Referring_URL"; } elseif ($args['mode']=='referring_domains') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."left(referer, if(locate('/', referer, 8) > 0, locate('/', referer, 8) -1, length(referer))) AS Referring_Domain, " ."count(*) AS Referral_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY Referring_Domain"; } elseif ($args['mode']=='remote_hosts') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."remote_host AS Remote_Host, " ."count(*) AS Access_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY Remote_Host"; } elseif ($args['mode']=='users') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."remote_user AS User, " ."count(*) AS Access_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY User"; } elseif ($args['mode']=='host-users') { if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; $query = "SELECT " ."remote_host AS Remote_Host, " ."remote_user AS User, " ."count(*) AS Access_Count " ."FROM $accesslog " .$where_conditions ."GROUP BY Remote_Host, User"; } return $query; } function getDefaultArguments() { return array( 'mode' => 'referring_domains', // referring_domains, referring_urls, remote_hosts, users, host-users 'caption' => '', // blank means use the mode as the caption/title for the output 'local_referrers' => 'true', // only show external referring sites 'period' => '', // the type of period to report: // may be weeks, days, hours, minutes, or blank for all 'count' => '0' // the number of periods to report ); } function getName () { return _("AnalyseAccessLog"); } function getDescription () { return _("Show summary information from the access log table."); } function getVersion() { return preg_replace("/[Revision: $]/", '', "\$Revision: 0.1 $"); } function run($dbi, $argstr, &$request, $basepage) { // flag that the output may not be cached - i.e. it is dynamic $request->setArg('nocache',1); if (!$request->_user->isAdmin()) return HTML::p(_('The requested information is available only to administrators.')); if (!ACCESS_LOG_SQL==2) return HTML::p(_('The SQL_ACCESS_LOG is not enabled.')); // set aside a place for the table headers, see _setHeaders() $this->_theadrow = HTML::tr(); $this->_headerSet = false; $args = $this->getArgs($argstr, $request); $query = $this->_getQueryString($args); if ($query=='') return HTML::p(sprintf( _("Unrecognised parameter 'mode=%s'"), $args['mode'])); // get the data back. // Note that this must be done before the final generation of the table, // otherwise the headers will not be ready $tbody = $this->_getQueryResults($query, $dbi); return HTML::table(array( 'border' => 1, 'cellspacing' => 1, 'cellpadding' => 1), HTML::caption(HTML::h1(HTML::br(),$this->_getCaption($args))), HTML::thead($this->_theadrow), $tbody); } function _getQueryResults($query, &$dbi) { $queryResult = $dbi->genericSqlIter($query); if (!$queryResult) { $tbody = HTML::tbody((HTML::tr(HTML::td(_('_nothing_'))))); } else { $tbody = HTML::tbody(); while ($row = $queryResult->next()) { $this->_setHeaders($row); $tr = HTML::tr(); foreach ($row as $value) { // output a '-' for empty values, otherwise the table looks strange $tr->pushContent(HTML::td( empty($value) ? '-' : $value )); } $tbody->pushContent($tr); } } $queryResult->free(); return $tbody; } function _setHeaders($row) { if(!$this->_headerSet) { foreach ($row as $key => $value) { $this->_theadrow->pushContent(HTML::th(_($key))); } $this->_headerSet = true; } } function _getWhereConditions(&$args) { $where_conditions = ''; if ($args['period']<>'') { $since = 0; if ($args['period']=='minutes') { $since = 60; } elseif ($args['period']=='hours') { $since = 60 * 60; } elseif ($args['period']=='days') { $since = 60 * 60 * 24; } elseif ($args['period']=='weeks') { $since = 60 * 60 * 24 * 7; } $since = $since * $args['count']; if ($since>0) { if ($where_conditions<>'') $where_conditions = $where_conditions.' AND '; $since = time() - $since; $where_conditions = $where_conditions."time_stamp>$since"; } } if ($args['local_referrers']<>'true') { if ($where_conditions<>'') $where_conditions = $where_conditions.' AND '; $localhost = SERVER_URL; $len = strlen($localhost); $where_conditions = $where_conditions."left(referer,$len)<>'$localhost'"; } // the assumed contract is that there is a space at the end of the condtions string, // so that following SQL clauses (such as GROUP BY) will not cause a syntax error if ($where_conditions<>'') $where_conditions = $where_conditions.' '; return $where_conditions; } function _getCaption(&$args) { $caption = $args['caption']; if ($caption=='') $caption = _($args['mode']); if ($args['period']<>'' && $args['count']) $caption = $caption." - ".$args['count']." "._($args['period']); return $caption; } } ?> |
From: John C. <joh...@ua...> - 2005-02-01 19:41:52
|
Reini, Ok, thanks. I was checking out the CVS head on our test machine to see how things looked. I'll keep an eye out of fixes in that area and try them out when they have been fixed. Thanks, John -----Original Message----- From: php...@li... [mailto:php...@li...] On Behalf Of Reini Urban Sent: Tuesday, February 01, 2005 1:32 PM To: PhpWiki discussion Subject: Re: [Phpwiki-talk] problem with rename... John Cole schrieb: > I'm having trouble getting the rename page to work. I've tried renaming a > single page "test" to "testpage2" and it responded with "Couldn't rename > page 'test' to 'testpage2'. No pages renamed." > > Is this working at the moment? This is with CVS head (as of a few minutes > ago). Thanks. This doesn't work, and there are LOT of more problems. Setacl doesn't work. locale and templates and theme and request problems, ... Still a lot more bugs to fix. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Phpwiki-talk mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phpwiki-talk ------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. |
From: Reini U. <ru...@x-...> - 2005-02-01 19:31:36
|
John Cole schrieb: > I'm having trouble getting the rename page to work. I've tried renaming a > single page "test" to "testpage2" and it responded with "Couldn't rename > page 'test' to 'testpage2'. No pages renamed." > > Is this working at the moment? This is with CVS head (as of a few minutes > ago). Thanks. This doesn't work, and there are LOT of more problems. Setacl doesn't work. locale and templates and theme and request problems, ... Still a lot more bugs to fix. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: John C. <joh...@ua...> - 2005-02-01 18:56:24
|
Reini, I'm having trouble getting the rename page to work. I've tried renaming a single page "test" to "testpage2" and it responded with "Couldn't rename page 'test' to 'testpage2'. No pages renamed." Is this working at the moment? This is with CVS head (as of a few minutes ago). Thanks, John ------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. |
From: Reini U. <ru...@x-...> - 2005-02-01 18:31:48
|
Arnaud Fontaine schrieb: > | The force the LANG in the apache startup script to 'C' ... and because > | you set the locale to DEFAULT_LANGUAGE only if LANG is empty, it's > | always set to what apache send you ... > > Still investigating ....... > > forcing the LANG in the apache startup script to fr_FR makes phpwiki > behaves strangelly : > > Most of my 'fr' wikis are working ... almost fine. Most of the time, > they are in french and sometimes (hard to see when ... generaly when > logged in as an admin and performing an action=upgrade ... but not only) > it goes back to 'en'. > > VERY strange. > > We really need to set the locale once and very clearly ... not get > confused with LANG and DEFAULT_LANGUAGE ... well ... what else ... Oh > yes, we need an option to not allow locale switching. Why did I add $LANG to DEFAULT_LANGUAGE? I don't remember exactly, but the rough estimation goes like this: Configs cannot only be set once and only, when they have to be changed - e.g. by userprefs or if empty for late auto-detection - they must become a global. Other discrepancies: The locale subdirs are not 1:1 mapped to $LANG. The locale may have a subsection like "de_AT" ($LANG also) and additionally a charset, like de_AT.utf8 (lang NOT) Our bindtextdomain paths (locale/*) should provide these alternatives also. Esp. for utf8 once it's ready. To have ja.utf8 and ja.euc-jp or sv.utf8 Then some lang+locale functions have to be fixed. Better sooner than later, because better databases require better charsets, and utf8 is usually the easiest to convert to and from on collate (sorting) on user-input and pagenames. With latin1 we will hit a border. With mysql-4.1.8 or postgreslql-8.0 I already need a utf-8 database or have to do manual utf8 conversion on unusual pagenames. If DEFAULT_LANGUAGE is empty, the server (or client's?) locale should be used. If userprefs don't override $LANG: $LANG = DEFAULT_LANGUAGE. How to avoid lang switching? Currently it's avoided by disabling the pulldown in userprefs.tmpl Avoiding locale switching? We must do setlocale() to support gettext(), otherwise it will not find the right locale subdir. That's a gettext limitation. This was always automatic and we will not change this. But we have to change the logic to check first DEFAULT_LANGUAGE, and only if this is not set, check LANG or do autodetection. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |