From: <var...@us...> - 2009-03-05 11:04:29
|
Revision: 6637 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6637&view=rev Author: vargenau Date: 2009-03-05 11:04:20 +0000 (Thu, 05 Mar 2009) Log Message: ----------- New link: Upgrade & Overwrite Modified Paths: -------------- trunk/pgsrc/PhpWikiAdministration trunk/themes/gforge/pgsrc/PhpWikiAdministration Modified: trunk/pgsrc/PhpWikiAdministration =================================================================== --- trunk/pgsrc/PhpWikiAdministration 2009-03-05 10:53:38 UTC (rev 6636) +++ trunk/pgsrc/PhpWikiAdministration 2009-03-05 11:04:20 UTC (rev 6637) @@ -1,4 +1,4 @@ -Date: Sat, 11 Feb 2009 22:22:24 +0100 +Date: Thu, 5 Mar 2009 12:02:32 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) X-Rcs-Id: $Id$ Content-Type: application/x-phpwiki; @@ -107,7 +107,9 @@ * Upgrade new or changed page revisions from pgsrc, * Upgrade the database schema (mysql //page.id auto_increment//, ADD //session.sess_ip//), -Do the **[[phpwiki:HomePage?action=upgrade|Upgrade]]** +You can force overwrite or not: +* **[[phpwiki:HomePage?action=upgrade|Upgrade]]** +* **[[phpwiki:HomePage?action=upgrade&overwrite=1|Upgrade & Overwrite]]** == Format of the files Modified: trunk/themes/gforge/pgsrc/PhpWikiAdministration =================================================================== --- trunk/themes/gforge/pgsrc/PhpWikiAdministration 2009-03-05 10:53:38 UTC (rev 6636) +++ trunk/themes/gforge/pgsrc/PhpWikiAdministration 2009-03-05 11:04:20 UTC (rev 6637) @@ -1,4 +1,4 @@ -Date: Sat, 11 Feb 2009 22:22:24 +0100 +Date: Thu, 5 Mar 2009 12:00:44 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) X-Rcs-Id: $Id$ Content-Type: application/x-phpwiki; @@ -84,7 +84,9 @@ * Upgrade new or changed page revisions from pgsrc, * Upgrade the database schema (mysql //page.id auto_increment//, ADD //session.sess_ip//), -Do the **[[phpwiki:HomePage?action=upgrade|Upgrade]]** +You can force overwrite or not: +* **[[phpwiki:HomePage?action=upgrade|Upgrade]]** +* **[[phpwiki:HomePage?action=upgrade&overwrite=1|Upgrade & Overwrite]]** == Format of the files This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-06 14:25:56
|
Revision: 6651 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6651&view=rev Author: vargenau Date: 2009-03-06 14:25:47 +0000 (Fri, 06 Mar 2009) Log Message: ----------- Remove InterWikiSearch plugin Removed Paths: ------------- trunk/lib/plugin/InterWikiSearch.php trunk/pgsrc/Help%2FInterWikiSearchPlugin trunk/pgsrc/InterWikiSearch Deleted: trunk/lib/plugin/InterWikiSearch.php =================================================================== --- trunk/lib/plugin/InterWikiSearch.php 2009-03-06 14:11:40 UTC (rev 6650) +++ trunk/lib/plugin/InterWikiSearch.php 2009-03-06 14:25:47 UTC (rev 6651) @@ -1,160 +0,0 @@ -<?php // -*-php-*- -rcs_id('$Id$'); -/** - Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam - - This file is 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 - */ -/** - * @description - */ -require_once('lib/PageType.php'); - -class WikiPlugin_InterWikiSearch -extends WikiPlugin -{ - function getName() { - return _("InterWikiSearch"); - } - - function getDescription() { - return _("Perform searches on InterWiki sites listed in InterWikiMap."); - } - - function getVersion() { - return preg_replace("/[Revision: $]/", '', - "\$Revision$"); - } - - function getDefaultArguments() { - return array('s' => '', - 'formsize' => 30, - ); - } - - function run($dbi, $argstr, &$request, $basepage) { - $args = $this->getArgs($argstr, $request); - extract($args); - - if (defined('DEBUG') && !DEBUG) - return $this->disabled("Sorry, this plugin is currently out of order."); - - $page = $dbi->getPage($request->getArg('pagename')); - return new TransformedText($page,_('InterWikiMap'),array('markup' => 2), - 'searchableInterWikiMap'); - /* - return new PageType($pagerevisionhandle, - $pagename = _('InterWikiMap'), - $markup = 2, - $overridePageType = 'PageType_searchableInterWikiMap'); - */ - } -}; - - -/** - * @desc - */ -if (defined('DEBUG') && DEBUG) { -class PageFormatter_searchableInterWikiMap -extends PageFormatter_interwikimap {} - -class PageType_searchableInterWikiMap -extends PageType_interwikimap -{ - function format($text) { - return HTML::div(array('class' => 'wikitext'), - $this->_transform($this->_getHeader($text)), - $this->_formatMap(), - $this->_transform($this->_getFooter($text))); - } - - function _formatMap() { - return $this->_arrayToTable ($this->_getMap(), $GLOBALS['request']); - } - - function _arrayToTable ($array, &$request) { - $thead = HTML::thead(); - $label[0] = _("Wiki Name"); - $label[1] = _("Search"); - $thead->pushContent(HTML::tr(HTML::th($label[0]), - HTML::th($label[1]))); - - $tbody = HTML::tbody(); - $dbi = $request->getDbh(); - if ($array) { - foreach ($array as $moniker => $interurl) { - $monikertd = HTML::td(array('class' => 'interwiki-moniker'), - $dbi->isWikiPage($moniker) - ? WikiLink($moniker) - : $moniker); - - $w = new WikiPluginLoader; - $p = $w->getPlugin('ExternalSearch'); - $argstr = sprintf('url="%s"', addslashes($interurl)); - $searchtd = HTML::td($p->run($dbi, $argstr, $request, $basepage)); - - $tbody->pushContent(HTML::tr($monikertd, $searchtd)); - } - } - $table = HTML::table(); - $table->setAttr('class', 'interwiki-map'); - $table->pushContent($thead); - $table->pushContent($tbody); - - return $table; - } -}; -} - - -// $Log: not supported by cvs2svn $ -// Revision 1.8 2004/06/28 12:51:41 rurban -// improved dumphtml and virgin setup -// -// Revision 1.7 2004/06/15 14:56:37 rurban -// more allow_call_time_pass_reference false fixes -// -// Revision 1.6 2004/04/19 23:13:03 zorloc -// Connect the rest of PhpWiki to the IniConfig system. Also the keyword regular expression is not a config setting -// -// Revision 1.5 2004/02/19 22:06:53 rurban -// use new class, to be able to get rid of lib/interwiki.php -// -// Revision 1.4 2004/02/17 12:11:36 rurban -// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) -// -// Revision 1.3 2003/02/23 20:10:48 dairiki -// Disable currently broken plugin to prevent fatal PHP errors. -// (Sorry.) -// -// Revision 1.2 2003/02/22 20:49:56 dairiki -// Fixes for "Call-time pass by reference has been deprecated" errors. -// -// Revision 1.1 2003/01/31 22:56:21 carstenklapp -// New plugin which provides entry forms to search any site listed in the InterWikiMap. -// - -// (c-file-style: "gnu") -// Local Variables: -// mode: php -// tab-width: 8 -// c-basic-offset: 4 -// c-hanging-comment-ender-p: nil -// indent-tabs-mode: nil -// End: -?> Deleted: trunk/pgsrc/Help%FInterWikiSearchPlugin =================================================================== --- trunk/pgsrc/Help%2FInterWikiSearchPlugin 2009-03-06 14:11:40 UTC (rev 6650) +++ trunk/pgsrc/Help%2FInterWikiSearchPlugin 2009-03-06 14:25:47 UTC (rev 6651) @@ -1,39 +0,0 @@ -Date: Tue, 3 Mar 2009 15:32:44 +0000 -Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) -X-Rcs-Id: $Id$ -Content-Type: application/x-phpwiki; - pagename=Help%2FInterWikiSearchPlugin; - flags=PAGE_LOCKED; - markup=2; - charset=iso-8859-1 -Content-Transfer-Encoding: binary - -_short description_ - -== Usage -{{{ -<<InterWikiSearch>> -}}} - -== Arguments - -page _(default: current pagename)_: - The page to execute upon. - -== Example - -{{{ -<<InterWikiSearch>> -}}} - -<<InterWikiSearch>> - -== Author -* [[PhpWiki:ReiniUrban|Reini Urban]] - -== See Also - -<noinclude> ----- -[[PhpWikiDocumentation]] [[CategoryWikiPlugin]] -</noinclude> Deleted: trunk/pgsrc/InterWikiSearch =================================================================== --- trunk/pgsrc/InterWikiSearch 2009-03-06 14:11:40 UTC (rev 6650) +++ trunk/pgsrc/InterWikiSearch 2009-03-06 14:25:47 UTC (rev 6651) @@ -1,20 +0,0 @@ -Date: Mon, 23 Feb 2009 14:11:05 +0000 -Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) -X-Rcs-Id: $Id$ -Content-Type: application/x-phpwiki; - pagename=InterWikiSearch; - flags=PAGE_LOCKED; - markup=2; - charset=iso-8859-1 -Content-Transfer-Encoding: binary - -Query any Wiki listed in the [InterWikiMap] by entering a desired page -name below. - -To add one of these searches to another page use the -[ExternalSearchPlugin|Help:ExternalSearchPlugin]. - -<<InterWikiSearch>> - ----- -[[CategoryActionPage]] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-06 15:34:10
|
Revision: 6652 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6652&view=rev Author: vargenau Date: 2009-03-06 15:33:55 +0000 (Fri, 06 Mar 2009) Log Message: ----------- I goofed -- restoring files Added Paths: ----------- trunk/lib/plugin/InterWikiSearch.php trunk/pgsrc/Help%2FInterWikiSearchPlugin trunk/pgsrc/InterWikiSearch Copied: trunk/lib/plugin/InterWikiSearch.php (from rev 6650, trunk/lib/plugin/InterWikiSearch.php) =================================================================== --- trunk/lib/plugin/InterWikiSearch.php (rev 0) +++ trunk/lib/plugin/InterWikiSearch.php 2009-03-06 15:33:55 UTC (rev 6652) @@ -0,0 +1,160 @@ +<?php // -*-php-*- +rcs_id('$Id$'); +/** + Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam + + This file is 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 + */ +/** + * @description + */ +require_once('lib/PageType.php'); + +class WikiPlugin_InterWikiSearch +extends WikiPlugin +{ + function getName() { + return _("InterWikiSearch"); + } + + function getDescription() { + return _("Perform searches on InterWiki sites listed in InterWikiMap."); + } + + function getVersion() { + return preg_replace("/[Revision: $]/", '', + "\$Revision$"); + } + + function getDefaultArguments() { + return array('s' => '', + 'formsize' => 30, + ); + } + + function run($dbi, $argstr, &$request, $basepage) { + $args = $this->getArgs($argstr, $request); + extract($args); + + if (defined('DEBUG') && !DEBUG) + return $this->disabled("Sorry, this plugin is currently out of order."); + + $page = $dbi->getPage($request->getArg('pagename')); + return new TransformedText($page,_('InterWikiMap'),array('markup' => 2), + 'searchableInterWikiMap'); + /* + return new PageType($pagerevisionhandle, + $pagename = _('InterWikiMap'), + $markup = 2, + $overridePageType = 'PageType_searchableInterWikiMap'); + */ + } +}; + + +/** + * @desc + */ +if (defined('DEBUG') && DEBUG) { +class PageFormatter_searchableInterWikiMap +extends PageFormatter_interwikimap {} + +class PageType_searchableInterWikiMap +extends PageType_interwikimap +{ + function format($text) { + return HTML::div(array('class' => 'wikitext'), + $this->_transform($this->_getHeader($text)), + $this->_formatMap(), + $this->_transform($this->_getFooter($text))); + } + + function _formatMap() { + return $this->_arrayToTable ($this->_getMap(), $GLOBALS['request']); + } + + function _arrayToTable ($array, &$request) { + $thead = HTML::thead(); + $label[0] = _("Wiki Name"); + $label[1] = _("Search"); + $thead->pushContent(HTML::tr(HTML::th($label[0]), + HTML::th($label[1]))); + + $tbody = HTML::tbody(); + $dbi = $request->getDbh(); + if ($array) { + foreach ($array as $moniker => $interurl) { + $monikertd = HTML::td(array('class' => 'interwiki-moniker'), + $dbi->isWikiPage($moniker) + ? WikiLink($moniker) + : $moniker); + + $w = new WikiPluginLoader; + $p = $w->getPlugin('ExternalSearch'); + $argstr = sprintf('url="%s"', addslashes($interurl)); + $searchtd = HTML::td($p->run($dbi, $argstr, $request, $basepage)); + + $tbody->pushContent(HTML::tr($monikertd, $searchtd)); + } + } + $table = HTML::table(); + $table->setAttr('class', 'interwiki-map'); + $table->pushContent($thead); + $table->pushContent($tbody); + + return $table; + } +}; +} + + +// $Log: not supported by cvs2svn $ +// Revision 1.8 2004/06/28 12:51:41 rurban +// improved dumphtml and virgin setup +// +// Revision 1.7 2004/06/15 14:56:37 rurban +// more allow_call_time_pass_reference false fixes +// +// Revision 1.6 2004/04/19 23:13:03 zorloc +// Connect the rest of PhpWiki to the IniConfig system. Also the keyword regular expression is not a config setting +// +// Revision 1.5 2004/02/19 22:06:53 rurban +// use new class, to be able to get rid of lib/interwiki.php +// +// Revision 1.4 2004/02/17 12:11:36 rurban +// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) +// +// Revision 1.3 2003/02/23 20:10:48 dairiki +// Disable currently broken plugin to prevent fatal PHP errors. +// (Sorry.) +// +// Revision 1.2 2003/02/22 20:49:56 dairiki +// Fixes for "Call-time pass by reference has been deprecated" errors. +// +// Revision 1.1 2003/01/31 22:56:21 carstenklapp +// New plugin which provides entry forms to search any site listed in the InterWikiMap. +// + +// (c-file-style: "gnu") +// Local Variables: +// mode: php +// tab-width: 8 +// c-basic-offset: 4 +// c-hanging-comment-ender-p: nil +// indent-tabs-mode: nil +// End: +?> Copied: trunk/pgsrc/Help%FInterWikiSearchPlugin (from rev 6649, trunk/pgsrc/Help%FInterWikiSearchPlugin) =================================================================== --- trunk/pgsrc/Help%2FInterWikiSearchPlugin (rev 0) +++ trunk/pgsrc/Help%2FInterWikiSearchPlugin 2009-03-06 15:33:55 UTC (rev 6652) @@ -0,0 +1,39 @@ +Date: Tue, 3 Mar 2009 15:32:44 +0000 +Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) +X-Rcs-Id: $Id$ +Content-Type: application/x-phpwiki; + pagename=Help%2FInterWikiSearchPlugin; + flags=PAGE_LOCKED; + markup=2; + charset=iso-8859-1 +Content-Transfer-Encoding: binary + +_short description_ + +== Usage +{{{ +<<InterWikiSearch>> +}}} + +== Arguments + +page _(default: current pagename)_: + The page to execute upon. + +== Example + +{{{ +<<InterWikiSearch>> +}}} + +<<InterWikiSearch>> + +== Author +* [[PhpWiki:ReiniUrban|Reini Urban]] + +== See Also + +<noinclude> +---- +[[PhpWikiDocumentation]] [[CategoryWikiPlugin]] +</noinclude> Copied: trunk/pgsrc/InterWikiSearch (from rev 6650, trunk/pgsrc/InterWikiSearch) =================================================================== --- trunk/pgsrc/InterWikiSearch (rev 0) +++ trunk/pgsrc/InterWikiSearch 2009-03-06 15:33:55 UTC (rev 6652) @@ -0,0 +1,20 @@ +Date: Mon, 23 Feb 2009 14:11:05 +0000 +Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) +X-Rcs-Id: $Id$ +Content-Type: application/x-phpwiki; + pagename=InterWikiSearch; + flags=PAGE_LOCKED; + markup=2; + charset=iso-8859-1 +Content-Transfer-Encoding: binary + +Query any Wiki listed in the [InterWikiMap] by entering a desired page +name below. + +To add one of these searches to another page use the +[ExternalSearchPlugin|Help:ExternalSearchPlugin]. + +<<InterWikiSearch>> + +---- +[[CategoryActionPage]] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-22 14:45:48
|
Revision: 6687 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6687&view=rev Author: vargenau Date: 2009-03-22 14:45:42 +0000 (Sun, 22 Mar 2009) Log Message: ----------- individual Modified Paths: -------------- trunk/lib/plugin/WikiAdminSetAcl.php trunk/themes/default/templates/info.tmpl Modified: trunk/lib/plugin/WikiAdminSetAcl.php =================================================================== --- trunk/lib/plugin/WikiAdminSetAcl.php 2009-03-22 14:41:25 UTC (rev 6686) +++ trunk/lib/plugin/WikiAdminSetAcl.php 2009-03-22 14:45:42 UTC (rev 6687) @@ -224,7 +224,7 @@ if ($type == 'inherited') $type = sprintf(_("page permission inherited from %s"), $perm_tree[1][0]); elseif ($type == 'page') - $type = _("invidual page permission"); + $type = _("individual page permission"); elseif ($type == 'default') $type = _("default page permission"); $header->pushContent(HTML::strong(_("Type").': '), HTML::tt($type),HTML::br()); @@ -273,7 +273,7 @@ if ($type == 'inherited') { $type = sprintf(_("page permission inherited from %s"), $perm_tree[1][0]); } elseif ($type == 'page') { - $type = _("invidual page permission"); + $type = _("individual page permission"); } elseif ($type == 'default') { $type = _("default page permission"); } Modified: trunk/themes/default/templates/info.tmpl =================================================================== --- trunk/themes/default/templates/info.tmpl 2009-03-22 14:41:25 UTC (rev 6686) +++ trunk/themes/default/templates/info.tmpl 2009-03-22 14:45:42 UTC (rev 6687) @@ -78,7 +78,7 @@ if ($type == 'inherited') { $type = sprintf(_("page permission inherited from %s"), $perm_tree[1][0]); } elseif ($type == 'page') { - $type = _("invidual page permission"); + $type = _("individual page permission"); } elseif ($type == 'default') { $type = _("default page permission"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-22 17:39:04
|
Revision: 6688 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6688&view=rev Author: vargenau Date: 2009-03-22 17:39:00 +0000 (Sun, 22 Mar 2009) Log Message: ----------- new function: asAclGroupLines Modified Paths: -------------- trunk/lib/PagePerm.php trunk/lib/plugin/WikiAdminSetAcl.php trunk/themes/default/templates/info.tmpl Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2009-03-22 14:45:42 UTC (rev 6687) +++ trunk/lib/PagePerm.php 2009-03-22 17:39:00 UTC (rev 6688) @@ -709,7 +709,32 @@ return $s; } + // Print ACL as group followed by actions allowed for the group + function asAclGroupLines() { + $s = ''; + $perm =& $this->perm; + $actions = array("view", "edit", "create", "list", "remove", "purge", "dump", "change"); + $groups = array(ACL_EVERY, ACL_ANONYMOUS, ACL_BOGOUSER, ACL_HASHOMEPAGE, ACL_SIGNED, ACL_AUTHENTICATED, ACL_ADMIN, ACL_OWNER, ACL_CREATOR); + + foreach ($groups as $group) { + $none = true; + foreach ($actions as $action) { + if (isset($perm[$action][$group])) { + if ($none) { + $none = false; + $s .= "$group:"; + } + $s .= " $action"; + } + } + if (!($none)) { + $s .= "; "; + } + } + return $s; + } + // This is just a bad hack for testing. // Simplify the ACL to a unix-like "rwx------+" string // See getfacl(8) Modified: trunk/lib/plugin/WikiAdminSetAcl.php =================================================================== --- trunk/lib/plugin/WikiAdminSetAcl.php 2009-03-22 14:45:42 UTC (rev 6687) +++ trunk/lib/plugin/WikiAdminSetAcl.php 2009-03-22 17:39:00 UTC (rev 6688) @@ -229,7 +229,7 @@ $type = _("default page permission"); $header->pushContent(HTML::strong(_("Type").': '), HTML::tt($type),HTML::br()); $header->pushContent(HTML::strong(_("getfacl").': '), pagePermissionsSimpleFormat($perm_tree, $owner),HTML::br()); - $header->pushContent(HTML::strong(_("ACL").': '), HTML::tt($perm->asAclLines()),HTML::br()); + $header->pushContent(HTML::strong(_("ACL").': '), HTML::tt($perm->asAclGroupLines()),HTML::br()); $header->pushContent(HTML::p(HTML::strong(_("Description").': '), _("Selected Grant checkboxes allow access, unselected checkboxes deny access."), @@ -280,7 +280,7 @@ $result = HTML::span(); $result->pushContent($type); $result->pushContent(HTML::br()); - $result->pushContent($perm->asAclLines()); + $result->pushContent($perm->asAclGroupLines()); return $result; } }; Modified: trunk/themes/default/templates/info.tmpl =================================================================== --- trunk/themes/default/templates/info.tmpl 2009-03-22 14:45:42 UTC (rev 6687) +++ trunk/themes/default/templates/info.tmpl 2009-03-22 17:39:00 UTC (rev 6688) @@ -140,7 +140,7 @@ </tr> <tr> <td align="right" valign="top" class="pageinfo">ACL</td> - <td><?= $perm->asAclLines() ?></td> + <td><?= $perm->asAclGroupLines() ?></td> </tr> <?php } ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-25 09:14:51
|
Revision: 6699 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6699&view=rev Author: vargenau Date: 2009-03-25 09:14:26 +0000 (Wed, 25 Mar 2009) Log Message: ----------- font-size:smaller moved to CSS Modified Paths: -------------- trunk/lib/plugin/AuthorHistory.php trunk/themes/MacOSX/MacOSX.css trunk/themes/MonoBook/main.css trunk/themes/Sidebar/monobook.css trunk/themes/blog/Kubrick.css trunk/themes/default/phpwiki.css Modified: trunk/lib/plugin/AuthorHistory.php =================================================================== --- trunk/lib/plugin/AuthorHistory.php 2009-03-24 15:13:25 UTC (rev 6698) +++ trunk/lib/plugin/AuthorHistory.php 2009-03-25 09:14:26 UTC (rev 6699) @@ -2,6 +2,7 @@ rcs_id('$Id$'); /** Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam + Copyright 2009 Marc-Etienne Vargenau, Alcatel-Lucent This file is part of PhpWiki. @@ -20,14 +21,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* *** EXPERIMENTAL PLUGIN ****************** Needs a lot of work! Use at your own risk. - ****************************************** - + ****************************************** + try this in a page called AuthorHistory: - + <?plugin AuthorHistory page=username includeminor=true ?> ---- <?plugin AuthorHistory page=all ?> @@ -36,8 +36,8 @@ try this in a subpage of your UserName: (UserName/AuthorHistory) <?plugin AuthorHistory page=all includeminor=true ?> - + * Displays a list of revision edits by one particular user, for the * current page, a specified page, or all pages. @@ -73,12 +73,12 @@ function getDescription() { return sprintf(_("List all page revisions edited by one user with diff links, or show a PageHistory-like list of a single page for only one user.")); } - + function getVersion() { return preg_replace("/[Revision: $]/", '', "\$Revision$"); } - + function getDefaultArguments() { global $request; return array('exclude' => '', @@ -93,7 +93,7 @@ // info arg allows multiple columns // info=mtime,hits,summary,version,author,locked,minor // exclude arg allows multiple pagenames exclude=HomePage,RecentChanges - + function run($dbi, $argstr, &$request, $basepage) { $this->_args = $this->getArgs($argstr, $request); extract($this->_args); @@ -105,20 +105,18 @@ return ''; //$pagelist = new PageList($info, $exclude); /////////////////////////// - + $nbsp = HTML::raw(' '); - + global $WikiTheme; // date & time formatting - + if (! ($page == 'all')) { $p = $dbi->getPage($page); - - $t = HTML::table(array('class'=> 'pagelist', - 'style' => 'font-size:smaller')); + + $t = HTML::table(array('class'=> 'pagelist')); $th = HTML::thead(); $tb = HTML::tbody(); - - + $th->pushContent(HTML::tr(HTML::td(array('align'=> 'right'), _("Version")), $includeminor ? HTML::td(_("Minor")) : "", @@ -126,13 +124,13 @@ HTML::td(_("Summary")), HTML::td(_("Modified")) )); - + $allrevisions_iter = $p->getAllRevisions(); while ($rev = $allrevisions_iter->next()) { - + $isminor = $rev->get('is_minor_edit'); $authordoesmatch = $author == $rev->get('author'); - + if ($authordoesmatch && (!$isminor || ($includeminor && $isminor))) { $difflink = Button(array('action' => 'diff', 'previous' => 'minor'), @@ -146,7 +144,7 @@ HTML::td(array('align'=> 'right'), $WikiTheme->formatdatetime($rev->get('mtime'))) ); - + $class = $isminor ? 'evenrow' : 'oddrow'; $tr->setAttr('class', $class); $tb->pushContent($tr); @@ -160,17 +158,15 @@ $t->pushContent($th, $tb); } else { - + //search all pages for all edits by this author - + ///////////////////////////////////////////////////////////// - - $t = HTML::table(array('class'=> 'pagelist', - 'style' => 'font-size:smaller')); + + $t = HTML::table(array('class'=> 'pagelist')); $th = HTML::thead(); $tb = HTML::tbody(); - - + $th->pushContent(HTML::tr(HTML::td(_("Page Name")), HTML::td(array('align'=> 'right'), _("Version")), @@ -179,11 +175,11 @@ HTML::td(_("Modified")) )); ///////////////////////////////////////////////////////////// - + $allpages_iter = $dbi->getAllPages($includedeleted); while ($p = $allpages_iter->next()) { ///////////////////////////////////////////////////////////// - + $allrevisions_iter = $p->getAllRevisions(); while ($rev = $allrevisions_iter->next()) { $isminor = $rev->get('is_minor_edit'); @@ -203,29 +199,29 @@ HTML::td(array('align'=> 'right'), $WikiTheme->formatdatetime($rev->get('mtime')), $nbsp) ); - + $class = $isminor ? 'evenrow' : 'oddrow'; $tr->setAttr('class', $class); $tb->pushContent($tr); //$pagelist->addPage($rev->getPage()); } } - + ///////////////////////////////////////////////////////////// - + } - + $captext = fmt($includeminor ? "History of all major and minor modifications for any page edited by %s." : "History of major modifications for any page edited by %s." , WikiLink($author, 'auto')); $t->pushContent(HTML::caption($captext)); $t->pushContent($th, $tb); } - + // if (!$noheader) { // total minor, major edits. if include minoredits was specified // } return $t; - + // if (!$noheader) { // $pagelink = WikiLink($page, 'auto'); // @@ -242,51 +238,9 @@ // // return $pagelist; } - + }; -// $Log: not supported by cvs2svn $ -// Revision 1.5 2004/02/28 21:14:08 rurban -// generally more PHPDOC docs -// see http://xarch.tu-graz.ac.at/home/rurban/phpwiki/xref/ -// fxied WikiUserNew pref handling: empty theme not stored, save only -// changed prefs, sql prefs improved, fixed password update, -// removed REPLACE sql (dangerous) -// moved gettext init after the locale was guessed -// + some minor changes -// -// Revision 1.4 2004/02/17 12:11:36 rurban -// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) -// -// Revision 1.3 2004/01/26 09:18:00 rurban -// * changed stored pref representation as before. -// the array of objects is 1) bigger and 2) -// less portable. If we would import packed pref -// objects and the object definition was changed, PHP would fail. -// This doesn't happen with an simple array of non-default values. -// * use $prefs->retrieve and $prefs->store methods, where retrieve -// understands the interim format of array of objects also. -// * simplified $prefs->get() and fixed $prefs->set() -// * added $user->_userid and class '_WikiUser' portability functions -// * fixed $user object ->_level upgrading, mostly using sessions. -// this fixes yesterdays problems with loosing authorization level. -// * fixed WikiUserNew::checkPass to return the _level -// * fixed WikiUserNew::isSignedIn -// * added explodePageList to class PageList, support sortby arg -// * fixed UserPreferences for WikiUserNew -// * fixed WikiPlugin for empty defaults array -// * UnfoldSubpages: added pagename arg, renamed pages arg, -// removed sort arg, support sortby arg -// -// Revision 1.2 2003/12/08 22:44:58 carstenklapp -// Code cleanup: fixed rcsid -// -// Revision 1.1 2003/12/08 22:43:30 carstenklapp -// New experimental plugin to provide a different kind of -// PageHistory. Functional as-is, but is in need of much cleanup and -// refactoring. Probably very, very slow on wikis with many pages! -// - // For emacs users // Local Variables: // mode: php Modified: trunk/themes/MacOSX/MacOSX.css =================================================================== --- trunk/themes/MacOSX/MacOSX.css 2009-03-24 15:13:25 UTC (rev 6698) +++ trunk/themes/MacOSX/MacOSX.css 2009-03-25 09:14:26 UTC (rev 6699) @@ -411,13 +411,15 @@ /** * PageList output */ +.pagelist { + font-size: smaller; +} .pagelist tr.evenrow { background: #f8f8f8; } .pagelist tr.oddrow { background: #eee; } .pagelist thead td { background: #e8e8e8; text-decoration: none; font-weight: bold; - font-size: smaller; } .pagelist thead td u { text-decoration: none; } /* Yellow highlight for every td of mouseover'd tr in pagelist tbody Modified: trunk/themes/MonoBook/main.css =================================================================== --- trunk/themes/MonoBook/main.css 2009-03-24 15:13:25 UTC (rev 6698) +++ trunk/themes/MonoBook/main.css 2009-03-25 09:14:26 UTC (rev 6699) @@ -1602,12 +1602,13 @@ /** * PhpWiki Tables */ -.pagelist { } +.pagelist { + font-size: smaller; +} .pagelist thead td { background: #e8e8e8; text-decoration: none; font-weight: bold; - font-size: smaller; } .pagelist thead td u { text-decoration: none; } .pagelist tr.evenrow { background: #eee; } Modified: trunk/themes/Sidebar/monobook.css =================================================================== --- trunk/themes/Sidebar/monobook.css 2009-03-24 15:13:25 UTC (rev 6698) +++ trunk/themes/Sidebar/monobook.css 2009-03-25 09:14:26 UTC (rev 6699) @@ -1655,12 +1655,13 @@ /** * PhpWiki Tables */ -.pagelist { } +.pagelist { + font-size: smaller; +} .pagelist thead td { background: #e8e8e8; text-decoration: none; font-weight: bold; - font-size: smaller; } .pagelist thead td u { text-decoration: none; } .pagelist tr.evenrow { background: #eee; } Modified: trunk/themes/blog/Kubrick.css =================================================================== --- trunk/themes/blog/Kubrick.css 2009-03-24 15:13:25 UTC (rev 6698) +++ trunk/themes/blog/Kubrick.css 2009-03-25 09:14:26 UTC (rev 6699) @@ -316,7 +316,7 @@ font-size: 0.71em; } -table.pagelist td { +table.pagelist { font-size: 0.81em; } Modified: trunk/themes/default/phpwiki.css =================================================================== --- trunk/themes/default/phpwiki.css 2009-03-24 15:13:25 UTC (rev 6698) +++ trunk/themes/default/phpwiki.css 2009-03-25 09:14:26 UTC (rev 6699) @@ -209,12 +209,13 @@ */ table, td { font-family: Arial, Helvetica, sans-serif; } caption { font-family: Arial, Helvetica, sans-serif; } -.pagelist { } +.pagelist { + font-size: smaller; +} .pagelist thead td { background: #e8e8e8; text-decoration: none; font-weight: bold; - font-size: smaller; } .pagelist thead td u { text-decoration: none; } .pagelist tr.evenrow { background: #eee; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-31 13:12:24
|
Revision: 6747 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6747&view=rev Author: vargenau Date: 2009-03-31 13:12:03 +0000 (Tue, 31 Mar 2009) Log Message: ----------- Rename "gforge.php" to "g" for shorter URLs Added Paths: ----------- trunk/g Removed Paths: ------------- trunk/gforge.php Copied: trunk/g (from rev 6746, trunk/gforge.php) =================================================================== --- trunk/g (rev 0) +++ trunk/g 2009-03-31 13:12:03 UTC (rev 6747) @@ -0,0 +1,51 @@ +<?php +require_once('pre.php'); +if (!$group_id || !$project) { + exit_error("Invalid Project","Invalid Project"); +} else { + + define('VIRTUAL_PATH', $_SERVER['SCRIPT_NAME'] . '/' . $project->getUnixName()); + define('PATH_INFO_PREFIX', '/' . $project->getUnixName() . '/'); + + define('WIKI_NAME', $project->getUnixName()); + //define('ALLOW_HTTP_AUTH_LOGIN', 1); + //define('ADMIN_USER', ''); + //define('ADMIN_PASSWD', ''); + define('AUTH_SESS_USER', 'user_id'); + define('AUTH_SESS_LEVEL', 2); + $USER_AUTH_ORDER = "Session : PersonalPage"; + $USER_AUTH_POLICY = "stacked"; + + // Override the default configuration for CONSTANTS before index.php + //$LANG='de'; $LC_ALL='de_DE'; + define('THEME', 'gforge'); + //define('WIKI_NAME', "WikiDemo:$LANG:" . THEME); + + // Load the default configuration. + include "index.php"; + + error_log ("PATH_INFO_PREFIX " . PATH_INFO_PREFIX); + + // Override the default configuration for VARIABLES after index.php: + // E.g. Use another DB: + $DBParams['dbtype'] = 'SQL'; + $DBParams['dsn'] = 'pgsql://' . $sys_dbuser . ':' . + $sys_dbpasswd . '@' . $sys_dbhost .'/' . $sys_dbname +. '_wiki'; + $DBParams['prefix'] = $project->getUnixName() ."_"; + + // If the user is logged in, let the Wiki know + if (session_loggedin()){ + // let php do it's session stuff too! + //ini_set('session.save_handler', 'files'); + session_start(); + $_SESSION['user_id'] = user_getname(); + + } else { + // clear out the globals, just in case... + + } + // Start the wiki + include "lib/main.php"; +} +?> \ No newline at end of file Property changes on: trunk/g ___________________________________________________________________ Added: svn:mergeinfo + Deleted: trunk/gforge.php =================================================================== --- trunk/gforge.php 2009-03-31 12:21:31 UTC (rev 6746) +++ trunk/gforge.php 2009-03-31 13:12:03 UTC (rev 6747) @@ -1,51 +0,0 @@ -<?php -require_once('pre.php'); -if (!$group_id || !$project) { - exit_error("Invalid Project","Invalid Project"); -} else { - - define('VIRTUAL_PATH', $_SERVER['SCRIPT_NAME'] . '/' . $project->getUnixName()); - define('PATH_INFO_PREFIX', '/' . $project->getUnixName() . '/'); - - define('WIKI_NAME', $project->getUnixName()); - //define('ALLOW_HTTP_AUTH_LOGIN', 1); - //define('ADMIN_USER', ''); - //define('ADMIN_PASSWD', ''); - define('AUTH_SESS_USER', 'user_id'); - define('AUTH_SESS_LEVEL', 2); - $USER_AUTH_ORDER = "Session : PersonalPage"; - $USER_AUTH_POLICY = "stacked"; - - // Override the default configuration for CONSTANTS before index.php - //$LANG='de'; $LC_ALL='de_DE'; - define('THEME', 'gforge'); - //define('WIKI_NAME', "WikiDemo:$LANG:" . THEME); - - // Load the default configuration. - include "index.php"; - - error_log ("PATH_INFO_PREFIX " . PATH_INFO_PREFIX); - - // Override the default configuration for VARIABLES after index.php: - // E.g. Use another DB: - $DBParams['dbtype'] = 'SQL'; - $DBParams['dsn'] = 'pgsql://' . $sys_dbuser . ':' . - $sys_dbpasswd . '@' . $sys_dbhost .'/' . $sys_dbname -. '_wiki'; - $DBParams['prefix'] = $project->getUnixName() ."_"; - - // If the user is logged in, let the Wiki know - if (session_loggedin()){ - // let php do it's session stuff too! - //ini_set('session.save_handler', 'files'); - session_start(); - $_SESSION['user_id'] = user_getname(); - - } else { - // clear out the globals, just in case... - - } - // Start the wiki - include "lib/main.php"; -} -?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-31 19:08:16
|
Revision: 6754 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6754&view=rev Author: vargenau Date: 2009-03-31 19:08:12 +0000 (Tue, 31 Mar 2009) Log Message: ----------- New CSS class: pagetrail Modified Paths: -------------- trunk/lib/plugin/PageTrail.php trunk/themes/MonoBook/main.css trunk/themes/gforge/gforge.css Modified: trunk/lib/plugin/PageTrail.php =================================================================== --- trunk/lib/plugin/PageTrail.php 2009-03-31 15:35:27 UTC (rev 6753) +++ trunk/lib/plugin/PageTrail.php 2009-03-31 19:08:12 UTC (rev 6754) @@ -82,7 +82,8 @@ $numberlinks = min(count($Pages), $numberlinks); if (! $invisible and $numberlinks) { - $html = HTML::tt(WikiLink($Pages[$numberlinks-1], 'auto')); + $html = HTML::div(array('class' => 'pagetrail')); + $html->pushContent(WikiLink($Pages[$numberlinks-1], 'auto')); for ($i = $numberlinks - 2; $i >= 0; $i--) { if (!empty($Pages[$i])) $html->pushContent(PAGETRAIL_ARROW, Modified: trunk/themes/MonoBook/main.css =================================================================== --- trunk/themes/MonoBook/main.css 2009-03-31 15:35:27 UTC (rev 6753) +++ trunk/themes/MonoBook/main.css 2009-03-31 19:08:12 UTC (rev 6754) @@ -1915,6 +1915,12 @@ border: 1px solid #ffa500; } +/* PageTrail plugin */ +.pagetrail { + background-color: #FFFF99; + padding: 0.2em; +} + /* IncludePage plugin */ .transclusion-title { text-align: right; Modified: trunk/themes/gforge/gforge.css =================================================================== --- trunk/themes/gforge/gforge.css 2009-03-31 15:35:27 UTC (rev 6753) +++ trunk/themes/gforge/gforge.css 2009-03-31 19:08:12 UTC (rev 6754) @@ -451,6 +451,12 @@ list-style-image: none; } +/* PageTrail plugin */ +.pagetrail { + background-color: #FFFF99; + padding: 0.2em; +} + /* IncludePage plugin */ .transclusion-title { text-align: right; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-05-14 10:21:32
|
Revision: 6809 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6809&view=rev Author: vargenau Date: 2009-05-14 10:21:19 +0000 (Thu, 14 May 2009) Log Message: ----------- Remove history Modified Paths: -------------- trunk/ImageTile.php trunk/lib/WysiwygEdit/FCKeditor.php trunk/lib/WysiwygEdit/htmlarea2.php trunk/lib/WysiwygEdit/htmlarea3.php trunk/lib/WysiwygEdit/tinymce.php trunk/lib/WysiwygEdit.php trunk/lib/XmlRpcClient.php trunk/lib/XmlRpcServer.php trunk/lib/difflib.php Modified: trunk/ImageTile.php =================================================================== --- trunk/ImageTile.php 2009-05-14 10:11:35 UTC (rev 6808) +++ trunk/ImageTile.php 2009-05-14 10:21:19 UTC (rev 6809) @@ -141,16 +141,6 @@ exit(); } -/* - $Log: not supported by cvs2svn $ - Revision 1.5 2007/01/04 16:44:18 rurban - mkdir 0775 - - Revision 1.4 2005/10/31 17:03:19 rurban - fix "r" - -*/ - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WysiwygEdit/FCKeditor.php =================================================================== --- trunk/lib/WysiwygEdit/FCKeditor.php 2009-05-14 10:11:35 UTC (rev 6808) +++ trunk/lib/WysiwygEdit/FCKeditor.php 2009-05-14 10:21:19 UTC (rev 6809) @@ -106,15 +106,6 @@ } - -/* - $Log: not supported by cvs2svn $ - Revision 1.1 2005/10/31 16:41:46 rurban - added FCKeditor + spaw - - -*/ - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WysiwygEdit/htmlarea2.php =================================================================== --- trunk/lib/WysiwygEdit/htmlarea2.php 2009-05-14 10:11:35 UTC (rev 6808) +++ trunk/lib/WysiwygEdit/htmlarea2.php 2009-05-14 10:21:19 UTC (rev 6809) @@ -61,14 +61,6 @@ } -/* - $Log: not supported by cvs2svn $ - Revision 1.1 2005/10/30 14:22:15 rurban - refactor WysiwygEdit - - -*/ - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WysiwygEdit/htmlarea3.php =================================================================== --- trunk/lib/WysiwygEdit/htmlarea3.php 2009-05-14 10:11:35 UTC (rev 6808) +++ trunk/lib/WysiwygEdit/htmlarea3.php 2009-05-14 10:21:19 UTC (rev 6809) @@ -107,14 +107,6 @@ } } -/* - $Log: not supported by cvs2svn $ - Revision 1.1 2005/10/30 14:22:15 rurban - refactor WysiwygEdit - - -*/ - // Local Variables: // mode: php // tab-width: 8 @@ -122,4 +114,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WysiwygEdit/tinymce.php =================================================================== --- trunk/lib/WysiwygEdit/tinymce.php 2009-05-14 10:11:35 UTC (rev 6808) +++ trunk/lib/WysiwygEdit/tinymce.php 2009-05-14 10:21:19 UTC (rev 6809) @@ -63,16 +63,6 @@ } } -/* - $Log: not supported by cvs2svn $ - Revision 1.2 2005/10/31 16:41:46 rurban - added FCKeditor + spaw - - Revision 1.1 2005/10/30 14:22:15 rurban - refactor WysiwygEdit - -*/ - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WysiwygEdit.php =================================================================== --- trunk/lib/WysiwygEdit.php 2009-05-14 10:11:35 UTC (rev 6808) +++ trunk/lib/WysiwygEdit.php 2009-05-14 10:21:19 UTC (rev 6809) @@ -132,20 +132,6 @@ } } -/* - $Log: not supported by cvs2svn $ - Revision 1.3 2005/10/31 17:20:40 rurban - fix ConvertBefore - - Revision 1.2 2005/10/31 16:46:13 rurban - move old default transformers to baseclass - - Revision 1.1 2005/10/30 14:22:15 rurban - refactor WysiwygEdit - - -*/ - // Local Variables: // mode: php // tab-width: 8 @@ -153,4 +139,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/XmlRpcClient.php =================================================================== --- trunk/lib/XmlRpcClient.php 2009-05-14 10:11:35 UTC (rev 6808) +++ trunk/lib/XmlRpcClient.php 2009-05-14 10:21:19 UTC (rev 6809) @@ -112,19 +112,6 @@ return $result; } -/* - $Log: not supported by cvs2svn $ - Revision 1.3 2007/01/22 23:42:13 rurban - Back to WIKI_XMLRPC_VERSION 1. Explain why - - Revision 1.2 2007/01/03 21:25:43 rurban - use explicit RPC2 url because of still unresolved dba problem. - - Revision 1.1 2007/01/02 13:21:12 rurban - split client from server - - */ - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/XmlRpcServer.php =================================================================== --- trunk/lib/XmlRpcServer.php 2009-05-14 10:11:35 UTC (rev 6808) +++ trunk/lib/XmlRpcServer.php 2009-05-14 10:21:19 UTC (rev 6809) @@ -966,44 +966,6 @@ } } -/* - $Log: not supported by cvs2svn $ - Revision 1.24 2007/01/22 23:42:13 rurban - Back to WIKI_XMLRPC_VERSION 1. Explain why - - Revision 1.23 2007/01/10 20:47:45 rurban - change int to string because of acdropdown - - Revision 1.22 2007/01/07 18:44:11 rurban - Add summary to getRecentChanges result - - Revision 1.21 2007/01/04 16:42:13 rurban - Use require, not include! - - Revision 1.20 2007/01/03 21:25:52 rurban - add option argument to listRelations. - - Revision 1.19 2007/01/02 13:21:21 rurban - split client from server. added getUploadedFileInfo (for SyncWiki), callPlugin (for WikiFormRich) - - Revision 1.18 2006/05/18 06:10:45 rurban - add xmlrpc listRelations signature - - Revision 1.17 2005/10/31 16:49:31 rurban - fix doc - - Revision 1.16 2005/10/29 14:17:51 rurban - fix doc - - Revision 1.15 2005/10/29 08:57:12 rurban - fix for !register_long_arrays - new: array wiki.listPlugins() - String wiki.getPluginSynopsis(String plugin) - String pingback.ping(String sourceURI, String targetURI) (preliminary) - - - */ - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/difflib.php =================================================================== --- trunk/lib/difflib.php 2009-05-14 10:11:35 UTC (rev 6808) +++ trunk/lib/difflib.php 2009-05-14 10:21:19 UTC (rev 6809) @@ -908,32 +908,6 @@ } } -/** - $Log: not supported by cvs2svn $ - Revision 1.11 2004/11/21 11:59:19 rurban - remove final \n to be ob_cache independent - - Revision 1.10 2004/04/08 01:22:53 rurban - fixed PageChange Notification - - Revision 1.9 2003/11/30 18:43:18 carstenklapp - Fixed careless mistakes in my last optimization commit. - - Revision 1.8 2003/11/30 18:20:34 carstenklapp - Minor code optimization: reduce invariant loops - - Revision 1.7 2003/01/03 22:27:17 carstenklapp - Minor adjustments to diff block markers ("<<<<<<<"). Source reformatting. - - Revision 1.6 2003/01/02 22:51:43 carstenklapp - Specifying a leading diff context size larger than the available - context now returns the available number of lines instead of the - default. (Prevent negative offsets to array_slice() when $nlead > - sizeof($context)). Added BlockDiffFormatter, to be used by future - enhancements to reload / upgrade pgsrc. - - */ - // Local Variables: // mode: php // tab-width: 8 @@ -941,4 +915,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-06-01 09:08:53
|
Revision: 6831 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6831&view=rev Author: vargenau Date: 2009-06-01 09:08:51 +0000 (Mon, 01 Jun 2009) Log Message: ----------- Handle empty table case Modified Paths: -------------- trunk/g trunk/lib/plugin/MediawikiTable.php Modified: trunk/g =================================================================== --- trunk/g 2009-06-01 03:39:10 UTC (rev 6830) +++ trunk/g 2009-06-01 09:08:51 UTC (rev 6831) @@ -57,6 +57,7 @@ $group_name = $project->getUnixName(); $group_public_name = $project->getPublicName(); + $is_external = $project->getIsExternal(); define('VIRTUAL_PATH', '/wiki/g/'.$group_name); define('PAGE_PREFIX', '_g'.$group_id.'_'); @@ -64,8 +65,8 @@ define('THEME', 'gforge'); // For Gforge, we create some specific pages, located in the theme - // except for project "cssforge" - if ($group_name == "cssforge") { + // except for project "help" + if ($group_name == "help") { define('WIKI_PGSRC', 'pgsrc/'); } else { define('WIKI_PGSRC', 'themes/gforge/pgsrc/'); @@ -144,6 +145,9 @@ // Disable public pages define('ENABLE_PAGE_PUBLIC', false); + + // Enable external pages + define('ENABLE_EXTERNAL_PAGES', $is_external); // Let all revisions be stored. Default since 1.3.11 define('MAJOR_MIN_KEEP', 2147483647); Modified: trunk/lib/plugin/MediawikiTable.php =================================================================== --- trunk/lib/plugin/MediawikiTable.php 2009-06-01 03:39:10 UTC (rev 6830) +++ trunk/lib/plugin/MediawikiTable.php 2009-06-01 09:08:51 UTC (rev 6831) @@ -70,7 +70,6 @@ } function run($dbi, $argstr, &$request, $basepage) { - global $WikiTheme; include_once("lib/BlockParser.php"); // MediawikiTablePlugin markup is new. $markup = 2.0; @@ -106,6 +105,10 @@ } } + if (count($lines) == 1) { // empty table, we only have closing "|}" line + return HTML::raw(''); + } + foreach ($lines as $line){ if (substr($line,0,2) == "|}") { // End of table This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-06-01 10:04:41
|
Revision: 6835 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6835&view=rev Author: vargenau Date: 2009-06-01 10:04:38 +0000 (Mon, 01 Jun 2009) Log Message: ----------- Implement external pages (ENABLE_EXTERNAL_PAGES) Modified Paths: -------------- trunk/lib/PagePerm.php trunk/lib/editpage.php trunk/lib/loadsave.php trunk/lib/ziplib.php trunk/themes/gforge/templates/editpage.tmpl trunk/themes/gforge/themeinfo.php Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2009-06-01 10:01:51 UTC (rev 6834) +++ trunk/lib/PagePerm.php 2009-06-01 10:04:38 UTC (rev 6835) @@ -234,6 +234,12 @@ global $request; $page = $request->getPage($pagename); + if (defined('GFORGE') and GFORGE) { + if ($pagename != '.' && isset($request->_user->_is_external) && $request->_user->_is_external && ! $page->get('external')) { + $permcache[$pagename][$access] = 0; + return 0; + } + } // Page not found; check against default permissions if (! $page->exists() ) { $perm = new PagePermission(); Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2009-06-01 10:01:51 UTC (rev 6834) +++ trunk/lib/editpage.php 2009-06-01 10:04:38 UTC (rev 6835) @@ -235,7 +235,7 @@ function updateLock() { $changed = false; - if (!ENABLE_PAGE_PUBLIC) { + if (!ENABLE_PAGE_PUBLIC && !ENABLE_EXTERNAL_PAGES) { if ((bool)$this->page->get('locked') == (bool)$this->locked) return false; // Not changed. } @@ -260,6 +260,17 @@ : _("Page now not-public.")); $changed = true; } + + if (ENABLE_EXTERNAL_PAGES) { + if ((bool)$this->page->get('external') != (bool)$this->external) { + $this->page->set('external', (bool)$this->external); + $this->tokens['LOCK_CHANGED_MSG'] + = ($this->external + ? _("Page now external.") + : _("Page now not-external.")) . " "; + $changed = true; + } + } return $changed; // lock changed. } @@ -676,6 +687,14 @@ 'disabled' => (bool) !$this->user->isAdmin(), 'checked' => (bool) $this->page->get('public'))); } + if (ENABLE_EXTERNAL_PAGES) { + $el['EXTERNAL_CB'] + = HTML::input(array('type' => 'checkbox', + 'name' => 'edit[external]', + 'id' => 'edit-external', + 'disabled' => (bool) !$this->user->isAdmin(), + 'checked' => (bool) $this->page->get('external'))); + } if (ENABLE_WYSIWYG) { if (($this->version == 0) and ($request->getArg('mode') != 'wysiwyg')) { $el['WYSIWYG_B'] = Button(array("action" => "edit", "mode" => "wysiwyg"), "Wysiwyg Editor"); @@ -770,6 +789,8 @@ $this->locked = !empty($posted['locked']); if (ENABLE_PAGE_PUBLIC) $this->public = !empty($posted['public']); + if (ENABLE_EXTERNAL_PAGES) + $this->external = !empty($posted['external']); foreach (array('preview','save','edit_convert', 'keep_old','overwrite','diff','upload') as $o) Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2009-06-01 10:01:51 UTC (rev 6834) +++ trunk/lib/loadsave.php 2009-06-01 10:04:38 UTC (rev 6835) @@ -1182,6 +1182,8 @@ if (!defined('FLAG_PAGE_LOCKED')) define('FLAG_PAGE_LOCKED', 1); + if (!defined('FLAG_PAGE_EXTERNAL')) + define('FLAG_PAGE_EXTERNAL', 1); $pageinfo = array('pagedata' => array(), 'versiondata' => array()); @@ -1208,6 +1210,8 @@ case 'flags': if (($value & FLAG_PAGE_LOCKED) != 0) $pagedata['locked'] = 'yes'; + if (($value & FLAG_PAGE_EXTERNAL) != 0) + $pagedata['external'] = 'yes'; break; case 'owner': case 'created': Modified: trunk/lib/ziplib.php =================================================================== --- trunk/lib/ziplib.php 2009-06-01 10:01:51 UTC (rev 6834) +++ trunk/lib/ziplib.php 2009-06-01 10:04:38 UTC (rev 6835) @@ -603,6 +603,8 @@ $params['created'] = $page->get('mtime'); if ($page->get('locked')) $params['flags'] = 'PAGE_LOCKED'; + if (ENABLE_EXTERNAL_PAGES && $page->get('external')) + $params['flags'] = ($params['flags'] ? $params['flags'] . ',EXTERNAL_PAGE' : 'EXTERNAL_PAGE'); if ($revision->get('author_id')) $params['author_id'] = $revision->get('author_id'); if ($revision->get('markup')) // what is the default? we must use 1 @@ -830,6 +832,8 @@ case 'flags': if (preg_match('/PAGE_LOCKED/', $value)) $pagedata['locked'] = 'yes'; + if (ENABLE_EXTERNAL_PAGES && preg_match('/EXTERNAL_PAGE/', $value)) + $pagedata['external'] = 'yes'; break; case 'owner': case 'created': Modified: trunk/themes/gforge/templates/editpage.tmpl =================================================================== --- trunk/themes/gforge/templates/editpage.tmpl 2009-06-01 10:01:51 UTC (rev 6834) +++ trunk/themes/gforge/templates/editpage.tmpl 2009-06-01 10:04:38 UTC (rev 6835) @@ -66,6 +66,9 @@ <?= $LOCKED_CB ?> <label for="edit-locked" title="<?=_("Make the page read-only?")?>"><?=_("Locked")?></label> <?php if (ENABLE_PAGE_PUBLIC) { ?> <?= $PUBLIC_CB ?> <label for="edit-public" title="<?=_("Make the page public?")?>"><?=_("Public")?></label> + <?php } ?> + <?php if (ENABLE_EXTERNAL_PAGES) { ?> + <?= $EXTERNAL_CB ?> <label for="edit-external" title="<?=_("Make the page external?")?>"><?=_("External")?></label> <?php }} ?> </td> </tr> Modified: trunk/themes/gforge/themeinfo.php =================================================================== --- trunk/themes/gforge/themeinfo.php 2009-06-01 10:01:51 UTC (rev 6834) +++ trunk/themes/gforge/themeinfo.php 2009-06-01 10:04:38 UTC (rev 6835) @@ -6,7 +6,7 @@ class WikiTheme_gforge extends WikiTheme { function header() { - global $HTML, $group_id, $group_public_name, $request, $project; + global $HTML, $group_id, $group_public_name, $request, $project, $Language; $pagename = $request->getArg('pagename'); @@ -28,6 +28,24 @@ 'pagename'=> $pagename, 'group' => $group_id, 'toptab' => 'wiki', 'css' => 'gforge.css" />'."\n".' <base href="'.PHPWIKI_BASE_URL, 'submenu' => $submenu->asXML())); + + // Display a warning banner for internal users when the wiki is opened + // to external users. + if ($project->getIsExternal()) { + $external_user = false; + if (session_loggedin()) { + $user = session_get_user(); + $external_user = $user->getIsExternal(); + } + if (!$external_user) { + $page = $request->getPage(); + if ($page->get('external')) { + $external_msg = 'This page is external.'; + } + echo $HTML->warning_msg($Language->getText('project_admin','external_project') . + (isset($external_msg) ? ' ' . $external_msg : '')); + } + } } function footer() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2009-06-04 11:42:57
|
Revision: 6874 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6874&view=rev Author: rurban Date: 2009-06-04 11:42:21 +0000 (Thu, 04 Jun 2009) Log Message: ----------- Move js to external file Modified Paths: -------------- trunk/lib/plugin/RateIt.php Added Paths: ----------- trunk/themes/wikilens/wikilens.js Modified: trunk/lib/plugin/RateIt.php =================================================================== --- trunk/lib/plugin/RateIt.php 2009-06-04 11:40:42 UTC (rev 6873) +++ trunk/lib/plugin/RateIt.php 2009-06-04 11:42:21 UTC (rev 6874) @@ -1,7 +1,7 @@ <?php // -*-php-*- rcs_id('$Id$'); /* - Copyright 2004,2007 $ThePhpWikiProgrammingTeam + Copyright 2004,2007,2009 $ThePhpWikiProgrammingTeam This file is part of PhpWiki. @@ -21,7 +21,7 @@ */ /** - * RateIt: A recommender system, based on MovieLens and suggest. + * RateIt: A recommender system, based on MovieLens and "suggest". * Store user ratings per pagename. The wikilens theme displays a navbar image bar * with some nice javascript magic and this plugin shows various recommendations. * @@ -106,89 +106,17 @@ $imgPrefix = ''; $img = substr($WikiTheme->_findData("images/RateIt".$imgPrefix."Nk0.png"),0,-7); $urlprefix = WikiURL("",0,1); // TODO: check actions USE_PATH_INFO=false - $js = " -function displayRating(imgId, imgPrefix, ratingvalue, pred, init) { - var ratings = new Array('Not Rated','Awful','Very Poor','Poor','Below Average', - 'Average','Above Average','Good','Very Good','Excellent','Outstanding'); - var cancel = imgId + imgPrefix + 'Cancel'; - var curr_rating = rating[imgId]; - var curr_pred = prediction[imgId]; - var title; - if (init) { // re-initialize titles - title = '"._("Your current rating: ")."'+curr_rating+' '+ratings[curr_rating*2]; - var linebreak = '. '; //
 or 
 within IE only; - if (pred) { - title = '"._("The current prediction: ")."'+ curr_pred+' '+ratings[curr_pred*2]; - } - } - for (i=1; i<=10; i++) { - var imgName = imgId + i; - var imgSrc = '".$img."'; - if (init) { - if (curr_rating) document[cancel].style.display = 'inline'; - document[imgName].title = title; - var j = i/2; - if (ratingvalue > 0) { - if (curr_rating) { - document[imgName].onmouseout = function() { displayRating(imgId,imgPrefix,curr_rating,0,0) }; - } else if (curr_pred) { - document[imgName].onmouseout = function() { displayRating(imgId,imgPrefix,curr_pred,1,0) }; - } - if (curr_rating != ratingvalue) { - document[imgName].title = '"._("Change your rating from "). - "'+curr_rating+' '+ratings[curr_rating*2]+' "._("to")." '+j+' '+ratings[i]; - } - } else { - document[imgName].onmouseout = function() { displayRating(imgId,imgPrefix,0,0,0) }; - document[imgName].title = '"._("Add your rating: ")."'+j+' '+ratings[i]; - } - } - var imgType = 'N'; - if (pred) { - if (init) - document[imgName].title = title+linebreak+'"._("Add your rating: ")."'+ratings[i]; - imgType = 'R'; - } else if (i<=(ratingvalue*2)) { - imgType = 'O'; - } - document[imgName].src = imgSrc + imgPrefix + imgType + ((i%2) ? 'k1' : 'k0') + '.png'; - } -} -function click(imgPrefix,pagename,version,imgId,dimension,newrating) { - var actionImg = imgId+'Action'; - if (newrating == 'X') { - deleteRating(actionImg,pagename,dimension); - rating[imgId] = 0; - displayRating(imgId,imgPrefix,0,0,1); - } else { - submitRating(actionImg,pagename,version,dimension,newrating); - rating[imgId] = newrating; - displayRating(imgId,imgPrefix,newrating,0,1); - } -} -function submitRating(actionImg,page,version,dimension,newrating) { - var myRand = Math.round(Math.random()*(1000000)); - var imgSrc = '".$urlprefix."' + escape(page) + '?version=' + version + '&action=".urlencode(_("RateIt"))."&mode=add&rating=' + newrating + '&dimension=' + dimension + '&nocache=1&nopurge=1&rand=' + myRand" - .(!empty($_GET['start_debug']) ? "+'&start_debug=1'" : '')."; - ".(DEBUG & _DEBUG_REMOTE ? '' : '//')."alert('submitRating(\"'+actionImg+'\", \"'+page+'\", '+version+', '+dimension+', '+newrating+') => '+imgSrc); - document[actionImg].title = 'Thanks!'; - document[actionImg].src = imgSrc; -} -function deleteRating(actionImg, page, dimension) { - var myRand = Math.round(Math.random()*(1000000)); - var imgSrc = '".$urlprefix."' + escape(page) + '?action=".urlencode(_("RateIt"))."&mode=delete&dimension=' + dimension + '&nocache=1&nopurge=1&rand=' + myRand" - .(!empty($_GET['start_debug']) ? "+'&start_debug=1'" : '')."; - ".(DEBUG & _DEBUG_REMOTE ? '' : '//')."alert('deleteRating(\"'+actionImg+'\", \"'+page+'\", '+version+', '+dimension+')'); - document[actionImg].title = 'Rating deleted!'; - document[actionImg].src = imgSrc; -} + $js_globals = "var rateit_imgsrc = '".$img."'; +var rateit_action = '".urlencode("RateIt")."'; "; - return JavaScript($js); + $WikiTheme->addMoreHeaders(JavaScript('', array + ('src' => $WikiTheme->_findData('wikilens.js')))); + return JavaScript($js_globals); } function actionImgPath() { global $WikiTheme; - return $WikiTheme->_findFile("images/RateItAction.png"); + return $WikiTheme->_findFile("images/RateItAction.png", 1); } /** @@ -213,9 +141,19 @@ function head() { // early side-effects (before body) global $WikiTheme; - $WikiTheme->addMoreHeaders(JavaScript("var prediction = new Array;\nvar rating = new Array;")); + $WikiTheme->addMoreHeaders(JavaScript( +"var prediction = new Array; var rating = new Array; +var avg = new Array; var numusers = new Array; +var msg_rating_votes = '"._("Rating: %.1f (%d votes)")."'; +var msg_curr_rating = '"._("Your current rating: ")."'; +var msg_curr_prediction = '"._("Your current prediction: ")."'; +var msg_chg_rating = '"._("Change your rating from ")."'; +var msg_to = '"._(" to ")."'; +var msg_add_rating = '"._("Add your rating: ")."'; +var msg_thanks = '"._("Thanks!")."'; +var msg_rating_deleted = '"._("Rating deleted!")."'; +")); $WikiTheme->addMoreHeaders($this->RatingWidgetJavascript()); - } function displayActionImg ($mode) { @@ -230,7 +168,7 @@ $dbi->touch(); //fake validators without args $request->appendValidators(array('wikiname' => WIKI_NAME, - 'args' => wikihash(''))); + 'args' => wikihash(''))); $request->discardOutput(); $actionImg = $WikiTheme->_path . $this->actionImgPath(); if (file_exists($actionImg)) { @@ -297,14 +235,21 @@ } else { //if (!$user->isSignedIn()) return $this->error(_("You must sign in")); //extract($args); - $this->rating = $rdbi->getRating($this->userid, $this->pagename, $this->dimension); + $this->rating = $rdbi->getRating($this->userid, $this->pagename, $this->dimension); + $this->avg = $rdbi->getAvg($this->pagename, $this->dimension); + $this->numusers = $rdbi->getNumUsers($this->pagename, $this->dimension); + // Update this text on rateit in javascript. needed: NumUsers, Avg $html = HTML::div ( HTML::span(array('class' => 'rateit'), sprintf(_("Rating: %.1f (%d votes)"), - $rdbi->getAvg($this->pagename, $this->dimension), - $rdbi->getNumUsers($this->pagename, $this->dimension)))); + $this->avg, $this->numusers))); if ($args['show'] == 'top') { + if (ENABLE_PAGE_PUBLIC) { + $page = $dbi->getPage($this->pagename); + if ($page->get('public')) + $html->setAttr('class', "public"); + } $html->setAttr('id', "rateit-widget-top"); $html->pushContent(HTML::br(), $this->RatingWidgetHtml($args['pagename'], $args['version'], @@ -407,10 +352,11 @@ $this->pred = $rdbi->getPrediction($this->userid, $pagename, $dimension); } } - for ($i = 1; $i <= 10; $i++) { + + for ($i = 1; $i <= 10; $i++) { $j = $i / 2; - $a1 = HTML::a(array('href' => "javascript:click('$reImgPrefix','$rePagename','$version'," - ."'$reImgId','$dimension','$j')")); + $a1 = HTML::a(array('href' => "javascript:clickRating('$reImgPrefix','$rePagename','$version'," + ."'$reImgId','$dimension',$j)")); $img_attr = array(); $img_attr['src'] = $nk[$i%2]; if ($this->rating) { @@ -440,9 +386,8 @@ } $html->pushContent(HTML::Raw(" ")); - $a0 = HTML::a(array('href' => "javascript:click('$reImgPrefix','$rePagename','$version'," + $a0 = HTML::a(array('href' => "javascript:clickRating('$reImgPrefix','$rePagename','$version'," ."'$reImgId','$dimension','X')")); - $msg = _("Cancel your rating"); $imgprops = array('src' => $WikiTheme->getImageUrl("RateIt".$imgPrefix."Cancel"), 'name' => $imgId.$imgPrefix.'Cancel', @@ -471,15 +416,24 @@ $img_attr['height'] = 15; $img_attr['width'] = 20; $html->pushContent(HTML::img($img_attr)); - // Display your current rating if there is one, or the current prediction or the empty widget + + // Display your current rating if there is one, or the current prediction + // or the empty widget. + $pred = empty($this->pred) ? 0 : $this->pred; + $js = ''; + if (!empty($this->avg)) + $js .= "avg['$reImgId']=$this->avg; numusers['$reImgId']=$this->numusers;\n"; if ($this->rating) { - $html->pushContent(JavaScript("prediction['$reImgId']=0; rating['$reImgId']=$this->rating;\n" + $js .= "rating['$reImgId']=$this->rating; prediction['$reImgId']=$pred;\n"; + $html->pushContent(JavaScript($js ."displayRating('$reImgId','$reImgPrefix',$this->rating,0,1);")); } elseif (!empty($this->pred)) { - $html->pushContent(JavaScript("prediction['$reImgId']=$this->pred; rating['$reImgId']=0;\n" + $js .= "rating['$reImgId']=0; prediction['$reImgId']=$this->pred;\n"; + $html->pushContent(JavaScript($js ."displayRating('$reImgId','$reImgPrefix',$this->pred,1,1);")); } else { - $html->pushContent(JavaScript("prediction['$reImgId']=0; rating['$reImgId']=0;\n" + $js .= "rating['$reImgId']=0; prediction['$reImgId']=0;\n"; + $html->pushContent(JavaScript($js ."displayRating('$reImgId','$reImgPrefix',0,0,1);")); } return $html; Added: trunk/themes/wikilens/wikilens.js =================================================================== --- trunk/themes/wikilens/wikilens.js (rev 0) +++ trunk/themes/wikilens/wikilens.js 2009-06-04 11:42:21 UTC (rev 6874) @@ -0,0 +1,135 @@ +// Wikilens Javascript functions. +// $Id: wikilens.js 6521 2009-02-20 16:20:24Z vargenau $ + +/* Globals: + +var data_path = '/phpwiki-cvs'; +var pagename = 'HomePage'; +var script_url= '/wikicvs'; +var stylepath = data_path+'/themes/MonoBook/'; + +var rating = new Array; var prediction = new Array; +var avg = new Array; var numusers = new Array; +var msg_rating_votes = "Rating: %.1f (%d votes)"; +var msg_curr_rating = "Your current rating: "; +var msg_curr_prediction = "Your current prediction: "; +var msg_chg_rating = "Change your rating from "; +var msg_to = " to "; +var msg_add_rating = "Add your rating: "; +var msg_thanks = "Thanks!"; +var msg_rating_deleted = "Rating deleted!"; + +var rating_imgsrc = '/phpwiki-cvs/themes/MonoBook/images/RateIt'; +var rateit_action = 'RateIt'; +*/ + +function displayRating(imgId, imgPrefix, ratingvalue, pred, init) { + var ratings = new Array('Not Rated','Awful','Very Poor','Poor','Below Average', + 'Average','Above Average','Good','Very Good','Excellent','Outstanding'); + var cancel = imgId + imgPrefix + 'Cancel'; + var curr_rating = rating[imgId]; + var curr_pred = prediction[imgId]; + var title = ''; + if (init) { // re-initialize titles + title = msg_curr_rating+curr_rating+' '+ratings[curr_rating*2]; + var linebreak = '. '; //
 or 
 within IE only; + if (pred) { + title = title+' '+msg_curr_prediction+ curr_pred+' '+ratings[curr_pred*2]; + } + } + for (i=1; i<=10; i++) { + var imgName = imgId + i; + var imgSrc = rateit_imgsrc; + if (init) { + if (curr_rating) document[cancel].style.display = 'inline'; + document[imgName].title = title; + var j = i/2; + if (ratingvalue > 0) { + if (curr_rating) { + document[imgName].onmouseout = function() { displayRating(imgId,imgPrefix,curr_rating,0,0) }; + } else if (curr_pred) { + document[imgName].onmouseout = function() { displayRating(imgId,imgPrefix,curr_pred,1,0) }; + } + if (curr_rating != ratingvalue) { + document[imgName].title = msg_chg_rating+curr_rating+' '+ratings[curr_rating*2]+msg_to+j+' '+ratings[i]; + } + } else { + document[imgName].onmouseout = function() { displayRating(imgId,imgPrefix,0,0,0) }; + document[imgName].title = msg_add_rating+j+' '+ratings[i]; + } + } + var imgType = 'N'; + if (pred) { + if (init) + document[imgName].title = title+linebreak+msg_add_rating+ratings[i]; + imgType = 'R'; + } else if (i<=(ratingvalue*2)) { + imgType = 'O'; + } + document[imgName].src = imgSrc + imgPrefix + imgType + ((i%2) ? 'k1' : 'k0') + '.png'; + } +} +function sprintfRating(s, num, count) { + var num1 = num.toString().replace(/\.(\d).*/, '.$1'); + return s.replace(/\%.1f/, num1).replace(/\%d/, count); +} +function clickRating(imgPrefix,pagename,version,imgId,dimension,newrating) { + var actionImg = imgId+'Action'; + var top = document.getElementById('rateit-widget-top'); + var nusers = numusers[imgId]; + var old_rating = rating[imgId]; + if (newrating == 'X') { + deleteRating(actionImg,pagename,dimension); + displayRating(imgId,imgPrefix,0,0,1); + if (top && nusers) { + var sum1 = avg[imgId] * nusers; + var new_avg; + if (nusers > 1) + new_avg = (sum1 - old_rating) / (nusers-1); + else + new_avg = 0.0; + if (new_avg.toString() != "NaN") { + top.childNodes[0].innerHTML = sprintfRating(msg_rating_votes, new_avg, nusers-1); + avg[imgId] = new_avg; + numusers[imgId]--; + } + } + rating[imgId] = 0; + } else { + submitRating(actionImg,pagename,version,dimension,newrating); + displayRating(imgId,imgPrefix,newrating,0,1); + if (top && nusers) { + var new_avg; + var sum1 = avg[imgId] * nusers; + if (old_rating && (old_rating > 0)) { + new_avg = (sum1 + newrating - old_rating) / nusers; + } else { + new_avg = (sum1 + newrating) / (nusers + 1); + avg[imgId] = new_avg; + numusers[imgId]++; + } + if ((rating != rating[imgId]) && (new_avg.toString() != "NaN")) { + top.childNodes[0].innerHTML = sprintfRating(msg_rating_votes, new_avg, numusers[imgId]); + } + } else if (top) { + top.childNodes[0].innerHTML = sprintfRating(msg_rating_votes, newrating, 1); + avg[imgId] = newrating; + numusers[imgId] = 1; + } + rating[imgId] = newrating; + } +} +function submitRating(actionImg,page,version,dimension,newrating) { + var myRand = Math.round(Math.random()*(1000000)); + var imgSrc = WikiURL(page) + 'version=' + version + '&action=' + rateit_action + '+&mode=add&rating=' + newrating + '&dimension=' + dimension + '&nocache=1&nopurge=1&rand=' + myRand; + //alert('submitRating("'+actionImg+'", "'+page+'", '+version+', '+dimension+', '+newrating+') => '+imgSrc); + document[actionImg].title = msg_thanks; + document[actionImg].src = imgSrc; +} +function deleteRating(actionImg, page, dimension) { + var myRand = Math.round(Math.random()*(1000000)); + var imgSrc = WikiURL(page) + 'action=' + rateit_action + '&mode=delete&dimension=' + dimension + '&nocache=1&nopurge=1&rand=' + myRand; + //alert('deleteRating("'+actionImg+'", "'+page+'", '+version+', '+dimension+')'); + document[actionImg].title = msg_rating_deleted; + document[actionImg].src = imgSrc; +} Property changes on: trunk/themes/wikilens/wikilens.js ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-06-04 13:01:16
|
Revision: 6888 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6888&view=rev Author: vargenau Date: 2009-06-04 13:01:12 +0000 (Thu, 04 Jun 2009) Log Message: ----------- svn propdel svn:executable Property Changed: ---------------- trunk/admin/wiki2public.php trunk/lib/pear/Cache/Container/db.php trunk/lib/pear/Cache/Container/trifile.php trunk/lib/pear/Cache/Graphics.php trunk/lib/pear/DB/dbase.php trunk/lib/pear/DB/mysqli.php trunk/tests/CompatInfo.php trunk/tests/unit/pcre-crash.php trunk/themes/Sidebar/hyperapplet.php trunk/themes/Sidebar/hyperwiki.php Property changes on: trunk/admin/wiki2public.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/lib/pear/Cache/Container/db.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/lib/pear/Cache/Container/trifile.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/lib/pear/Cache/Graphics.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/lib/pear/DB/dbase.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/lib/pear/DB/mysqli.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/tests/CompatInfo.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/tests/unit/pcre-crash.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/themes/Sidebar/hyperapplet.php ___________________________________________________________________ Deleted: svn:executable - * Property changes on: trunk/themes/Sidebar/hyperwiki.php ___________________________________________________________________ Deleted: svn:executable - * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2009-06-04 13:29:28
|
Revision: 6889 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6889&view=rev Author: rurban Date: 2009-06-04 13:29:25 +0000 (Thu, 04 Jun 2009) Log Message: ----------- DynamicIncludePage and AJAX support - we need a DOCTYPE for unescaped entities without !CDATA[] - MSIE still has issues with those Modified Paths: -------------- trunk/lib/display.php Added Paths: ----------- trunk/lib/plugin/DynamicIncludePage.php trunk/themes/default/ajax.js Modified: trunk/lib/display.php =================================================================== --- trunk/lib/display.php 2009-06-04 13:01:12 UTC (rev 6888) +++ trunk/lib/display.php 2009-06-04 13:29:25 UTC (rev 6889) @@ -208,12 +208,14 @@ $format = $request->getArg('format'); if ($format == 'xml') { // fast ajax: include page content asynchronously global $charset; - //header("Content-Type: application/xhtml+xml; charset=$charset"); header("Content-Type: text/xml"); + echo "<","?xml version=\"1.0\" encoding=\"$charset\"?", ">\n"; + // DOCTYPE html needed to allow unencoded entities like without !CDATA[] + echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'; if ($page->exists()) { header("Last-Modified: " . Rfc1123DateTime($revision->get('mtime'))); $request->cacheControl(); - echo "<","?xml version=\"1.0\" encoding=\"$charset\"?", ">\n"; $page_content = $revision->getTransformedContent(); $page_content->printXML(); $request->finish(); Added: trunk/lib/plugin/DynamicIncludePage.php =================================================================== --- trunk/lib/plugin/DynamicIncludePage.php (rev 0) +++ trunk/lib/plugin/DynamicIncludePage.php 2009-06-04 13:29:25 UTC (rev 6889) @@ -0,0 +1,109 @@ +<?php // -*-php-*- +rcs_id('$Id: DynamicIncludePage.php 6547 2009-02-24 15:42:01Z vargenau $'); +/* + Copyright 2009 $ThePhpWikiProgrammingTeam + + This file is 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 + */ + +/** + * DynamicIncludePage - Include wikipage asynchronously. Icon to show/hide. + * Usage: <?plugin DynamicIncludePage page=OtherPage state=true ...?> + * Author: Reini Urban + */ + +require_once('lib/plugin/IncludePage.php'); + +class WikiPlugin_DynamicIncludePage +extends WikiPlugin_IncludePage +{ + function getName() { + return _("DynamicIncludePage"); + } + + function getDescription() { + return _("Dynamicly include text from another wiki page."); + } + + function getVersion() { + return preg_replace("/[Revision: $]/", '', + "\$Revision: 6547 $"); + } + + function getDefaultArguments() { + return array_merge + (WikiPlugin_IncludePage::getDefaultArguments(), + array( + 'state' => false, // initial state: false <=> [+], true <=> [-] + )); + } + + function run($dbi, $argstr, &$request, $basepage) { + global $WikiTheme; + $args = $this->getArgs($argstr, $request, false); + $page =& $args['page']; + if (ENABLE_AJAX) { + if ($args['state']) + $html = WikiPlugin_IncludePage::run($dbi, $argstr, $request, $basepage); + else + $html = HTML(HTML::p(array('class' => 'transclusion-title'), + fmt(" %s :", WikiLink($page))), + HTML::div(array('class' => 'transclusion'), '')); + $ajaxuri = WikiURL($page, array('format' => 'xml')); + } else { + $html = WikiPlugin_IncludePage::run($dbi, $argstr, $request, $basepage); + } + $header = $html->_content[0]; + $body = $html->_content[1]; + $id = 'DynInc-'.MangleXmlIdentifier($page); + $body->setAttr('id', $id.'-body'); + $png = $WikiTheme->_findData('images/folderArrow'. + ($args['state'] ? 'Open' : 'Closed'). + '.png'); + $icon = HTML::img(array('id' => $id.'-img', + 'src' => $png, + 'onClick' => ENABLE_AJAX + ? "showHideAsync('".$ajaxuri."','$id')" + : "showHideFolder('$id')", + 'border' => 0, + 'title' => _("Click to hide/show"))); + $header = HTML::p(array('class' => 'transclusion-title', + 'style' => "text-decoration: none;"), + $icon, + fmt(" %s :", WikiLink($page))); + if ($args['state']) { // show base + $body->setAttr('style', 'display:block'); + return HTML($header, $body); + } else { // do not show base + $body->setAttr('style', 'display:none'); + if (ENABLE_AJAX) + return HTML($header, $body); // async (load in background and insert) + else + return HTML($header, $body); // sync (load but display:none) + } + } +}; + +// For emacs users +// Local Variables: +// mode: php +// tab-width: 8 +// c-basic-offset: 4 +// c-hanging-comment-ender-p: nil +// indent-tabs-mode: nil +// End: +?> Added: trunk/themes/default/ajax.js =================================================================== --- trunk/themes/default/ajax.js (rev 0) +++ trunk/themes/default/ajax.js 2009-06-04 13:29:25 UTC (rev 6889) @@ -0,0 +1,120 @@ +// Ajax Javascript support functions, based on moacdropdown +// $Id: ajax.js 6521 2009-02-20 16:20:24Z vargenau $ + +function showHide( id ) { + this.init( id ) +} + +showHide.prototype.onXmlHttpLoad = function( ) { + if( this.hXMLHttp.readyState == 4 ) { + var hError = this.hXMLHttp.parseError; + var img = document.getElementById(this.id+'-img'); + if( hError && hError.errorCode != 0 ) { + alert( hError.reason ); + } else { + // insert external, same-domain XML tree into id-body as HTML + var body = document.getElementById(this.id+'-body'); + var newbody = this.hXMLHttp.responseXML; + if (newbody != null) { + // msie: newbody = document, newbody.firstChild.nodeName = xml + if (newbody.firstChild && newbody.firstChild.nodeName == 'xml') + newbody = newbody.firstChild.nextSibling.nextSibling; + // gecko + chrome: skip firstChild = DOCTYPE html + if (newbody.firstChild && newbody.firstChild.nodeName == 'html') + newbody = newbody.childNodes[1]; + if (newbody == null) { + alert("showHideDone "+this.id+"\nno xml children from "+this.hXMLHttp.responseText); + } + var hContainer = CreateHtmlFromXml(newbody); + hContainer.className = 'wikitext'; + body.appendChild( hContainer ); + body.style.display = 'block'; + } else { + alert("showHideDone "+this.id+"\nerror no xml from "+this.hXMLHttp.responseText); + } + } + if (img) + img.src = stylepath + 'images/folderArrowOpen.png'; + } +} + +showHide.prototype.init = function (id) { + this.id = id; + this.hXMLHttp = XmlHttp.create() + var hAC = this + this.hXMLHttp.onreadystatechange = function() { hAC.onXmlHttpLoad() } +} + +var cShowHide; + +function CreateHtmlFromXml (xml) { + if (xml == null) { + return document.createElement('xml'); + } + var xmltype = xml.nodeName; + var html; + if (xmltype == '#text') { + html = document.createTextNode( xml.nodeValue ); + html.nodeValue = xml.nodeValue; + if (xml.attributes && (xml.attributes != null)) + for (var i=0; i < xml.attributes.length; i++) { + html.setAttribute( xml.attributes[i].name, xml.attributes[i].value ); + } + } else { + html = document.createElement( xmltype ); + if (xml.nodeValue) + html.nodeValue = xml.nodeValue; + if (xml.attributes && (xml.attributes != null)) + for (var i=0; i < xml.attributes.length; i++) { + html.setAttribute( xml.attributes[i].name, xml.attributes[i].value ); + } + if (xml.hasChildNodes()) + for (var i=0; i < xml.childNodes.length; i++) { + html.appendChild( CreateHtmlFromXml(xml.childNodes[i]) ); + } + } + return html; +} + +// if body is empty, load page in background into id+"-body" and show/hide id +function showHideAsync(uri, id) { + var body = document.getElementById(id+'-body'); + if (!body) { + alert("Error: id="+id+'-body'+" missing."); + return; + } + if (body.hasChildNodes()) { + //alert("showHideAsync "+uri+" "+id+"\nalready loaded"); + showHideFolder(id); + } + else { + //alert("showHideAsync "+uri+" "+id+"\nloading..."); + var img = document.getElementById(id+'-img'); + if (img) + img.src = stylepath + 'images/folderArrowLoading.gif'; + cShowHide = new showHide(id) + cShowHide.hXMLHttp.open( 'GET', uri, true ) + cShowHide.hXMLHttp.send( null ) + } +} + +function showHideDone(id) { + // insert tree into id-body + var body = document.getElementById(id+'-body'); + body.parentNode.replaceChild(cShowHide.hXMLHttp.responseText, body); + alert("showHideDone "+id+"\ngot "+cShowHide.hXMLHttp.responseText); + showHideFolder(id); +} + +// hide after 0.4 secs +function showHideDelayed(id) { + window.setTimeout("doshowHide("+id+")",400); +} + +function doshowHide(id) { + document.getElementById(id).style.display = "none"; + var highlight = document.getElementById("LSHighlight"); + if (highlight) { + highlight.removeAttribute("id"); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2009-06-04 14:53:26
|
Revision: 6893 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6893&view=rev Author: rurban Date: 2009-06-04 13:39:19 +0000 (Thu, 04 Jun 2009) Log Message: ----------- propset svn:keywords Id Modified Paths: -------------- trunk/lib/plugin/DynamicIncludePage.php trunk/themes/default/ajax.js Property Changed: ---------------- trunk/lib/plugin/DynamicIncludePage.php trunk/themes/default/ajax.js Modified: trunk/lib/plugin/DynamicIncludePage.php =================================================================== --- trunk/lib/plugin/DynamicIncludePage.php 2009-06-04 13:38:17 UTC (rev 6892) +++ trunk/lib/plugin/DynamicIncludePage.php 2009-06-04 13:39:19 UTC (rev 6893) @@ -1,5 +1,5 @@ <?php // -*-php-*- -rcs_id('$Id: DynamicIncludePage.php 6547 2009-02-24 15:42:01Z vargenau $'); +rcs_id('$Id$'); /* Copyright 2009 $ThePhpWikiProgrammingTeam Property changes on: trunk/lib/plugin/DynamicIncludePage.php ___________________________________________________________________ Modified: svn:keywords - themes/default/ajax.js + Id Modified: trunk/themes/default/ajax.js =================================================================== --- trunk/themes/default/ajax.js 2009-06-04 13:38:17 UTC (rev 6892) +++ trunk/themes/default/ajax.js 2009-06-04 13:39:19 UTC (rev 6893) @@ -1,6 +1,6 @@ // Ajax Javascript support functions, based on moacdropdown XmlHttp // Written from scratch by Reini Urban -// $Id: ajax.js 6521 2009-02-20 16:20:24Z vargenau $ +// $Id$ function showHide( id ) { this.init( id ) Property changes on: trunk/themes/default/ajax.js ___________________________________________________________________ Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-06-04 16:44:49
|
Revision: 6896 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6896&view=rev Author: vargenau Date: 2009-06-04 16:44:46 +0000 (Thu, 04 Jun 2009) Log Message: ----------- Do not hardcode "The PhpWiki programming team", use ADMIN_USER instead Modified Paths: -------------- trunk/g trunk/lib/PageList.php trunk/lib/WikiDB.php trunk/lib/WikiUserNew.php trunk/lib/loadsave.php Modified: trunk/g =================================================================== --- trunk/g 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/g 2009-06-04 16:44:46 UTC (rev 6896) @@ -99,8 +99,7 @@ // Disable VACUUM (they are performed every night) define('DATABASE_OPTIMISE_FREQUENCY', 0); - // It is not used but it is required by libs. - define('ADMIN_USER', 'The PhpWiki programming team'); + define('ADMIN_USER', 'ACOS Forge Administrator'); define('ADMIN_PASSWD', 'xxx'); // Allow ".jpeg" as extension Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/lib/PageList.php 2009-06-04 16:44:46 UTC (rev 6896) @@ -1111,7 +1111,7 @@ return $allPages; } - // UserPages are pages NOT created by "The PhpWiki programming team" + // UserPages are pages NOT created by ADMIN_USER function allUserPages($include_empty=false, $sortby='', $limit='', $exclude='') { $dbi = $GLOBALS['request']->getDbh(); @@ -1120,7 +1120,7 @@ while ($pagehandle = $allPagehandles->next()) { $name = $pagehandle->getName(); $creator = $pagehandle->getCreator(); - if ($creator !== _("The PhpWiki programming team")) { + if ($creator !== ADMIN_USER) { $allPages[] = $name; } } Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/lib/WikiDB.php 2009-06-04 16:44:46 UTC (rev 6896) @@ -1400,7 +1400,7 @@ // May be empty. Either the stored owner (/Chown), or the first authorized author function getOwner() { if ($owner = $this->get('owner')) - return ($owner == _("The PhpWiki programming team")) ? ADMIN_USER : $owner; + return $owner; // check all revisions forwards for the first author_id $backend = &$this->_wikidb->_backend; $pagename = &$this->_pagename; @@ -1408,7 +1408,7 @@ for ($v=1; $v <= $latestversion; $v++) { $rev = $this->getRevision($v,false); if ($rev and $owner = $rev->get('author_id')) { - return ($owner == _("The PhpWiki programming team")) ? ADMIN_USER : $owner; + return $owner; } } return ''; Modified: trunk/lib/WikiUserNew.php =================================================================== --- trunk/lib/WikiUserNew.php 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/lib/WikiUserNew.php 2009-06-04 16:44:46 UTC (rev 6896) @@ -426,7 +426,7 @@ // function createHomePage() { global $request; - $versiondata = array('author' => _("The PhpWiki programming team")); + $versiondata = array('author' => ADMIN_USER); $request->_dbi->save(_("Automatically created user homepage to be able to store UserPreferences."). "\n{{Template/UserPage}}", 1, $versiondata); Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/lib/loadsave.php 2009-06-04 16:44:46 UTC (rev 6896) @@ -974,7 +974,7 @@ fmt("has edit conflicts - overwriting anyway")); $skip = false; if (substr_count($source, 'pgsrc')) { - $versiondata['author'] = _("The PhpWiki programming team"); + $versiondata['author'] = ADMIN_USER; // but leave authorid as userid who loaded the file } } @@ -1497,17 +1497,16 @@ // This is a bogo-bogo-login: Login without // saving login information in session state. // This avoids logging in the unsuspecting - // visitor as "The PhpWiki programming team". + // visitor as ADMIN_USER // // This really needs to be cleaned up... // (I'm working on it.) $real_user = $request->_user; if (ENABLE_USER_NEW) - $request->_user = new _BogoUser(_("The PhpWiki programming team")); + $request->_user = new _BogoUser(ADMIN_USER); else - $request->_user = new WikiUser($request, _("The PhpWiki programming team"), - WIKIAUTH_BOGO); + $request->_user = new WikiUser($request, ADMIN_USER, WIKIAUTH_BOGO); StartLoadDump($request, _("Loading up virgin wiki")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-06-04 17:08:36
|
Revision: 6898 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6898&view=rev Author: vargenau Date: 2009-06-04 17:08:33 +0000 (Thu, 04 Jun 2009) Log Message: ----------- Two new preferences: 1) get major modifications only; 2) do not get my own modifications Modified Paths: -------------- trunk/lib/MailNotify.php trunk/lib/WikiUserNew.php trunk/themes/default/templates/userprefs.tmpl Modified: trunk/lib/MailNotify.php =================================================================== --- trunk/lib/MailNotify.php 2009-06-04 16:49:55 UTC (rev 6897) +++ trunk/lib/MailNotify.php 2009-06-04 17:08:33 UTC (rev 6898) @@ -111,7 +111,37 @@ $emails = array(); $userids = array(); foreach ($notify as $page => $users) { if (glob_match($page, $this->pagename)) { + + global $request; + $curuser = $request->getUser(); + $curusername = $curuser->UserName(); + $curuserprefs = $curuser->getPreferences(); + $curuserprefsemail = $curuserprefs->get('email'); + $ownModifications = $curuserprefs->get('ownModifications'); + $majorModificationsOnly = $curuserprefs->get('majorModificationsOnly'); + foreach ($users as $userid => $user) { + + $usermail = $user['email']; + + if (($usermail == $curuserprefsemail) + and ($ownModifications)) { + // It's my own modification + // and I do not want to receive it + continue; + } + + if ($majorModificationsOnly) { + $backend = &$request->_dbi->_backend; + $version = $backend->get_latest_version($this->pagename); + $versiondata = $backend->get_versiondata($this->pagename, $version, true); + if ($versiondata['is_minor_edit']) { + // It's a minor modification + // and I do not want to receive it + continue; + } + } + if (!$user) { // handle the case for ModeratePage: // no prefs, just userid's. $emails[] = $this->userEmail($userid, false); Modified: trunk/lib/WikiUserNew.php =================================================================== --- trunk/lib/WikiUserNew.php 2009-06-04 16:49:55 UTC (rev 6897) +++ trunk/lib/WikiUserNew.php 2009-06-04 17:08:33 UTC (rev 6898) @@ -1941,6 +1941,8 @@ 'timeOffset' => new _UserPreference_numeric(TIMEOFFSET_DEFAULT_HOURS, TIMEOFFSET_MIN_HOURS, TIMEOFFSET_MAX_HOURS), + 'ownModifications' => new _UserPreference_bool(), + 'majorModificationsOnly' => new _UserPreference_bool(), 'relativeDates' => new _UserPreference_bool(), 'googleLink' => new _UserPreference_bool(), // 1.3.10 'doubleClickEdit' => new _UserPreference_bool(), // 1.3.11 Modified: trunk/themes/default/templates/userprefs.tmpl =================================================================== --- trunk/themes/default/templates/userprefs.tmpl 2009-06-04 16:49:55 UTC (rev 6897) +++ trunk/themes/default/templates/userprefs.tmpl 2009-06-04 17:08:33 UTC (rev 6898) @@ -29,6 +29,14 @@ else $timeOffsetInput = $pref->get('timeOffset'); +$OwnModificationsCB = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[ownModifications]', + 'value' => '1', + 'checked' => (bool) $pref->get('ownModifications'))); +$MajorModificationsOnlyCB = HTML::input(array('type' => 'checkbox', + 'name' => 'pref[majorModificationsOnly]', + 'value' => '1', + 'checked' => (bool) $pref->get('majorModificationsOnly'))); $RelativeDatesCB = HTML::input(array('type' => 'checkbox', 'name' => 'pref[relativeDates]', 'value' => '1', @@ -169,6 +177,31 @@ <td><?=$pref->get('notifyPages')?></td><td></td> <?php } ?> </tr> + + <tr> + <td> + <p><?=_("Do not send my own modifications:")?></p> + </td> + <td> + <p><?= $OwnModificationsCB ?></p> + </td> + <td> + <p class="hint"><?=_("Check if you do not want to be notified of your own modifications.")?></p> + </td> + </tr> + + <tr> + <td> + <p><?=_("Do not send minor modifications:")?></p> + </td> + <td> + <p><?= $MajorModificationsOnlyCB ?></p> + </td> + <td> + <p class="hint"><?=_("Check if you do not want to be notified of minor modifications.")?></p> + </td> + </tr> + <?php } ?> <tr><td colspan="3"><h2><?=_("Appearance")?></h2></td></tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-06-12 14:14:58
|
Revision: 6927 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6927&view=rev Author: vargenau Date: 2009-06-12 13:37:14 +0000 (Fri, 12 Jun 2009) Log Message: ----------- Make WatchPage work for Gforge Modified Paths: -------------- trunk/lib/IniConfig.php trunk/lib/plugin/WatchPage.php trunk/themes/gforge/templates/actionbar.tmpl Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2009-06-12 12:10:12 UTC (rev 6926) +++ trunk/lib/IniConfig.php 2009-06-12 13:37:14 UTC (rev 6927) @@ -622,7 +622,7 @@ .'SearchHighlight:SemanticRelations:SemanticSearch:SystemInfo:' .'TitleSearch:' .'UpLoad:UserPreferences:' - .'WantedPages:WhoIsOnline:WikiAdminSelect:WikiBlog:' + .'WantedPages:WatchPage:WhoIsOnline:WikiAdminSelect:WikiBlog:' // plus some derivations .'AllPagesCreatedByMe:AllPagesLastEditedByMe:AllPagesOwnedByMe:AllUserPages:' .'FullRecentChanges:' @@ -654,7 +654,6 @@ $AllActionPages[] = 'RateIt'; // RateIt works only in wikilens derived themes $AllActionPages[] = 'TranslateText'; $AllActionPages[] = 'UriResolver'; - $AllActionPages[] = 'WatchPage'; } if (defined('GFORGE') and GFORGE) { if (defined('ENABLE_EXTERNAL_PAGES') and ENABLE_EXTERNAL_PAGES) { Modified: trunk/lib/plugin/WatchPage.php =================================================================== --- trunk/lib/plugin/WatchPage.php 2009-06-12 12:10:12 UTC (rev 6926) +++ trunk/lib/plugin/WatchPage.php 2009-06-12 13:37:14 UTC (rev 6927) @@ -150,9 +150,9 @@ } elseif ($add and $request->getArg('verify')) { // this is not executed so far. // add page to watchlist, verified - $pref = &$request->_prefs; - $pref->set('notifyPages', $this->addpagelist($page, $pagelist)); - $user->setPreferences($pref); + $rp = $user->getPreferences(); + $rp->set('notifyPages', $this->addpagelist($page, $pagelist)); + $user->setPreferences($rp); $request->_setUser($user); $request->setArg("verify",false); $request->setArg("add",false); Modified: trunk/themes/gforge/templates/actionbar.tmpl =================================================================== --- trunk/themes/gforge/templates/actionbar.tmpl 2009-06-12 12:10:12 UTC (rev 6926) +++ trunk/themes/gforge/templates/actionbar.tmpl 2009-06-12 13:37:14 UTC (rev 6927) @@ -120,6 +120,9 @@ <td class="spacer"> </td> <?php } ?> + <td class="spacer"> </td> + <td><?= Button("WatchPage", _("Watch Page")) ?></td> + <?php if ((DEBUG and $request->getArg('action') == 'browse') || $user->isAdmin()) { ?> <!-- Buttons really only for debugging --> <?php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-06-19 11:19:26
|
Revision: 6942 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6942&view=rev Author: vargenau Date: 2009-06-19 11:19:19 +0000 (Fri, 19 Jun 2009) Log Message: ----------- Make sortable tables work again Modified Paths: -------------- trunk/lib/WikiTheme.php trunk/themes/Sidebar/wikibits.js trunk/themes/default/wikicommon.js Added Paths: ----------- trunk/themes/default/sortable.js Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2009-06-17 19:02:07 UTC (rev 6941) +++ trunk/lib/WikiTheme.php 2009-06-19 11:19:19 UTC (rev 6942) @@ -223,7 +223,7 @@ return; } $this->addMoreHeaders(JavaScript('',array('src' => $this->_findData("wikicommon.js")))); - //$this->addMoreHeaders(JavaScript('',array('src' => $this->_findData("sortable.js")))); + $this->addMoreHeaders(JavaScript('',array('src' => $this->_findData("sortable.js")))); // by pixels if ((is_object($GLOBALS['request']) // guard against unittests and $GLOBALS['request']->getPref('doubleClickEdit')) Modified: trunk/themes/Sidebar/wikibits.js =================================================================== --- trunk/themes/Sidebar/wikibits.js 2009-06-17 19:02:07 UTC (rev 6941) +++ trunk/themes/Sidebar/wikibits.js 2009-06-19 11:19:19 UTC (rev 6942) @@ -979,144 +979,6 @@ } } -/* - * Table sorting script by Joost de Valk, check it out at http://www.joostdevalk.nl/code/sortable-table/. - * Based on a script from http://www.kryogenix.org/code/browser/sorttable/. - * Distributed under the MIT license: http://www.kryogenix.org/code/browser/licence.html . - * - * Copyright (c) 1997-2006 Stuart Langridge, Joost de Valk. - * - * @todo don't break on colspans/rowspans (bug 8028) - * @todo language-specific digit grouping/decimals (bug 8063) - * @todo support all accepted date formats (bug 8226) - */ - -var ts_image_path = stylepath+"images/"; -var ts_image_up = "sort_up.gif"; -var ts_image_down = "sort_down.gif"; -var ts_image_none = "sort_none.gif"; -var wgContentLanguage = "en"; -var ts_europeandate = true; -var ts_alternate_row_colors = true; -var SORT_COLUMN_INDEX; - -function sortables_init() { - var idnum = 0; - // Find all tables with class sortable and make them sortable - var tables = getElementsByClassName(document, "table", "sortable"); - for (var ti = 0; ti < tables.length ; ti++) { - if (!tables[ti].id) { - tables[ti].setAttribute('id','sortable_table_id_'+idnum); - ++idnum; - } - ts_makeSortable(tables[ti]); - } -} - -function ts_makeSortable(table) { - var firstRow; - if (table.rows && table.rows.length > 0) { - if (table.tHead && table.tHead.rows.length > 0) { - firstRow = table.tHead.rows[table.tHead.rows.length-1]; - } else { - firstRow = table.rows[0]; - } - } - if (!firstRow) return; - - // We have a first row: assume it's the header, and make its contents clickable links - for (var i = 0; i < firstRow.cells.length; i++) { - var cell = firstRow.cells[i]; - if ((" "+cell.className+" ").indexOf(" unsortable ") == -1) { - cell.innerHTML += ' <a href="#" class="sortheader" onclick="ts_resortTable(this);return false;"><span class="sortarrow"><img src="'+ ts_image_path + ts_image_none + '" alt="↓"/></span></a>'; - } - } - if (ts_alternate_row_colors) { - ts_alternate(table); - } -} - -function ts_getInnerText(el) { - if (typeof el == "string") return el; - if (typeof el == "undefined") { return el }; - if (el.innerText) return el.innerText; // Not needed but it is faster - var str = ""; - - var cs = el.childNodes; - var l = cs.length; - for (var i = 0; i < l; i++) { - switch (cs[i].nodeType) { - case 1: //ELEMENT_NODE - str += ts_getInnerText(cs[i]); - break; - case 3: //TEXT_NODE - str += cs[i].nodeValue; - break; - } - } - return str; -} - -function ts_parseFloat(num) { - if (!num) return 0; - num = parseFloat(num.replace(/,/, "")); - return (isNaN(num) ? 0 : num); -} - -function ts_sort_date(a,b) { - var aa = ts_dateToSortKey(a[1]); - var bb = ts_dateToSortKey(b[1]); - return (aa < bb ? -1 : aa > bb ? 1 : a[2] - b[2]); -} - -function ts_sort_currency(a,b) { - var aa = ts_parseFloat(a[1].replace(/[^0-9.]/g,'')); - var bb = ts_parseFloat(b[1].replace(/[^0-9.]/g,'')); - return (aa != bb ? aa - bb : a[2] - b[2]); -} - -function ts_sort_numeric(a,b) { - var aa = ts_parseFloat(a[1]); - var bb = ts_parseFloat(b[1]); - return (aa != bb ? aa - bb : a[2] - b[2]); -} - -function ts_sort_caseinsensitive(a,b) { - var aa = a[1].toLowerCase(); - var bb = b[1].toLowerCase(); - return (aa < bb ? -1 : aa > bb ? 1 : a[2] - b[2]); -} - -function ts_sort_default(a,b) { - return (a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : a[2] - b[2]); -} - -function ts_alternate(table) { - // Take object table and get all it's tbodies. - var tableBodies = table.getElementsByTagName("tbody"); - // Loop through these tbodies - for (var i = 0; i < tableBodies.length; i++) { - // Take the tbody, and get all it's rows - var tableRows = tableBodies[i].getElementsByTagName("tr"); - // Loop through these rows - // Start at 1 because we want to leave the heading row untouched - for (var j = 0; j < tableRows.length; j++) { - // Check if j is even, and apply classes for both possible results - var oldClasses = tableRows[j].className.split(" "); - var newClassName = ""; - for (var k = 0; k < oldClasses.length; k++) { - if (oldClasses[k] != "" && oldClasses[k] != "even" && oldClasses[k] != "odd") - newClassName += oldClasses[k] + " "; - } - tableRows[j].className = newClassName + (j % 2 == 0 ? "even" : "odd"); - } - } -} - -/* - * End of table sorting code - */ - function runOnloadHook() { // don't run anything below this for non-dom browsers if (doneOnloadHook || !(document.getElementById && document.getElementsByTagName)) { Copied: trunk/themes/default/sortable.js (from rev 6859, trunk/themes/default/sortable.js) =================================================================== --- trunk/themes/default/sortable.js (rev 0) +++ trunk/themes/default/sortable.js 2009-06-19 11:19:19 UTC (rev 6942) @@ -0,0 +1,325 @@ +/* +Table sorting script by Joost de Valk, check it out at http://www.joostdevalk.nl/code/sortable-table/. +Based on a script from http://www.kryogenix.org/code/browser/sorttable/. +Distributed under the MIT license: http://www.kryogenix.org/code/browser/licence.html . + +Copyright (c) 1997-2007 Stuart Langridge, Joost de Valk. + +Version 1.5.7 +*/ + +/* You can change these values */ +var image_path = "/images/"; +var image_up = "sort_up.gif"; +var image_down = "sort_down.gif"; +var image_none = "sort_none.gif"; +var europeandate = true; +var alternate_row_colors = true; + +/* Don't change anything below this unless you know what you're doing */ +addEvent(window, "load", sortables_init); + +var SORT_COLUMN_INDEX; +var thead = false; + +function sortables_init() { + // Find all tables with class sortable and make them sortable + if (!document.getElementsByTagName) return; + tbls = document.getElementsByTagName("table"); + for (ti=0;ti<tbls.length;ti++) { + thisTbl = tbls[ti]; + if (((' '+thisTbl.className+' ').indexOf("sortable") != -1) && (thisTbl.id)) { + ts_makeSortable(thisTbl); + } + } +} + +function ts_makeSortable(t) { + if (t.rows && t.rows.length > 0) { + if (t.tHead && t.tHead.rows.length > 0) { + var firstRow = t.tHead.rows[t.tHead.rows.length-1]; + thead = true; + } else { + var firstRow = t.rows[0]; + } + } + if (!firstRow) return; + + // We have a first row: assume it's the header, and make its contents clickable links + for (var i=0;i<firstRow.cells.length;i++) { + var cell = firstRow.cells[i]; + var txt = ts_getInnerText(cell); + if (cell.className != "unsortable" && cell.className.indexOf("unsortable") == -1) { + cell.innerHTML = '<a href="#" class="sortheader" onclick="ts_resortTable(this, '+i+');return false;">'+txt+'<span class="sortarrow"> <img src="'+ image_path + image_none + '" alt="↓"/></span></a>'; + } + } + if (alternate_row_colors) { + alternate(t); + } +} + +function ts_getInnerText(el) { + if (typeof el == "string") return el; + if (typeof el == "undefined") { return el }; + if (el.innerText) return el.innerText; //Not needed but it is faster + var str = ""; + + var cs = el.childNodes; + var l = cs.length; + for (var i = 0; i < l; i++) { + switch (cs[i].nodeType) { + case 1: //ELEMENT_NODE + str += ts_getInnerText(cs[i]); + break; + case 3: //TEXT_NODE + str += cs[i].nodeValue; + break; + } + } + return str; +} + +function ts_resortTable(lnk, clid) { + var span; + for (var ci=0;ci<lnk.childNodes.length;ci++) { + if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci]; + } + var spantext = ts_getInnerText(span); + var td = lnk.parentNode; + var column = clid || td.cellIndex; + var t = getParent(td,'TABLE'); + // Work out a type for the column + if (t.rows.length <= 1) return; + var itm = ""; + var i = 0; + while (itm == "" && i < t.tBodies[0].rows.length) { + var itm = ts_getInnerText(t.tBodies[0].rows[i].cells[column]); + itm = trim(itm); + if (itm.substr(0,4) == "<!--" || itm.length == 0) { + itm = ""; + } + i++; + } + if (itm == "") return; + sortfn = ts_sort_caseinsensitive; + if (itm.match(/^\d\d[\/\.-][a-zA-z][a-zA-Z][a-zA-Z][\/\.-]\d\d\d\d$/)) sortfn = ts_sort_date; + if (itm.match(/^\d\d[\/\.-]\d\d[\/\.-]\d\d\d{2}?$/)) sortfn = ts_sort_date; + if (itm.match(/^-?[\xA3$\x80ۢ\xB4]\d/)) sortfn = ts_sort_numeric; + // ape: added to provide numeric sort on size for the docs tools. + if (itm.match(/^\d+ *(B|KB|MB)$/)) sortfn = ts_sort_numeric; + if (itm.match(/^-?(\d+[,\.]?)+(E[-+][\d]+)?%?$/)) sortfn = ts_sort_numeric; + SORT_COLUMN_INDEX = column; + var firstRow = new Array(); + var newRows = new Array(); + for (k=0;k<t.tBodies.length;k++) { + for (i=0;i<t.tBodies[k].rows[0].length;i++) { + firstRow[i] = t.tBodies[k].rows[0][i]; + } + } + for (k=0;k<t.tBodies.length;k++) { + if (!thead) { + // Skip the first row + for (j=1;j<t.tBodies[k].rows.length;j++) { + newRows[j-1] = t.tBodies[k].rows[j]; + } + } else { + // Do NOT skip the first row + for (j=0;j<t.tBodies[k].rows.length;j++) { + newRows[j] = t.tBodies[k].rows[j]; + } + } + } + newRows.sort(sortfn); + if (span.getAttribute("sortdir") == 'down') { + ARROW = ' <img src="'+ image_path + image_down + '" alt="↓"/>'; + newRows.reverse(); + span.setAttribute('sortdir','up'); + } else { + ARROW = ' <img src="'+ image_path + image_up + '" alt="↑"/>'; + span.setAttribute('sortdir','down'); + } + // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones + // don't do sortbottom rows + for (i=0; i<newRows.length; i++) { + if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) { + t.tBodies[0].appendChild(newRows[i]); + } + } + // do sortbottom rows only + for (i=0; i<newRows.length; i++) { + if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) + t.tBodies[0].appendChild(newRows[i]); + } + // Delete any other arrows there may be showing + var allspans = document.getElementsByTagName("span"); + for (var ci=0;ci<allspans.length;ci++) { + if (allspans[ci].className == 'sortarrow') { + if (getParent(allspans[ci],"table") == getParent(lnk,"table")) { // in the same table as us? + allspans[ci].innerHTML = ' <img src="'+ image_path + image_none + '" alt="↓"/>'; + } + } + } + span.innerHTML = ARROW; + alternate(t); +} + +function getParent(el, pTagName) { + if (el == null) { + return null; + } else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase()) { + return el; + } else { + return getParent(el.parentNode, pTagName); + } +} + +function sort_date(date) { + // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX + dt = "00000000"; + if (date.length == 11) { + mtstr = date.substr(3,3); + mtstr = mtstr.toLowerCase(); + switch(mtstr) { + case "jan": var mt = "01"; break; + case "feb": var mt = "02"; break; + case "mar": var mt = "03"; break; + case "apr": var mt = "04"; break; + case "may": var mt = "05"; break; + case "jun": var mt = "06"; break; + case "jul": var mt = "07"; break; + case "aug": var mt = "08"; break; + case "sep": var mt = "09"; break; + case "oct": var mt = "10"; break; + case "nov": var mt = "11"; break; + case "dec": var mt = "12"; break; + // default: var mt = "00"; + } + dt = date.substr(7,4)+mt+date.substr(0,2); + return dt; + } else if (date.length == 10) { + if (europeandate == false) { + dt = date.substr(6,4)+date.substr(0,2)+date.substr(3,2); + return dt; + } else { + dt = date.substr(6,4)+date.substr(3,2)+date.substr(0,2); + return dt; + } + } else if (date.length == 8) { + yr = date.substr(6,2); + if (parseInt(yr) < 50) { + yr = '20'+yr; + } else { + yr = '19'+yr; + } + if (europeandate == true) { + dt = yr+date.substr(3,2)+date.substr(0,2); + return dt; + } else { + dt = yr+date.substr(0,2)+date.substr(3,2); + return dt; + } + } + return dt; +} + +function ts_sort_date(a,b) { + dt1 = sort_date(ts_getInnerText(a.cells[SORT_COLUMN_INDEX])); + dt2 = sort_date(ts_getInnerText(b.cells[SORT_COLUMN_INDEX])); + + if (dt1==dt2) { + return 0; + } + if (dt1<dt2) { + return -1; + } + return 1; +} +function ts_sort_numeric(a,b) { + var aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); + aa = clean_num(aa); + var bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); + bb = clean_num(bb); + return compare_numeric(aa,bb); +} +function compare_numeric(a,b) { + var a = parseFloat(a); + a = (isNaN(a) ? 0 : a); + var b = parseFloat(b); + b = (isNaN(b) ? 0 : b); + return a - b; +} +function ts_sort_caseinsensitive(a,b) { + aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase(); + bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase(); + if (aa==bb) { + return 0; + } + if (aa<bb) { + return -1; + } + return 1; +} +function ts_sort_default(a,b) { + aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); + bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); + if (aa==bb) { + return 0; + } + if (aa<bb) { + return -1; + } + return 1; +} +function addEvent(elm, evType, fn, useCapture) +// addEvent and removeEvent +// cross-browser event handling for IE5+, NS6 and Mozilla +// By Scott Andrew +{ + if (elm.addEventListener){ + elm.addEventListener(evType, fn, useCapture); + return true; + } else if (elm.attachEvent){ + var r = elm.attachEvent("on"+evType, fn); + return r; + } else { + alert("Handler could not be removed"); + } +} +function clean_num(str) { + str = str.replace(new RegExp(/[^-?0-9.]/g),""); + return str; +} +function trim(s) { + return s.replace(/^\s+|\s+$/g, ""); +} +function alternate(table) { + // Take object table and get all it's tbodies. + var tableBodies = table.getElementsByTagName("tbody"); + // Loop through these tbodies + for (var i = 0; i < tableBodies.length; i++) { + // Take the tbody, and get all it's rows + var tableRows = tableBodies[i].getElementsByTagName("tr"); + // Loop through these rows + // Start at 1 because we want to leave the heading row untouched + for (var j = 0; j < tableRows.length; j++) { + // Check if j is even, and apply classes for both possible results + if ( (j % 2) == 0 ) { + if ( !(tableRows[j].className.indexOf('odd') == -1) ) { + tableRows[j].className = tableRows[j].className.replace('odd', 'even'); + } else { + if ( tableRows[j].className.indexOf('even') == -1 ) { + tableRows[j].className += " even"; + } + } + } else { + if ( !(tableRows[j].className.indexOf('even') == -1) ) { + tableRows[j].className = tableRows[j].className.replace('even', 'odd'); + } else { + if ( tableRows[j].className.indexOf('odd') == -1 ) { + tableRows[j].className += " odd"; + } + } + } + } + } +} Modified: trunk/themes/default/wikicommon.js =================================================================== --- trunk/themes/default/wikicommon.js 2009-06-17 19:02:07 UTC (rev 6941) +++ trunk/themes/default/wikicommon.js 2009-06-19 11:19:19 UTC (rev 6942) @@ -104,144 +104,6 @@ hookEvent("load", setupshowHideFolder); -/* - * Table sorting script by Joost de Valk, check it out at http://www.joostdevalk.nl/code/sortable-table/. - * Based on a script from http://www.kryogenix.org/code/browser/sorttable/. - * Distributed under the MIT license: http://www.kryogenix.org/code/browser/licence.html . - * - * Copyright (c) 1997-2006 Stuart Langridge, Joost de Valk. - * - * @todo don't break on colspans/rowspans (bug 8028) - * @todo language-specific digit grouping/decimals (bug 8063) - * @todo support all accepted date formats (bug 8226) - */ - -var ts_image_up = "sort_up.gif"; -var ts_image_down = "sort_down.gif"; -var ts_image_none = "sort_none.gif"; -var wgContentLanguage = "en"; -var ts_europeandate = true; -var ts_alternate_row_colors = true; -var SORT_COLUMN_INDEX; - -function sortables_init() { - var idnum = 0; - // Find all tables with class sortable and make them sortable - var tables = getElementsByClassName(document, "table", "sortable"); - for (var ti = 0; ti < tables.length ; ti++) { - if (!tables[ti].id) { - tables[ti].setAttribute('id','sortable_table_id_'+idnum); - ++idnum; - } - ts_makeSortable(tables[ti]); - } -} - -function ts_makeSortable(table) { - var firstRow; - var ts_image_path = stylepath+"images/"; - if (table.rows && table.rows.length > 0) { - if (table.tHead && table.tHead.rows.length > 0) { - firstRow = table.tHead.rows[table.tHead.rows.length-1]; - } else { - firstRow = table.rows[0]; - } - } - if (!firstRow) return; - - // We have a first row: assume it's the header, and make its contents clickable links - for (var i = 0; i < firstRow.cells.length; i++) { - var cell = firstRow.cells[i]; - if ((" "+cell.className+" ").indexOf(" unsortable ") == -1) { - cell.innerHTML += ' <a href="#" class="sortheader" onclick="ts_resortTable(this);return false;"><span class="sortarrow"><img src="'+ ts_image_path + ts_image_none + '" alt="↓"/></span></a>'; - } - } - if (ts_alternate_row_colors) { - ts_alternate(table); - } -} - -function ts_getInnerText(el) { - if (typeof el == "string") return el; - if (typeof el == "undefined") { return el }; - if (el.innerText) return el.innerText; // Not needed but it is faster - var str = ""; - - var cs = el.childNodes; - var l = cs.length; - for (var i = 0; i < l; i++) { - switch (cs[i].nodeType) { - case 1: //ELEMENT_NODE - str += ts_getInnerText(cs[i]); - break; - case 3: //TEXT_NODE - str += cs[i].nodeValue; - break; - } - } - return str; -} - -function ts_parseFloat(num) { - if (!num) return 0; - num = parseFloat(num.replace(/,/, "")); - return (isNaN(num) ? 0 : num); -} - -function ts_sort_date(a,b) { - var aa = ts_dateToSortKey(a[1]); - var bb = ts_dateToSortKey(b[1]); - return (aa < bb ? -1 : aa > bb ? 1 : a[2] - b[2]); -} - -function ts_sort_currency(a,b) { - var aa = ts_parseFloat(a[1].replace(/[^0-9.]/g,'')); - var bb = ts_parseFloat(b[1].replace(/[^0-9.]/g,'')); - return (aa != bb ? aa - bb : a[2] - b[2]); -} - -function ts_sort_numeric(a,b) { - var aa = ts_parseFloat(a[1]); - var bb = ts_parseFloat(b[1]); - return (aa != bb ? aa - bb : a[2] - b[2]); -} - -function ts_sort_caseinsensitive(a,b) { - var aa = a[1].toLowerCase(); - var bb = b[1].toLowerCase(); - return (aa < bb ? -1 : aa > bb ? 1 : a[2] - b[2]); -} - -function ts_sort_default(a,b) { - return (a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : a[2] - b[2]); -} - -function ts_alternate(table) { - // Take object table and get all it's tbodies. - var tableBodies = table.getElementsByTagName("tbody"); - // Loop through these tbodies - for (var i = 0; i < tableBodies.length; i++) { - // Take the tbody, and get all it's rows - var tableRows = tableBodies[i].getElementsByTagName("tr"); - // Loop through these rows - // Start at 1 because we want to leave the heading row untouched - for (var j = 0; j < tableRows.length; j++) { - // Check if j is even, and apply classes for both possible results - var oldClasses = tableRows[j].className.split(" "); - var newClassName = ""; - for (var k = 0; k < oldClasses.length; k++) { - if (oldClasses[k] != "" && oldClasses[k] != "even" && oldClasses[k] != "odd") - newClassName += oldClasses[k] + " "; - } - tableRows[j].className = newClassName + (j % 2 == 0 ? "even" : "odd"); - } - } -} - -/* - * End of table sorting code - */ - function runOnloadHook() { // don't run anything below this for non-dom browsers if (doneOnloadHook || !(document.getElementById && document.getElementsByTagName)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-06-25 14:35:36
|
Revision: 6961 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6961&view=rev Author: vargenau Date: 2009-06-25 14:35:00 +0000 (Thu, 25 Jun 2009) Log Message: ----------- More colors Modified Paths: -------------- trunk/lib/InlineParser.php trunk/pgsrc/Help%2FTextFormattingRules Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-06-25 12:47:08 UTC (rev 6960) +++ trunk/lib/InlineParser.php 2009-06-25 14:35:00 UTC (rev 6961) @@ -857,7 +857,31 @@ function markup ($match, $body) { $color = strtolower(substr($match, 7, -1)); - if (in_array($color, array('red', 'blue', 'gray', 'yellow', 'green', 'cyan', 'black')) + $morecolors = array('beige' => '#f5f5dc', + 'brown' => '#a52a2a', + 'chocolate' => '#d2691e', + 'cyan' => '#00ffff', + 'gold' => '#ffd700', + 'ivory' => '#fffff0', + 'indigo' => '#4b0082', + 'magenta' => '#ff00ff', + 'orange' => '#ffa500', + 'pink' => '#ffc0cb', + 'salmon' => '#fa8072', + 'snow' => '#fffafa', + 'turquoise' => '#40e0d0', + 'violet' => '#ee82ee', + ); + + if (isset($morecolors[$color])) { + $color = $morecolors[$color]; + } + + // HTML 4 defines the following 16 colors + if (in_array($color, array('aqua', 'black', 'blue', 'fuchsia', + 'gray', 'green', 'lime', 'maroon', + 'navy', 'olive', 'purple', 'red', + 'silver', 'teal', 'white', 'yellow')) or ((substr($color,0,1) == '#') and ((strlen($color) == 4) or (strlen($color) == 7)) and (strspn(substr($color,1),'0123456789abcdef') == strlen($color)-1))) { Modified: trunk/pgsrc/Help%FTextFormattingRules =================================================================== --- trunk/pgsrc/Help%2FTextFormattingRules 2009-06-25 12:47:08 UTC (rev 6960) +++ trunk/pgsrc/Help%2FTextFormattingRules 2009-06-25 14:35:00 UTC (rev 6961) @@ -91,11 +91,46 @@ %color=green% green text %% and back to normal The easiest way to do it is to use the COLOR button in the Edit Toolbar. -The text will be in green by default. You can change the color. +The text will be in green by default. You can then change the color. Allowed colors are: -* %color=red% red %%, %color=blue% blue %%, %color=gray% gray %%, %color=yellow% yellow %%, %color=green% green %%, %color=cyan% cyan %%, %color=black% black %%; -* an HTML color number (# followed by 3 or 6 digits). +* an HTML color number (# followed by 3 or 6 digits), +* the following predefined color names: +{| class="bordered" +|- +| %color=aqua% aqua %% +| bgcolor="#565c5e" | %color=beige% beige %% +| %color=black% black %% +| %color=blue% blue %% +| %color=brown% brown %% +| %color=chocolate% chocolate %% +| %color=cyan% cyan %% +| %color=fuchsia% fuchsia %% +| %color=gold% gold %% +| %color=gray% gray %% +|- +| %color=green% green %% +| bgcolor="#565c5e" | %color=ivory% ivory %% +| %color=indigo% indigo %% +| %color=lime% lime %% +| %color=magenta% magenta %% +| %color=maroon% maroon %% +| %color=navy% navy %% +| %color=olive% olive %% +| %color=orange% orange %% +| %color=pink% pink %% +|- +| %color=purple% purple %% +| %color=red% red %% +| %color=salmon% salmon %% +| %color=silver% silver %% +| bgcolor="#565c5e" | %color=snow% snow %% +| %color=teal% teal %% +| %color=turquoise% turquoise %% +| %color=violet% violet %% +| bgcolor="#565c5e" | %color=white% white %% +| %color=yellow% yellow %% +|} Note: you can put the headers in color, but only if you do not have a table of content. For now, the table of content is incompatible with color headers. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-07-06 14:16:25
|
Revision: 7000 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7000&view=rev Author: vargenau Date: 2009-07-06 14:16:22 +0000 (Mon, 06 Jul 2009) Log Message: ----------- Default for Japanese is UTF-8 Modified Paths: -------------- trunk/config/config-dist.ini trunk/locale/Makefile trunk/locale/cvt-utf8.sh trunk/pgsrc/Help%2FTextFormattingRules Removed Paths: ------------- trunk/locale/ja.euc-jp/ Modified: trunk/config/config-dist.ini =================================================================== --- trunk/config/config-dist.ini 2009-07-06 13:55:26 UTC (rev 6999) +++ trunk/config/config-dist.ini 2009-07-06 14:16:22 UTC (rev 7000) @@ -887,21 +887,21 @@ ; and to reference links to the stylesheets (css). For more info see: ; http://www.iana.org/assignments/character-sets. Note that PhpWiki ; has been extensively tested only with the latin1 (iso-8859-1) -; character set. +; and utf-8 character sets. ; -; If you change the default from iso-8859-1 with existing pages, +; If you change the default with existing pages, ; PhpWiki may not work properly and will require modifications in all existing pages. ; You'll have to dump the old pages with the old charset ; and import it into the new one after having changed the charset. -; Currently we support utf-8 for zh and ja, euc-jp for ja (not enabled) -; and iso-8859-1 for all other langs. Changing languages (UserPreferences) +; Currently we support utf-8 for all languages, euc-jp for ja +; and iso-8859-1 for all langs except ja and zh. Changing languages (UserPreferences) ; from one charset to another will not work! ; ; Character sets similar to iso-8859-1 may work with little or no ; modification depending on your setup. The database must also ; support the same charset, and of course the same is true for the ; web browser. euc-jp and utf-8 works ok, but only is mbstring is used. -CHARSET = iso-8859-1 +CHARSET = utf-8 ; Most exotic charsets are not supported by htmlspecialchars, which prints a warning: ; "charset `bla' not supported, assuming iso-8859-1" Modified: trunk/locale/Makefile =================================================================== --- trunk/locale/Makefile 2009-07-06 13:55:26 UTC (rev 6999) +++ trunk/locale/Makefile 2009-07-06 14:16:22 UTC (rev 7000) @@ -27,12 +27,6 @@ cp -f $@ $@~ msgmerge -o $@.new $@~ $^ && mv -f $@.new $@ -# work on ja.euc-jp.po and create utf-8 from this. changes in utf-8 will get lost! -po/ja.utf-8.po: po/ja.po - @echo "# Autogenerated file from ja.po" > $@ - @echo "# Any changes here will be lost! Edit ja.po instead" >> $@ - iconv -f euc-jp -t utf-8 $^ |sed -e's,; charset=euc-jp,; charset=utf-8,' >> $@ - %/LC_MESSAGES/phpwiki.mo : po/%.po mkdir -p $*/LC_MESSAGES msgfmt -o $@ $< Modified: trunk/locale/cvt-utf8.sh =================================================================== --- trunk/locale/cvt-utf8.sh 2009-07-06 13:55:26 UTC (rev 6999) +++ trunk/locale/cvt-utf8.sh 2009-07-06 14:16:22 UTC (rev 7000) @@ -4,7 +4,7 @@ for po in po/??.po; do to="`echo $po|sed -e's/\.po/.utf8.po/'`" from=iso-8859-1 - if [ "$po" = "po/ja.po" ]; then from=euc-jp; fi + if [ "$po" = "po/ja.po" ]; then from=utf-8; fi if [ "$po" = "po/zh.po" ] then from=utf-8 @@ -19,7 +19,7 @@ for po in ??; do to="$po.utf8" from=iso-8859-1 - if [ "$po" = "ja" ]; then from=euc-jp; fi + if [ "$po" = "ja" ]; then from=utf-8; fi if [ "$po" = "zh" ] then from=utf-8 Modified: trunk/pgsrc/Help%FTextFormattingRules =================================================================== --- trunk/pgsrc/Help%2FTextFormattingRules 2009-07-06 13:55:26 UTC (rev 6999) +++ trunk/pgsrc/Help%2FTextFormattingRules 2009-07-06 14:16:22 UTC (rev 7000) @@ -151,7 +151,7 @@ Special non-ASCII or non-latin characters are printed as-is only if supported by the native wiki CHARSET. Add such characters on a non-supported CHARSET with the [[Help:RawHtmlPlugin]] if it is enabled by the Admin and e.g. the ##&#num;## syntax. -E.g. These japanese euc-jp chars 'から 新規ページ' +E.g. These Japanese chars 'から 新規ページ' on this <<SystemInfo CHARSET>> wiki. And with the plugin: <<RawHtml から 新規ページ>> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-08-05 15:06:24
|
Revision: 7058 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7058&view=rev Author: vargenau Date: 2009-08-05 15:06:15 +0000 (Wed, 05 Aug 2009) Log Message: ----------- Add predefined icons (icons taken or adapted from Mediawiki commons) Modified Paths: -------------- trunk/lib/InlineParser.php Added Paths: ----------- trunk/pgsrc/Help%2FPredefinedIcons trunk/themes/default/images/ic_biggrin.png trunk/themes/default/images/ic_bluestar.png trunk/themes/default/images/ic_check.png trunk/themes/default/images/ic_cross.png trunk/themes/default/images/ic_danger.png trunk/themes/default/images/ic_greenstar.png trunk/themes/default/images/ic_handno.png trunk/themes/default/images/ic_handyes.png trunk/themes/default/images/ic_help.png trunk/themes/default/images/ic_info.png trunk/themes/default/images/ic_lightoff.png trunk/themes/default/images/ic_lighton.png trunk/themes/default/images/ic_minus.png trunk/themes/default/images/ic_plus.png trunk/themes/default/images/ic_redstar.png trunk/themes/default/images/ic_sad.png trunk/themes/default/images/ic_smile.png trunk/themes/default/images/ic_tongue.png trunk/themes/default/images/ic_wink.png trunk/themes/default/images/ic_yellowstar.png Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-08-05 09:48:51 UTC (rev 7057) +++ trunk/lib/InlineParser.php 2009-08-05 15:06:15 UTC (rev 7058) @@ -1019,6 +1019,36 @@ function markup ($match) { $page = substr($match,2,-2); + + // Check for predefined icons. + $predefinedicons = array(":)" => "ic_smile.png", + ":(" => "ic_sad.png", + ":P" => "ic_tongue.png", + ":D" => "ic_biggrin.png", + ";)" => "ic_wink.png", + "(y)" => "ic_handyes.png", + "(n)" => "ic_handno.png", + "(i)" => "ic_info.png", + "(/)" => "ic_check.png", + "(x)" => "ic_cross.png", + "(!)" => "ic_danger.png", + "(+)" => "ic_plus.png", + "(-)" => "ic_minus.png", + "(?)" => "ic_help.png", + "(on)" => "ic_lighton.png", + "(off)" => "ic_lightoff.png", + "(*)" => "ic_yellowstar.png", + "(*r)" => "ic_redstar.png", + "(*g)" => "ic_greenstar.png", + "(*b)" => "ic_bluestar.png", + "(*y)" => "ic_yellowstar.png", + ); + foreach ($predefinedicons as $ascii => $icon) { + if (trim($page) == $ascii) { + return LinkImage("/wiki/themes/default/images/$icon", $page); + } + } + if (strpos($page, "|") === false) { $imagename = $page; $alt = ""; Added: trunk/pgsrc/Help%FPredefinedIcons =================================================================== --- trunk/pgsrc/Help%2FPredefinedIcons (rev 0) +++ trunk/pgsrc/Help%2FPredefinedIcons 2009-08-05 15:06:15 UTC (rev 7058) @@ -0,0 +1,22 @@ +Date: Wed, 5 Aug 2009 18:54:09 +0000 +Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) +X-Rcs-Id: $Id$ +Content-Type: application/x-phpwiki; + pagename=Help%2FPredefinedIcons; + flags=PAGE_LOCKED%2CEXTERNAL_PAGE; + markup=2; + charset=iso-8859-1 +Content-Transfer-Encoding: binary + +Phpwiki allows you to easily include some **predefined icons** in your wiki pages. + +The following icons are available: + +|= Notation | ##~{{:)}}## | ##~{{:(}}## | ##~{{:P}}## | ##~{{:D}}## | ##~{{;)}}## | ##~{{(y)}}## | ##~{{(n)}}## | ##~{{(i)}}## | ##~{{(/)}}## | ##~{{(x)}}## | ##~{{(!)}}## +|= Image | {{:)}} | {{:(}} | {{:P}} | {{:D}} | {{;)}} | {{(y)}} | {{(n)}} | {{(i)}} | {{(/)}} | {{(x)}} | {{(!)}} + +----- + +|= Notation | ##~{{(+)}}## | ##~{{(-)}}## | ##~{{(?)}}## | ##~{{(on)}}## | ##~{{(off)}}## | ##~{{(*)}}## | ##~{{(*r)}}## | ##~{{(*g)}}## | ##~{{(*b)}}## | ##~{{(*y)}}## +|= Image | {{(+)}} | {{(-)}} | {{(?)}} | {{(on)}} | {{(off)}} | {{(*)}} | {{(*r)}} | {{(*g)}} | {{(*b)}} | {{(*y)}} + Property changes on: trunk/pgsrc/Help%2FPredefinedIcons ___________________________________________________________________ Added: svn:keywords + Id Added: trunk/themes/default/images/ic_biggrin.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_biggrin.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_bluestar.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_bluestar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_check.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_check.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_cross.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_cross.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_danger.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_danger.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_greenstar.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_greenstar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_handno.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_handno.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_handyes.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_handyes.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_help.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_help.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_info.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_info.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_lightoff.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_lightoff.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_lighton.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_lighton.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_minus.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_minus.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_plus.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_plus.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_redstar.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_redstar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_sad.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_sad.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_smile.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_smile.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_tongue.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_tongue.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_wink.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_wink.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/themes/default/images/ic_yellowstar.png =================================================================== (Binary files differ) Property changes on: trunk/themes/default/images/ic_yellowstar.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-08-05 15:48:21
|
Revision: 7059 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7059&view=rev Author: vargenau Date: 2009-08-05 15:48:12 +0000 (Wed, 05 Aug 2009) Log Message: ----------- Use CSS to separate buttons Modified Paths: -------------- trunk/lib/plugin/WikiAdminRename.php trunk/themes/gforge/gforge.css Modified: trunk/lib/plugin/WikiAdminRename.php =================================================================== --- trunk/lib/plugin/WikiAdminRename.php 2009-08-05 15:06:15 UTC (rev 7058) +++ trunk/lib/plugin/WikiAdminRename.php 2009-08-05 15:48:12 UTC (rev 7059) @@ -224,7 +224,6 @@ } $buttons = HTML::p(Button('submit:admin_rename[rename]', $button_label, 'wikiadmin'), - HTML::Raw(' '), Button('submit:admin_rename[cancel]', _("Cancel"), 'button')); if ($singlepage === false) { Modified: trunk/themes/gforge/gforge.css =================================================================== --- trunk/themes/gforge/gforge.css 2009-08-05 15:06:15 UTC (rev 7058) +++ trunk/themes/gforge/gforge.css 2009-08-05 15:48:12 UTC (rev 7059) @@ -200,11 +200,15 @@ a.wikiaction, a.wiki-rc-action, a.wikiunsafe, input.wikiaction, input.button, input.wikiadmin { text-decoration: none; - font-family: Verdana, Arial, Helvetica, sans-serif; /* don't wrap text buttons */ white-space: nowrap; } +input.wikiaction, input.button, input.wikiadmin { + margin-right: 1em; + margin-left: 1em; +} + .wikiunsafe { background-color: #fcc; } /* Unknown links */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-08-25 16:30:50
|
Revision: 7088 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7088&view=rev Author: vargenau Date: 2009-08-25 16:30:38 +0000 (Tue, 25 Aug 2009) Log Message: ----------- Class "nobreak" when printing tables Modified Paths: -------------- trunk/pgsrc/Help%2FMediawikiTablePlugin trunk/themes/MonoBook/commonPrint.css Modified: trunk/pgsrc/Help%2FMediawikiTablePlugin =================================================================== --- trunk/pgsrc/Help%2FMediawikiTablePlugin 2009-08-24 18:43:48 UTC (rev 7087) +++ trunk/pgsrc/Help%2FMediawikiTablePlugin 2009-08-25 16:30:38 UTC (rev 7088) @@ -1,4 +1,4 @@ -Date: Thu, 11 Jun 2009 20:56:23 +0000 +Date: Tue, 25 Aug 2009 20:32:21 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) X-Rcs-Id: $Id$ Content-Type: application/x-phpwiki; @@ -65,6 +65,10 @@ If you specify ##class="sortable"##, the table columns will be sortable. +==== Do not break table when printing + +If you specify ##class="nobreak"##, the table will not be cut when printed (if your browser supports it). + == Examples === Example 1: simple table Modified: trunk/themes/MonoBook/commonPrint.css =================================================================== --- trunk/themes/MonoBook/commonPrint.css 2009-08-24 18:43:48 UTC (rev 7087) +++ trunk/themes/MonoBook/commonPrint.css 2009-08-25 16:30:38 UTC (rev 7088) @@ -54,6 +54,12 @@ h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } +/* Do not cut tables with class "nobreak" */ + +table.nobreak { + page-break-inside: avoid !important; +} + /* Thanks to A List Apart (http://alistapart.com/) for useful extras */ a.stub, a.new{ color:#ba0000; text-decoration:none; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-09-09 14:00:42
|
Revision: 7104 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7104&view=rev Author: vargenau Date: 2009-09-09 14:00:22 +0000 (Wed, 09 Sep 2009) Log Message: ----------- Revision 7383 from Fusionforge Revision Links: -------------- http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7383&view=rev Modified Paths: -------------- trunk/lib/WikiUser/PearDb.php trunk/tests/xmlrpc/interop-client.php Modified: trunk/lib/WikiUser/PearDb.php =================================================================== --- trunk/lib/WikiUser/PearDb.php 2009-09-09 13:15:16 UTC (rev 7103) +++ trunk/lib/WikiUser/PearDb.php 2009-09-09 14:00:22 UTC (rev 7104) @@ -51,7 +51,7 @@ return $this->_prefs; } } - if ($this->_HomePagehandle) { + if (isset($this->_HomePagehandle)) { if ($restored_from_page = $this->_prefs->retrieve ($this->_HomePagehandle->get('pref'))) { $updated = $this->_prefs->updatePrefs($restored_from_page); Modified: trunk/tests/xmlrpc/interop-client.php =================================================================== --- trunk/tests/xmlrpc/interop-client.php 2009-09-09 13:15:16 UTC (rev 7103) +++ trunk/tests/xmlrpc/interop-client.php 2009-09-09 14:00:22 UTC (rev 7104) @@ -214,7 +214,7 @@ "varInt" => 186000, "varString" => "18 > 2 && 2 < 18 && 42 == the answer to life, the universe, and everything" )); run_test($server, $debug, $output, "interopEchoTests.echoStringArray", - array($decl_1, $decl_2, $decl_3, $decl_4, "non-ascii chars above 127 (165-170): \xA5, \xA6, \xA7, \xA8, \xA9, \xAA")); + array($decl_1, $decl_2, $decl_3, $decl_4, "non-ascii chars above 127 (165-170): ¥, ¦, §, ¨, ©, ª")); run_test($server, $debug, $output, "interopEchoTests.echoIntegerArray", array(23, 234, 1, 0, -10, 999)); run_test($server, $debug, $output, "interopEchoTests.echoFloatArray", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |