From: <var...@us...> - 2009-09-12 04:37:51
|
Revision: 7111 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7111&view=rev Author: vargenau Date: 2009-09-12 04:37:41 +0000 (Sat, 12 Sep 2009) Log Message: ----------- Valid XHTML code Modified Paths: -------------- trunk/lib/plugin/NewPagesPerUser.php Modified: trunk/lib/plugin/NewPagesPerUser.php =================================================================== --- trunk/lib/plugin/NewPagesPerUser.php 2009-09-11 08:04:02 UTC (rev 7110) +++ trunk/lib/plugin/NewPagesPerUser.php 2009-09-12 04:37:41 UTC (rev 7111) @@ -92,7 +92,10 @@ (HTML::tr(HTML::td($nbsp,$nbsp, HTML::img(array('id' => "$id-img", 'src' => $WikiTheme->_findData("images/folderArrowClosed.png"), - 'onClick'=> "showHideFolder('$id')")),$nbsp, + 'onclick'=> "showHideFolder('$id')", + 'alt' => _("Click to hide/show"), + 'title' => _("Click to hide/show"))), + $nbsp, $user), HTML::td($count) )); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-09-12 04:47:10
|
Revision: 7112 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7112&view=rev Author: vargenau Date: 2009-09-12 04:47:01 +0000 (Sat, 12 Sep 2009) Log Message: ----------- Valid XHTML code Modified Paths: -------------- trunk/lib/plugin/NewPagesPerUser.php Modified: trunk/lib/plugin/NewPagesPerUser.php =================================================================== --- trunk/lib/plugin/NewPagesPerUser.php 2009-09-12 04:37:41 UTC (rev 7111) +++ trunk/lib/plugin/NewPagesPerUser.php 2009-09-12 04:47:01 UTC (rev 7112) @@ -62,7 +62,7 @@ $date = $rev->get('mtime'); //$author = $rev->get('author_id'); $author = $page->getOwner(); - if ($debug) echo "<i>$pagename, ",strftime("%Y-%m-%d %h:%m:%s", $date),", $author</i><br>\n"; + if ($debug) echo "<i>$pagename, ",strftime("%Y-%m-%d %h:%m:%s", $date),", $author</i><br />\n"; if ($userid and (!preg_match("/".$userid."/", $author))) continue; if ($since and $date < $since) continue; if ($until and $date > $until) continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2012-11-29 17:41:09
|
Revision: 8574 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8574&view=rev Author: vargenau Date: 2012-11-29 17:40:59 +0000 (Thu, 29 Nov 2012) Log Message: ----------- Add function cmp_by_count Modified Paths: -------------- trunk/lib/plugin/NewPagesPerUser.php Modified: trunk/lib/plugin/NewPagesPerUser.php =================================================================== --- trunk/lib/plugin/NewPagesPerUser.php 2012-11-29 14:59:43 UTC (rev 8573) +++ trunk/lib/plugin/NewPagesPerUser.php 2012-11-29 17:40:59 UTC (rev 8574) @@ -136,6 +136,12 @@ } } +function cmp_by_count($a, $b) +{ + if ($a['count'] == $b['count']) return 0; + return $a['count'] < $b['count'] ? 1 : -1; +} + // Local Variables: // mode: php // tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-09-10 13:14:14
|
Revision: 10550 http://sourceforge.net/p/phpwiki/code/10550 Author: vargenau Date: 2021-09-10 13:14:12 +0000 (Fri, 10 Sep 2021) Log Message: ----------- NewPagesPerUser plugin: check comments and links are boolean Modified Paths: -------------- trunk/lib/plugin/NewPagesPerUser.php Modified: trunk/lib/plugin/NewPagesPerUser.php =================================================================== --- trunk/lib/plugin/NewPagesPerUser.php 2021-09-10 13:12:44 UTC (rev 10549) +++ trunk/lib/plugin/NewPagesPerUser.php 2021-09-10 13:14:12 UTC (rev 10550) @@ -47,12 +47,11 @@ function getDefaultArguments() { return array('userid' => '', - 'month' => 0, - 'since' => 0, - 'until' => 0, - 'comments' => 0, - 'links' => 1, - 'debug' => 0, + 'month' => '', + 'since' => '', + 'until' => '', + 'comments' => false, + 'links' => true ); } @@ -68,6 +67,22 @@ global $WikiTheme; $args = $this->getArgs($argstr, $request); extract($args); + + if (($comments == '0') || ($comments == 'false')) { + $comments = false; + } elseif (($comments == '1') || ($comments == 'true')) { + $comments = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "comments")); + } + if (($links == '0') || ($links == 'false')) { + $links = false; + } elseif (($links == '1') || ($links == 'true')) { + $links = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "links")); + } + if ($since) $since = strtotime($since); if ($month) { @@ -85,11 +100,7 @@ if (!$page->exists()) continue; $rev = $page->getRevision(1, false); $date = $rev->get('mtime'); - //$author = $rev->get('author_id'); $author = $page->getOwner(); - if (defined('DEBUG') && DEBUG && $debug) { - echo "<i>$pagename, ", strftime("%Y-%m-%d %h:%m:%s", $date), ", $author</i><br />\n"; - } if ($userid and (!preg_match("/" . $userid . "/", $author))) continue; if ($since and $date < $since) continue; if ($until and $date > $until) continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-09-14 14:07:16
|
Revision: 10553 http://sourceforge.net/p/phpwiki/code/10553 Author: vargenau Date: 2021-09-14 14:07:14 +0000 (Tue, 14 Sep 2021) Log Message: ----------- lib/plugin/NewPagesPerUser.php: add random number in id so that multiple calls of plugin are allowed in same page Modified Paths: -------------- trunk/lib/plugin/NewPagesPerUser.php Modified: trunk/lib/plugin/NewPagesPerUser.php =================================================================== --- trunk/lib/plugin/NewPagesPerUser.php 2021-09-14 10:37:51 UTC (rev 10552) +++ trunk/lib/plugin/NewPagesPerUser.php 2021-09-14 14:07:14 UTC (rev 10553) @@ -126,7 +126,7 @@ uasort($parr['author'], array($this, 'cmp_by_count')); foreach ($parr['author'] as $user => $authorarr) { $count = $authorarr['count']; - $id = preg_replace("/ /", "_", 'pages-' . $monthname . '-' . $user); + $id = preg_replace("/ /", "_", 'pages-' . $monthname . '-' . $user . '-' . rand()); $html->pushContent (HTML::tr(HTML::td($nbsp, $nbsp, HTML::img(array('id' => "$id-img", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |