SourceForge logo
SourceForge logo
Menu

phpwiki-talk

You can subscribe to this list here.

2000 Jan
Feb
Mar
Apr
May
(1)
Jun
(103)
Jul
(105)
Aug
(16)
Sep
(16)
Oct
(78)
Nov
(36)
Dec
(58)
2001 Jan
(100)
Feb
(155)
Mar
(84)
Apr
(33)
May
(22)
Jun
(77)
Jul
(36)
Aug
(37)
Sep
(183)
Oct
(74)
Nov
(235)
Dec
(165)
2002 Jan
(187)
Feb
(183)
Mar
(52)
Apr
(10)
May
(15)
Jun
(19)
Jul
(43)
Aug
(90)
Sep
(144)
Oct
(144)
Nov
(171)
Dec
(78)
2003 Jan
(113)
Feb
(99)
Mar
(80)
Apr
(44)
May
(35)
Jun
(32)
Jul
(34)
Aug
(34)
Sep
(30)
Oct
(57)
Nov
(97)
Dec
(139)
2004 Jan
(132)
Feb
(223)
Mar
(300)
Apr
(221)
May
(171)
Jun
(286)
Jul
(188)
Aug
(107)
Sep
(97)
Oct
(106)
Nov
(139)
Dec
(125)
2005 Jan
(200)
Feb
(116)
Mar
(68)
Apr
(158)
May
(70)
Jun
(80)
Jul
(55)
Aug
(52)
Sep
(92)
Oct
(141)
Nov
(86)
Dec
(41)
2006 Jan
(35)
Feb
(62)
Mar
(59)
Apr
(52)
May
(51)
Jun
(61)
Jul
(30)
Aug
(36)
Sep
(12)
Oct
(4)
Nov
(22)
Dec
(34)
2007 Jan
(49)
Feb
(19)
Mar
(37)
Apr
(16)
May
(9)
Jun
(38)
Jul
(17)
Aug
(31)
Sep
(16)
Oct
(34)
Nov
(4)
Dec
(8)
2008 Jan
(8)
Feb
(16)
Mar
(14)
Apr
(6)
May
(4)
Jun
(5)
Jul
(9)
Aug
(36)
Sep
(6)
Oct
(3)
Nov
(3)
Dec
(3)
2009 Jan
(14)
Feb
(2)
Mar
(7)
Apr
(16)
May
(2)
Jun
(10)
Jul
(1)
Aug
(10)
Sep
(11)
Oct
(4)
Nov
(2)
Dec
2010 Jan
(1)
Feb
Mar
(13)
Apr
(11)
May
(18)
Jun
(44)
Jul
(7)
Aug
(2)
Sep
(14)
Oct
Nov
(6)
Dec
2011 Jan
(2)
Feb
(6)
Mar
(3)
Apr
(2)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2012 Jan
(11)
Feb
(3)
Mar
(11)
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(4)
Dec
2013 Jan
Feb
Mar
Apr
(3)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2014 Jan
Feb
Mar
Apr
May
(4)
Jun
Jul
Aug
Sep
Oct
Nov
(8)
Dec
(1)
2015 Jan
(3)
Feb
(2)
Mar
Apr
(3)
May
(1)
Jun
Jul
(1)
Aug
Sep
Oct
Nov
Dec
(2)
2016 Jan
Feb
(4)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2017 Jan
Feb
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
(3)
Jun
(1)
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
(5)
Aug
Sep
Oct
Nov
Dec
2021 Jan
Feb
(4)
Mar
Apr
May
Jun
Jul
(1)
Aug
(6)
Sep
(3)
Oct
Nov
Dec
2022 Jan
(11)
Feb
(2)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2023 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(3)
Dec
(3)
2024 Jan
(7)
Feb
(2)
Mar
(1)
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
Feb
Mar
Apr
(1)
May
(1)
Jun
Jul
(3)
Aug
Sep
(5)
Oct
Nov
Dec

Showing results of 7779

<< < 1 .. 7 8 9 10 11 .. 312 > >> (Page 9 of 312)
From: Sébastien Le C. <seb...@we...> - 2010年06月11日 07:56:21
Hi,
FYI, I’ve done another installation from scratch with the latest from 
svn, and this is still a blocker: the initial population of the Wiki 
fails because of bug below.
I’ve updated the patch attached to that bug report.
Regards,
Sébastien.
On 17/05/2010 22:51, SourceForge.net wrote:
> Bugs item #3002942, was opened at 2010年05月17日 22:51
> Message generated for change (Tracker Item Submitted) made by slecallonnec
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=106121&aid=3002942&group_id=6121
>
> Please note that this message will contain a full copy of the comment thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: version 1.3.x (current)
> Group: Installation
> Status: Open
> Resolution: None
> Priority: 5
> Private: No
> Submitted By: Sébastien Le Callonnec (slecallonnec)
> Assigned to: Reini Urban (rurban)
> Summary: Initial Wiki Population aborts due to error
>
> Initial Comment:
> When loading the initial "virgin" wiki, the process stops at the page "Help/Categories".
>
> The reason for this is that this page contains a reference to an image, and therefore LinkImage in stdlib.php is called, esp. the following portion:
> stdlib.php, l.547
> $size = @getimagesize($request->get('DOCUMENT_ROOT').urldecode($url));
>
> $request is undefined in this function.
>
> I'm attaching a simple patch for this issue that allows the process to complete successfully.
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=106121&aid=3002942&group_id=6121
>
From: Sébastien Le C. <sl...@ya...> - 2010年06月09日 17:10:21
Hi,
On 09/06/2010 16:13, Reini Urban wrote:
>
> As most users still use 4.x I want it to stay php-4 compatible.
> "official dead" means nothing for php. Providers are lazy.
>
> For 5 only there are a lot of useful libs, which I cannot use.
> RDF libs for the Semantic Web for example.
Please note that I was not referring to abandoning php4, but creating a 
new branch for php5 devs so that they are segregated from the rest. 
Whether ultimately you decide to merge this branch back into trunk or 
make a separate release for php5 is up to you. But I definitely think 
php5 stuff should be isolated from php4 rather than intertwining code to 
accommodate the two (unless there’s a better approach to have the two 
coexisting in peace?).
(That being said, IMHO providers would probably not be as lazy if all 
the code providers were indeed to drop PHP4 support. As Marc-Étienne 
pointed out, PHP4 is EOL since 2007, and PHP5 was first released in 2004)
Regards,
Seb
From: Reini U. <ru...@x-...> - 2010年06月09日 15:13:38
2010年6月9日 Marc-Etienne Vargenau <Mar...@al...>:
> Le 08/06/2010 17:56, Sébastien Le Callonnec a écrit :
>> Hi All,
>>
>> I don’t know if this has been discussed in the past, but as more and
>> more PHP5 stuff is likely to creep into the codebase that seemingly
>> appears to break BC, should we consider setting up a specific branch?
>>
>> The static calls of functions that are not static is causing some
>> errors, and if we want to fix them, the code will be littered with
>> hideous if (php5) ... else ...
>>
>> Also, I have an implementation of PhpWiki Web services that actually
>> work (never been able to get the one in place to work), but it uses
>> SoapServer, so this would be php5-specific.
>>
>> What’s your take on this?
>
> Hello Sébastien,
>
> I am now running Phpwiki with PHP 5.3.2.
>
> As PHP 4 is officially dead, I would be much in favor of
> requiring PHP 5 for Phpwiki 1.4.0.
>
> Reini, what is your opinion on this?
As most users still use 4.x I want it to stay php-4 compatible.
"official dead" means nothing for php. Providers are lazy.
For 5 only there are a lot of useful libs, which I cannot use.
RDF libs for the Semantic Web for example.
-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/
From: Reini U. <ru...@x-...> - 2010年06月09日 15:10:48
2010年6月9日 Marc-Etienne Vargenau <Mar...@al...>:
> Le 09/06/2010 12:34, ru...@us... a écrit :
>>
>> Revision: 7508
>>      http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7508&view=rev
>> Author:  rurban
>> Date:   2010年06月09日 10:34:03 +0000 (2010年6月09日)
>>
>> Log Message:
>> -----------
>> move lib/updateinterwikimap shell script to admin
>> index.php: gforge should symlink or copy the config, as everybody else
As I said here.
No user has a config.ini initially, so you can symlink
config-default.ini to config.ini in your setup recipe.
>> Modified: trunk/index.php
>> ===================================================================
>> --- trunk/index.php   2010年06月09日 10:10:41 UTC (rev 7507)
>> +++ trunk/index.php   2010年06月09日 10:34:03 UTC (rev 7508)
>> @@ -30,14 +30,10 @@
>> require_once(dirname(__FILE__).'/lib/IniConfig.php');
>> -if (!defined('GFORGE') or !GFORGE) {
>> -  IniConfig(dirname(__FILE__)."/config/config.ini");
>> -} else {
>> -  IniConfig(dirname(__FILE__)."/config/config-default.ini");
>> -}
>> +IniConfig(dirname(__FILE__)."/config/config.ini");
>
> Hello Reini,
>
> Was there really a problem with my code?
> I cannot put my config.ini in Svn, so I used this trick.
> What should I do?
-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/
From: Marc-Etienne V. <Mar...@al...> - 2010年06月09日 13:03:42
Le 09/06/2010 12:34, ru...@us... a écrit :
> Revision: 7508
> http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7508&view=rev
> Author: rurban
> Date: 2010年06月09日 10:34:03 +0000 (2010年6月09日)
>
> Log Message:
> -----------
> move lib/updateinterwikimap shell script to admin
> index.php: gforge should symlink or copy the config, as everybody else
[...]
> Modified: trunk/index.php
> ===================================================================
> --- trunk/index.php	2010年06月09日 10:10:41 UTC (rev 7507)
> +++ trunk/index.php	2010年06月09日 10:34:03 UTC (rev 7508)
> @@ -30,14 +30,10 @@
> require_once(dirname(__FILE__).'/lib/IniConfig.php');
> -if (!defined('GFORGE') or !GFORGE) {
> - IniConfig(dirname(__FILE__)."/config/config.ini");
> -} else {
> - IniConfig(dirname(__FILE__)."/config/config-default.ini");
> -}
> +IniConfig(dirname(__FILE__)."/config/config.ini");
Hello Reini,
Was there really a problem with my code?
I cannot put my config.ini in Svn, so I used this trick.
What should I do?
Best regards,
Marc-Etienne
-- 
Marc-Etienne Vargenau
Alcatel-Lucent France, Route de Villejust, 91620 NOZAY, FRANCE
+33 (0)1 30 77 28 33, Mar...@al...
From: Marc-Etienne V. <Mar...@al...> - 2010年06月09日 08:32:46
Le 08/06/2010 17:56, Sébastien Le Callonnec a écrit :
> Hi All,
>
> I don’t know if this has been discussed in the past, but as more and
> more PHP5 stuff is likely to creep into the codebase that seemingly
> appears to break BC, should we consider setting up a specific branch?
>
> The static calls of functions that are not static is causing some
> errors, and if we want to fix them, the code will be littered with
> hideous if (php5) ... else ...
>
> Also, I have an implementation of PhpWiki Web services that actually
> work (never been able to get the one in place to work), but it uses
> SoapServer, so this would be php5-specific.
>
> What’s your take on this?
Hello Sébastien,
I am now running Phpwiki with PHP 5.3.2.
As PHP 4 is officially dead, I would be much in favor of
requiring PHP 5 for Phpwiki 1.4.0.
Reini, what is your opinion on this?
Best regards,
Marc-Etienne
-- 
Marc-Etienne Vargenau
Alcatel-Lucent France, Route de Villejust, 91620 NOZAY, FRANCE
+33 (0)1 30 77 28 33, Mar...@al...
From: Sébastien Le C. <sl...@ya...> - 2010年06月08日 15:57:02
Hi All,
I don’t know if this has been discussed in the past, but as more and 
more PHP5 stuff is likely to creep into the codebase that seemingly 
appears to break BC, should we consider setting up a specific branch?
The static calls of functions that are not static is causing some 
errors, and if we want to fix them, the code will be littered with 
hideous if (php5) ... else ...
Also, I have an implementation of PhpWiki Web services that actually 
work (never been able to get the one in place to work), but it uses 
SoapServer, so this would be php5-specific.
What’s your take on this?
Regards,
Seb
On 08/06/2010 09:22, ru...@us... wrote:
> Revision: 7493
> http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7493&view=rev
> Author: rurban
> Date: 2010年06月08日 08:22:56 +0000 (2010年6月08日)
>
> Log Message:
> -----------
> document new php5 version
>
> Modified Paths:
> --------------
> trunk/lib/HtmlElement.php
>
> Modified: trunk/lib/HtmlElement.php
> ===================================================================
> --- trunk/lib/HtmlElement.php	2010年06月08日 08:22:22 UTC (rev 7492)
> +++ trunk/lib/HtmlElement.php	2010年06月08日 08:22:56 UTC (rev 7493)
> @@ -4,6 +4,7 @@
> * @author: Jeff Dairiki
> *
> * This code is now php5 compatible. --2004年04月19日 23:51:43 rurban
> + * php-5.3 uses now HtmlElement5.php with public static
> *
> * Todo: Add support for a JavaScript backend, a php2js compiler.
> * HTML::div(array('onClick' => 'HTML::div(...)'))
>
>
> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> phpwiki-checkins mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpwiki-checkins
>
From: Marc-Etienne V. <Mar...@al...> - 2010年06月08日 13:23:56
Hello Reini,
Thank you for all your commits. Paging now seems to work for
me and this is really great.
I however have a new problem with the AllPages page: it now
shows many nonexistent pages (e.g. AbbeNormal) that seem to
come from the interwiki map.
Do you have the same problem? Can you please fix it?
Best regards,
Marc-Etienne
-- 
Marc-Etienne Vargenau
Alcatel-Lucent France, Route de Villejust, 91620 NOZAY, FRANCE
+33 (0)1 30 77 28 33, Mar...@al...
From: Reini U. <ru...@x-...> - 2010年06月07日 14:32:49
2010年6月7日 Reini Urban <ru...@x-...>:
> 2010年6月7日 Sébastien Le Callonnec <sl...@ya...>:
>> Changing the single-line comments (//) with /* ... */ in your split-up
>> broke the build I’m afraid, as within the comment (that contains the
>> script to generate the HTML class functions), there is a closing comment:
>>
>> public static function $tag (/*...*/) {"
>>
>> (That being said, thanks for applying the patch! ;) )
>
> Yes. Saw that afterwards. I've split it up now.
> However I haven't yet tested it.
>
> There are a lot more merges ahead.
FYI: The svn diff is 13.5kb and the diff to my local branch is 67Kb,
but the Sidebar theme is still not satisfactory.
Today it is raining, so I will continue in the evening also to get it
out finally.
-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/
From: Sébastien Le C. <sl...@ya...> - 2010年06月07日 14:23:02
Yes, I saw that. Good stuff!
Thanks a mil,
Seb
On 07/06/2010 15:11, Reini Urban wrote:
> 2010年6月7日 Sébastien Le Callonnec<sl...@ya...>:
>> Hi Reini,
>>
>>
>> Sorry for bothering again... This change seems also required in
>> lib/WikiTheme.php (see attachment).
>
> Sure.
> I've removed the require_once('lib/HtmlElement.php'); line from
> BlockParser.php, diff.php and WikiTheme.php, just not yet committed.
>
>> On 07/06/2010 11:37, ru...@us... wrote:
>>> Revision: 7471
>>> http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7471&view=rev
>>> Author: rurban
>>> Date: 2010年06月07日 10:37:33 +0000 (2010年6月07日)
>>>
>>> Log Message:
>>> -----------
>>> use special HtmlElement5.php with php-4 unparsable public static
>>> declaration
>>>
>>> Modified Paths:
>>> --------------
>>> trunk/lib/ErrorManager.php
>>>
>>> Modified: trunk/lib/ErrorManager.php
>>> ===================================================================
>>> --- trunk/lib/ErrorManager.php 2010年06月07日 10:36:03 UTC (rev 7470)
>>> +++ trunk/lib/ErrorManager.php 2010年06月07日 10:37:33 UTC (rev 7471)
>>> @@ -649,7 +649,11 @@
>>> }
>>> }
>>>
>>> -require_once(dirname(__FILE__).'/HtmlElement.php');
>>> +if (check_php_version(5,2)) {
>>> + require_once(dirname(__FILE__).'/HtmlElement5.php');
>>> +} else {
>>> + require_once(dirname(__FILE__).'/HtmlElement.php');
>>> +}
>>>
>>> if (!isset($GLOBALS['ErrorManager'])) {
>>> $GLOBALS['ErrorManager'] = new ErrorManager;
>
2010年6月7日 Sébastien Le Callonnec <sl...@ya...>:
> Hi Reini,
>
>
> Sorry for bothering again... This change seems also required in
> lib/WikiTheme.php (see attachment).
Sure.
I've removed the require_once('lib/HtmlElement.php'); line from
BlockParser.php, diff.php and WikiTheme.php, just not yet committed.
> On 07/06/2010 11:37, ru...@us... wrote:
>> Revision: 7471
>>      http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7471&view=rev
>> Author:  rurban
>> Date:   2010年06月07日 10:37:33 +0000 (2010年6月07日)
>>
>> Log Message:
>> -----------
>> use special HtmlElement5.php with php-4 unparsable public static
>> declaration
>>
>> Modified Paths:
>> --------------
>>   trunk/lib/ErrorManager.php
>>
>> Modified: trunk/lib/ErrorManager.php
>> ===================================================================
>> --- trunk/lib/ErrorManager.php 2010年06月07日 10:36:03 UTC (rev 7470)
>> +++ trunk/lib/ErrorManager.php 2010年06月07日 10:37:33 UTC (rev 7471)
>> @@ -649,7 +649,11 @@
>>   }
>> }
>>
>> -require_once(dirname(__FILE__).'/HtmlElement.php');
>> +if (check_php_version(5,2)) {
>> +  require_once(dirname(__FILE__).'/HtmlElement5.php');
>> +} else {
>> +  require_once(dirname(__FILE__).'/HtmlElement.php');
>> +}
>>
>> if (!isset($GLOBALS['ErrorManager'])) {
>>   $GLOBALS['ErrorManager'] = new ErrorManager;
-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/
From: Reini U. <ru...@x-...> - 2010年06月07日 13:43:48
2010年6月7日 Sébastien Le Callonnec <sl...@ya...>:
> Changing the single-line comments (//) with /* ... */ in your split-up
> broke the build I’m afraid, as within the comment (that contains the
> script to generate the HTML class functions), there is a closing comment:
>
> public static function $tag (/*...*/) {"
>
> (That being said, thanks for applying the patch! ;) )
Yes. Saw that afterwards. I've split it up now.
However I haven't yet tested it.
There are a lot more merges ahead.
-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/
From: Sébastien Le C. <sl...@ya...> - 2010年06月07日 09:04:06
Hi Reini,
Changing the single-line comments (//) with /* ... */ in your split-up 
broke the build I’m afraid, as within the comment (that contains the 
script to generate the HTML class functions), there is a closing comment:
public static function $tag (/*...*/) {"
(That being said, thanks for applying the patch! ;) )
Regards,
Seb
On 07/06/2010 09:12, ru...@us... wrote:
> Revision: 7466
> http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7466&view=rev
> Author: rurban
> Date: 2010年06月07日 08:12:29 +0000 (2010年6月07日)
>
> Log Message:
> -----------
> - Atom Parser and Feed Plugin
> with unit tests by S?195円?169円bastien Le Callonnec
> patches ID 3012033
> - HtmlElement5.php split up for php-5.3
>
> Modified Paths:
> --------------
> trunk/lib/HtmlElement.php
> trunk/lib/IniConfig.php
> trunk/lib/XmlParser.php
> trunk/tests/unit/test.php
>
> Added Paths:
> -----------
> trunk/lib/AtomParser.php
> trunk/lib/HtmlElement5.php
> trunk/lib/plugin/AtomFeed.php
> trunk/tests/unit/lib/AtomParserTest.php
> trunk/tests/unit/lib/plugin/AtomFeedTest.php
> trunk/tests/unit/lib/plugin/atom-example.xml
>
> Added: trunk/lib/AtomParser.php
> ===================================================================
> --- trunk/lib/AtomParser.php	 (rev 0)
> +++ trunk/lib/AtomParser.php	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -0,0 +1,257 @@
> +<?php // -*-php-*-
> +// $Id$
> +/*
> + * Copyright 2010 Sébastien Le Callonnec
> + *
> + * 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
> + */
> +/**
> + * This class is a poor-man Atom parser, it does no validation of the feed.
> + * The content of an entry ("payload") is not parsed but rather returned "as-is",
> + * as its format can be text, html or xhtml.
> + *
> + * @author: Sébastien Le Callonnec
> + */
> +require_once('lib/XmlParser.php');
> +
> +class AtomParser
> +extends XmlParser
> +{
> + // Feed
> + var $feed = array();
> + var $feed_title = '';
> + var $feed_links = array();
> + var $feed_subtitle = '';
> + var $feed_id = '';
> + var $feed_updated = '';
> + var $feed_authors = array();
> + var $feed_contributors = array();
> + var $generator = '';
> + var $icon = '';
> + var $rights = '';
> + var $logo = '';
> +
> + var $categories = array();
> +
> + var $authors = array();
> + var $contributors = array();
> +
> + // Author, Contributor
> + var $name = '';
> + var $email = '';
> + var $uri = '';
> +
> + // Entries
> + var $entries = array();
> + var $inside_entry = false;
> + var $title = '';
> + var $updated = '';
> + var $published = '';
> + var $id = '';
> + var $links = array();
> + var $summary = '';
> +
> + var $inside_content = false;
> + var $content = '';
> +
> + function tag_open($parser, $name, $attrs='') {
> + global $current_tag, $current_attrs;
> +
> + $current_tag = $name;
> + $current_attrs = $attrs;
> +
> + if ($name == "ENTRY") {
> + $this->inside_entry = true;
> + } elseif ($this->inside_content) {
> + $this->content .= $this->serialize_tag(strtolower($name), $attrs);
> + } elseif ($name == "CONTENT") {
> + $this->inside_content = true;
> + }
> + }
> +
> + function tag_close($parser, $name, $attrs='') {
> + if ($name == "AUTHOR") {
> + $an_author = $this->trim_data(array(
> + "name" => $this->name,
> + "email" => $this->email,
> + "uri" => $this->uri
> + ));
> + if ($this->inside_entry) {
> + $this->authors[] = $an_author;
> + } else {
> + $this->feed_authors[] = $an_author;
> + }
> + $this->name = '';
> + $this->email = '';
> + $this->uri = '';
> + } elseif ($name == "FEED") {
> + $this->feed[] = $this->trim_data(array(
> + "id" => $this->feed_id,
> + "title" => $this->feed_title,
> + "links" => $this->feed_links,
> + "subtitle" => $this->feed_subtitle,
> + "updated" => $this->feed_updated,
> + "generator" => $this->generator,
> + "icon" => $this->icon,
> + "rights" => $this->rights,
> + "logo" => $this->logo,
> + "authors" => $this->feed_authors,
> + "contributors" => $this->feed_contributors
> + ));
> + $this->feed_title = '';
> + $this->feed_id = '';
> + $this->feed_links = array();
> + $this->feed_subtitle = '';
> + $this->feed_updated = '';
> + $this->feed_authors = array();
> + $this->feed_contributors = array();
> + $this->generator = '';
> + $this->icon = '';
> + $this->rights = '';
> + $this->logo = '';
> + } elseif ($name == "ENTRY") {
> + $this->entries[] = $this->trim_data(array(
> + "id" => $this->id,
> + "title" => $this->title,
> + "updated" => $this->updated,
> + "links" => $this->links,
> + "published" => $this->published,
> + "content" => $this->content,
> + "summary" => $this->summary,
> + "authors" => $this->authors,
> + "contributors" => $this->contributors
> + ));
> + $this->id = '';
> + $this->title = '';
> + $this->updated = '';
> + $this->links = '';
> + $this->published = '';
> + $this->content = '';
> + $this->authors = array();
> + $this->contributors = array();
> + $this->inside_entry = false;
> + } elseif ($name == "CONTENT") {
> + $this->inside_content = false;
> + } elseif ($name == "CONTRIBUTOR") {
> + $a_contributor = $this->trim_data(array(
> + "name" => $this->name,
> + "email" => $this->email
> + ));
> + if ($this->inside_entry) {
> + $this->contributors[] = $a_contributor;
> + } else {
> + $this->feed_contributors[] = $a_contributor;
> + }
> + $this->name = '';
> + $this->email = '';
> + } elseif ($this->inside_content) {
> + $this->content .= "</" . strtolower($name) . ">";
> + }
> + }
> +
> + function cdata($parser, $data) {
> + global $current_tag, $current_attrs;
> +
> + if ($this->inside_content) {
> + $this->content .= $data;
> + } else {
> + switch ($current_tag) {
> + case "ID":
> + if ($this->inside_entry)
> + $this->id .= $data;
> + else
> + $this->feed_id .= $data;
> + break;
> + case "LINK":
> + $a_link = array();
> + foreach ($current_attrs as $k => $v) {
> + $a_link[strtolower($k)] = $v;
> + }
> + if ($this->inside_entry) {
> + $this->links[] = $a_link;
> + } else {
> + $this->feed_links[] = $a_link;
> + }
> + break;
> + case "NAME":
> + $this->name .= $data;
> + break;
> + case "EMAIL":
> + $this->email .= $data;
> + break;
> + case "TITLE" :
> + if ($this->inside_entry)
> + $this->title .= $data;
> + else
> + $this->feed_title .= $data;
> + break;
> + case "UPDATED":
> + if ($this->inside_entry)
> + $this->updated .= $data;
> + else
> + $this->feed_updated .= $data;
> + break;
> + case "SUBTITLE":
> + $this->feed_subtitle .= $data;
> + break;
> + case "PUBLISHED":
> + $this->published .= $data;
> + break;
> + case "SUMMARY":
> + $this->summary .= $data;
> + break;
> + case "URI":
> + $this->uri .= $data;
> + break;
> + case "GENERATOR":
> + $this->generator .= $data;
> + break;
> + case "ICON":
> + $this->icon .= $data;
> + break;
> + case "LOGO":
> + $this->logo .= $data;
> + break;
> + case "RIGHTS":
> + $this->rights .= $data;
> + break;
> + }
> + }
> + }
> +
> + private function trim_data($array) {
> + return array_map(array("self", "trim_element"), $array);
> + }
> +
> + private function trim_element($element) {
> + if (is_array($element)) {
> + return $this->trim_data($element);
> + } elseif (is_string($element)) {
> + return trim($element);
> + }
> + }
> +
> + private function serialize_tag($tag_name, $attributes) {
> + $tag = "<" . $tag_name;
> + foreach ($attributes as $k => $v) {
> + $tag .= " " . strtolower($k). "=\"$v\"";
> + }
> + $tag .= ">";
> + return $tag;
> + }
> +}
> +?>
>
>
> Property changes on: trunk/lib/AtomParser.php
> ___________________________________________________________________
> Added: svn:keywords
> + Id
>
> Modified: trunk/lib/HtmlElement.php
> ===================================================================
> --- trunk/lib/HtmlElement.php	2010年06月04日 14:46:09 UTC (rev 7465)
> +++ trunk/lib/HtmlElement.php	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -87,12 +87,17 @@
> if (!empty($this->_attr['title'])) {
> 	 if (preg_match("/\[(alt-)?(.)\]$/", $this->_attr['title'], $m))
> 	 {
> -		$this->_attr['title'] = preg_replace("/\[(alt-)?(.)\]$/", "[".$WikiTheme->tooltipAccessKeyPrefix()."-\2円]", $this->_attr['title']);
> +		$this->_attr['title'] = preg_replace
> + ("/\[(alt-)?(.)\]$/",
> + "[".$WikiTheme->tooltipAccessKeyPrefix()."-\2円]",
> + $this->_attr['title']);
> 	 } else {
> -		$this->_attr['title'] .= " [".$WikiTheme->tooltipAccessKeyPrefix()."-$key]";
> +		$this->_attr['title'] .=
> + " [".$WikiTheme->tooltipAccessKeyPrefix()."-$key]";
> 	 }
> 	} else {
> -	 $this->_attr['title'] = "[".$WikiTheme->tooltipAccessKeyPrefix()."-$key]";
> +	 $this->_attr['title'] =
> + "[".$WikiTheme->tooltipAccessKeyPrefix()."-$key]";
> 	}
> }
>
> @@ -142,39 +147,43 @@
>
> //
> // Shell script to generate the following static methods:
> - //
> - // #!/bin/sh
> - // function mkfuncs () {
> - // for tag in "$@"
> - // do
> - // echo " function $tag (/*...*/) {"
> - // echo " \$el = new HtmlElement('$tag');"
> - // echo " return \$el->_init2(func_get_args());"
> - // echo " }"
> - // done
> - // }
> - // d='
> - // /****************************************/'
> - // mkfuncs link meta style script noscript
> - // echo "$d"
> - // mkfuncs a img br span
> - // echo "$d"
> - // mkfuncs h1 h2 h3 h4 h5 h6
> - // echo "$d"
> - // mkfuncs hr div p pre blockquote
> - // echo "$d"
> - // mkfuncs em strong small
> - // echo "$d"
> - // mkfuncs tt u sup sub
> - // echo "$d"
> - // mkfuncs ul ol dl li dt dd
> - // echo "$d"
> - // mkfuncs table caption thead tbody tfoot tr td th colgroup col
> - // echo "$d"
> - // mkfuncs form input option select textarea
> - // echo "$d"
> - // mkfuncs area map frame frameset iframe nobody
> +/*
>
> +#!/bin/sh
> +mkfuncs () {
> + for tag in "$@"
> + do
> + echo " public static function $tag (/*...*/) {"
> + echo " \$el = new HtmlElement('$tag');"
> + echo " return \$el->_init2(func_get_args());"
> + echo " }"
> + done
> +}
> +d='
> + /****************************************/'
> +mkfuncs link meta style script noscript
> +echo "$d"
> +mkfuncs a img br span
> +echo "$d"
> +mkfuncs h1 h2 h3 h4 h5 h6
> +echo "$d"
> +mkfuncs hr div p pre blockquote
> +echo "$d"
> +mkfuncs em strong small
> +echo "$d"
> +mkfuncs tt u sup sub
> +echo "$d"
> +mkfuncs ul ol dl li dt dd
> +echo "$d"
> +mkfuncs table caption thead tbody tfoot tr td th colgroup col
> +echo "$d"
> +mkfuncs form input option select textarea label fieldset legend
> +echo "$d"
> +mkfuncs area map frame frameset iframe nobody object embed param
> +echo "$d"
> +mkfuncs video
> +*/
> +
> function link (/*...*/) {
> $el = new HtmlElement('link');
> return $el->_init2(func_get_args());
>
> Added: trunk/lib/HtmlElement5.php
> ===================================================================
> --- trunk/lib/HtmlElement5.php	 (rev 0)
> +++ trunk/lib/HtmlElement5.php	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -0,0 +1,593 @@
> +<?php // rcs_id('$Id$');
> +/**
> + * Code for writing the HTML subset of XML.
> + * @author: Jeff Dairiki
> + *
> + * This code is now php5 compatible. --2004年04月19日 23:51:43 rurban
> + * Specialized for php-5.3: added public static 2010年06月07日 09:51:37 rurban
> + *
> + * Todo: Add support for a JavaScript backend, a php2js compiler.
> + * HTML::div(array('onclick' => 'HTML::div(...)'))
> + */
> +if (!class_exists("XmlElement"))
> + require_once(dirname(__FILE__)."/XmlElement.php");
> +if (class_exists("HtmlElement"))
> + return;
> +
> +/**
> + * An XML element.
> + */
> +//apd_set_session_trace(35);
> +
> +class HtmlElement extends XmlElement
> +{
> + function __construct ($tagname /* , $attr_or_content , ...*/) {
> + $this->_init(func_get_args());
> + $this->_properties = HTML::getTagProperties($tagname);
> + }
> +
> + function _init ($args) {
> + if (!is_array($args))
> + $args = func_get_args();
> +
> + assert(count($args)>= 1);
> + assert(is_string($args[0]));
> + $this->_tag = array_shift($args);
> +
> + if ($args&& is_array($args[0]))
> + $this->_attr = array_shift($args);
> + else {
> + $this->_attr = array();
> + if ($args&& $args[0] === false)
> + array_shift($args);
> + }
> + $this->setContent($args);
> + $this->_properties = HTML::getTagProperties($this->_tag);
> + }
> +
> + /**
> + * @access protected
> + * This is used by the static factory methods is class HTML.
> + */
> + function _init2 ($args) {
> + if ($args) {
> + if (is_array($args[0]))
> + $this->_attr = array_shift($args);
> + elseif ($args[0] === false)
> + array_shift($args);
> + }
> +
> + if (count($args) == 1&& is_array($args[0]))
> + $args = $args[0];
> + $this->_content = $args;
> + return $this;
> + }
> +
> + /** Add a "tooltip" to an element.
> + *
> + * @param $tooltip_text string The tooltip text.
> + */
> + function addTooltip ($tooltip_text, $accesskey = null) {
> + $this->setAttr('title', $tooltip_text);
> +	if ($accesskey) $this->setAccesskey($accesskey);
> +
> + // FIXME: this should be initialized from title by an onLoad() function.
> + // (though, that may not be possible.)
> + $qtooltip = str_replace("'", "\\'", $tooltip_text);
> + $this->setAttr('onmouseover',
> + sprintf('window.status="%s"; return true;',
> + addslashes($tooltip_text)));
> + $this->setAttr('onmouseout', "window.status='';return true;");
> + }
> +
> + function setAccesskey ($key) {
> +	global $WikiTheme;
> +	if (strlen($key) != 1) return;
> +	$this->setAttr("accesskey", $key);
> +
> + if (!empty($this->_attr['title'])) {
> +	 if (preg_match("/\[(alt-)?(.)\]$/", $this->_attr['title'], $m))
> +	 {
> +		$this->_attr['title'] = preg_replace
> + ("/\[(alt-)?(.)\]$/",
> + "[".$WikiTheme->tooltipAccessKeyPrefix()."-\2円]",
> + $this->_attr['title']);
> +	 } else {
> +		$this->_attr['title'] .=
> + " [".$WikiTheme->tooltipAccessKeyPrefix()."-$key]";
> +	 }
> +	} else {
> +	 $this->_attr['title'] =
> + "[".$WikiTheme->tooltipAccessKeyPrefix()."-$key]";
> +	}
> + }
> +
> + function emptyTag () {
> + if (($this->_properties& HTMLTAG_EMPTY) == 0)
> + return $this->startTag() . "</$this->_tag>";
> +
> + return substr($this->startTag(), 0, -1) . " />";
> + }
> +
> + function hasInlineContent () {
> + return ($this->_properties& HTMLTAG_ACCEPTS_INLINE) != 0;
> + }
> +
> + function isInlineElement () {
> + return ($this->_properties& HTMLTAG_INLINE) != 0;
> + }
> +};
> +
> +function HTML (/* $content, ... */) {
> + return new XmlContent(func_get_args());
> +}
> +
> +class HTML extends HtmlElement {
> + public static function raw ($html_text) {
> + return new RawXml($html_text);
> + }
> +
> + function getTagProperties($tag) {
> + $props =&$GLOBALS['HTML_TagProperties'];
> + return isset($props[$tag]) ? $props[$tag] : 0;
> + }
> +
> + function _setTagProperty($prop_flag, $tags) {
> + $props =&$GLOBALS['HTML_TagProperties'];
> + if (is_string($tags))
> + $tags = preg_split('/\s+/', $tags);
> + foreach ($tags as $tag) {
> + $tag = trim($tag);
> + if ($tag)
> + if (isset($props[$tag]))
> + $props[$tag] |= $prop_flag;
> + else
> + $props[$tag] = $prop_flag;
> + }
> + }
> +
> + //
> + // Shell script to generate the following static methods:
> +/*
> +
> +#!/bin/sh
> +mkfuncs () {
> + for tag in "$@"
> + do
> + echo " public static function $tag (/*...*/) {"
> + echo " \$el = new HtmlElement('$tag');"
> + echo " return \$el->_init2(func_get_args());"
> + echo " }"
> + done
> +}
> +d='
> + /****************************************/'
> +mkfuncs link meta style script noscript
> +echo "$d"
> +mkfuncs a img br span
> +echo "$d"
> +mkfuncs h1 h2 h3 h4 h5 h6
> +echo "$d"
> +mkfuncs hr div p pre blockquote
> +echo "$d"
> +mkfuncs em strong small
> +echo "$d"
> +mkfuncs tt u sup sub
> +echo "$d"
> +mkfuncs ul ol dl li dt dd
> +echo "$d"
> +mkfuncs table caption thead tbody tfoot tr td th colgroup col
> +echo "$d"
> +mkfuncs form input option select textarea label fieldset legend
> +echo "$d"
> +mkfuncs area map frame frameset iframe nobody object embed param
> +echo "$d"
> +mkfuncs video
> +*/
> +
> + public static function link (/*...*/) {
> + $el = new HtmlElement('link');
> + return $el->_init2(func_get_args());
> + }
> + public static function meta (/*...*/) {
> + $el = new HtmlElement('meta');
> + return $el->_init2(func_get_args());
> + }
> + public static function style (/*...*/) {
> + $el = new HtmlElement('style');
> + return $el->_init2(func_get_args());
> + }
> + public static function script (/*...*/) {
> + $el = new HtmlElement('script');
> + return $el->_init2(func_get_args());
> + }
> + public static function noscript (/*...*/) {
> + $el = new HtmlElement('noscript');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function a (/*...*/) {
> + $el = new HtmlElement('a');
> + return $el->_init2(func_get_args());
> + }
> + public static function img (/*...*/) {
> + $el = new HtmlElement('img');
> + return $el->_init2(func_get_args());
> + }
> + public static function br (/*...*/) {
> + $el = new HtmlElement('br');
> + return $el->_init2(func_get_args());
> + }
> + public static function span (/*...*/) {
> + $el = new HtmlElement('span');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function h1 (/*...*/) {
> + $el = new HtmlElement('h1');
> + return $el->_init2(func_get_args());
> + }
> + public static function h2 (/*...*/) {
> + $el = new HtmlElement('h2');
> + return $el->_init2(func_get_args());
> + }
> + public static function h3 (/*...*/) {
> + $el = new HtmlElement('h3');
> + return $el->_init2(func_get_args());
> + }
> + public static function h4 (/*...*/) {
> + $el = new HtmlElement('h4');
> + return $el->_init2(func_get_args());
> + }
> + public static function h5 (/*...*/) {
> + $el = new HtmlElement('h5');
> + return $el->_init2(func_get_args());
> + }
> + public static function h6 (/*...*/) {
> + $el = new HtmlElement('h6');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function hr (/*...*/) {
> + $el = new HtmlElement('hr');
> + return $el->_init2(func_get_args());
> + }
> + public static function div (/*...*/) {
> + $el = new HtmlElement('div');
> + return $el->_init2(func_get_args());
> + }
> + public static function p (/*...*/) {
> + $el = new HtmlElement('p');
> + return $el->_init2(func_get_args());
> + }
> + public static function pre (/*...*/) {
> + $el = new HtmlElement('pre');
> + return $el->_init2(func_get_args());
> + }
> + public static function blockquote (/*...*/) {
> + $el = new HtmlElement('blockquote');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function em (/*...*/) {
> + $el = new HtmlElement('em');
> + return $el->_init2(func_get_args());
> + }
> + public static function strong (/*...*/) {
> + $el = new HtmlElement('strong');
> + return $el->_init2(func_get_args());
> + }
> + public static function small (/*...*/) {
> + $el = new HtmlElement('small');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function tt (/*...*/) {
> + $el = new HtmlElement('tt');
> + return $el->_init2(func_get_args());
> + }
> + public static function u (/*...*/) {
> + $el = new HtmlElement('u');
> + return $el->_init2(func_get_args());
> + }
> + public static function sup (/*...*/) {
> + $el = new HtmlElement('sup');
> + return $el->_init2(func_get_args());
> + }
> + public static function sub (/*...*/) {
> + $el = new HtmlElement('sub');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function ul (/*...*/) {
> + $el = new HtmlElement('ul');
> + return $el->_init2(func_get_args());
> + }
> + public static function ol (/*...*/) {
> + $el = new HtmlElement('ol');
> + return $el->_init2(func_get_args());
> + }
> + public static function dl (/*...*/) {
> + $el = new HtmlElement('dl');
> + return $el->_init2(func_get_args());
> + }
> + public static function li (/*...*/) {
> + $el = new HtmlElement('li');
> + return $el->_init2(func_get_args());
> + }
> + public static function dt (/*...*/) {
> + $el = new HtmlElement('dt');
> + return $el->_init2(func_get_args());
> + }
> + public static function dd (/*...*/) {
> + $el = new HtmlElement('dd');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function table (/*...*/) {
> + $el = new HtmlElement('table');
> + return $el->_init2(func_get_args());
> + }
> + public static function caption (/*...*/) {
> + $el = new HtmlElement('caption');
> + return $el->_init2(func_get_args());
> + }
> + public static function thead (/*...*/) {
> + $el = new HtmlElement('thead');
> + return $el->_init2(func_get_args());
> + }
> + public static function tbody (/*...*/) {
> + $el = new HtmlElement('tbody');
> + return $el->_init2(func_get_args());
> + }
> + public static function tfoot (/*...*/) {
> + $el = new HtmlElement('tfoot');
> + return $el->_init2(func_get_args());
> + }
> + public static function tr (/*...*/) {
> + $el = new HtmlElement('tr');
> + return $el->_init2(func_get_args());
> + }
> + public static function td (/*...*/) {
> + $el = new HtmlElement('td');
> + return $el->_init2(func_get_args());
> + }
> + public static function th (/*...*/) {
> + $el = new HtmlElement('th');
> + return $el->_init2(func_get_args());
> + }
> + public static function colgroup (/*...*/) {
> + $el = new HtmlElement('colgroup');
> + return $el->_init2(func_get_args());
> + }
> + public static function col (/*...*/) {
> + $el = new HtmlElement('col');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function form (/*...*/) {
> + $el = new HtmlElement('form');
> + return $el->_init2(func_get_args());
> + }
> + public static function input (/*...*/) {
> + $el = new HtmlElement('input');
> + return $el->_init2(func_get_args());
> + }
> + public static function button (/*...*/) {
> + $el = new HtmlElement('button');
> + return $el->_init2(func_get_args());
> + }
> + public static function option (/*...*/) {
> + $el = new HtmlElement('option');
> + return $el->_init2(func_get_args());
> + }
> + public static function select (/*...*/) {
> + $el = new HtmlElement('select');
> + return $el->_init2(func_get_args());
> + }
> + public static function textarea (/*...*/) {
> + $el = new HtmlElement('textarea');
> + return $el->_init2(func_get_args());
> + }
> + public static function label (/*...*/) {
> + $el = new HtmlElement('label');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function area (/*...*/) {
> + $el = new HtmlElement('area');
> + return $el->_init2(func_get_args());
> + }
> + public static function map (/*...*/) {
> + $el = new HtmlElement('map');
> + return $el->_init2(func_get_args());
> + }
> + public static function frame (/*...*/) {
> + $el = new HtmlElement('frame');
> + return $el->_init2(func_get_args());
> + }
> + public static function frameset (/*...*/) {
> + $el = new HtmlElement('frameset');
> + return $el->_init2(func_get_args());
> + }
> + public static function iframe (/*...*/) {
> + $el = new HtmlElement('iframe');
> + return $el->_init2(func_get_args());
> + }
> + public static function nobody (/*...*/) {
> + $el = new HtmlElement('nobody');
> + return $el->_init2(func_get_args());
> + }
> + public static function object (/*...*/) {
> + $el = new HtmlElement('object');
> + return $el->_init2(func_get_args());
> + }
> + public static function embed (/*...*/) {
> + $el = new HtmlElement('embed');
> + return $el->_init2(func_get_args());
> + }
> + public static function param (/*...*/) {
> + $el = new HtmlElement('param');
> + return $el->_init2(func_get_args());
> + }
> + public static function fieldset (/*...*/) {
> + $el = new HtmlElement('fieldset');
> + return $el->_init2(func_get_args());
> + }
> + public static function legend (/*...*/) {
> + $el = new HtmlElement('legend');
> + return $el->_init2(func_get_args());
> + }
> +
> + /****************************************/
> + public static function video (/*...*/) {
> + $el = new HtmlElement('video');
> + return $el->_init2(func_get_args());
> + }
> +}
> +
> +define('HTMLTAG_EMPTY', 1);
> +define('HTMLTAG_INLINE', 2);
> +define('HTMLTAG_ACCEPTS_INLINE', 4);
> +
> +
> +HTML::_setTagProperty(HTMLTAG_EMPTY,
> + 'area base basefont br col frame hr img input isindex link meta param');
> +HTML::_setTagProperty(HTMLTAG_ACCEPTS_INLINE,
> + // %inline elements:
> + 'b big i small tt ' // %fontstyle
> + . 's strike u ' // (deprecated)
> + . 'abbr acronym cite code dfn em kbd samp strong var ' //%phrase
> + . 'a img object embed br script map q sub sup span bdo '//%special
> + . 'button input label option select textarea label ' //%formctl
> +
> + // %block elements which contain inline content
> + . 'address h1 h2 h3 h4 h5 h6 p pre '
> + // %block elements which contain either block or inline content
> + . 'div fieldset frameset'
> +
> + // other with inline content
> + . 'caption dt label legend video '
> + // other with either inline or block
> + . 'dd del ins li td th colgroup');
> +
> +HTML::_setTagProperty(HTMLTAG_INLINE,
> + // %inline elements:
> + 'b big i small tt ' // %fontstyle
> + . 's strike u ' // (deprecated)
> + . 'abbr acronym cite code dfn em kbd samp strong var ' //%phrase
> + . 'a img object br script map q sub sup span bdo '//%special
> + . 'button input label option select textarea ' //%formctl
> + . 'nobody iframe'
> + );
> +
> +/**
> + * Generate hidden form input fields.
> + *
> + * @param $query_args hash A hash mapping names to values for the hidden inputs.
> + * Values in the hash can themselves be hashes. The will result in hidden inputs
> + * which will reconstruct the nested structure in the resulting query args as
> + * processed by PHP.
> + *
> + * Example:
> + *
> + * $args = array('x' => '2',
> + * 'y' => array('a' => 'aval', 'b' => 'bval'));
> + * $inputs = HiddenInputs($args);
> + *
> + * Will result in:
> + *
> + *<input type="hidden" name="x" value = "2" />
> + *<input type="hidden" name="y[a]" value = "aval" />
> + *<input type="hidden" name="y[b]" value = "bval" />
> + *
> + * @return object An XmlContent object containing the inputs.
> + */
> +function HiddenInputs ($query_args, $pfx = false, $exclude = array()) {
> + $inputs = HTML();
> +
> + foreach ($query_args as $key => $val) {
> + if (in_array($key, $exclude)) continue;
> + $name = $pfx ? $pfx . "[$key]" : $key;
> + if (is_array($val))
> + $inputs->pushContent(HiddenInputs($val, $name));
> + else
> + $inputs->pushContent(HTML::input(array('type' => 'hidden',
> + 'name' => $name,
> + 'value' => $val)));
> + }
> + return $inputs;
> +}
> +
> +
> +/** Generate a<script> tag containing javascript.
> + *
> + * @param string $js The javascript.
> + * @param string $script_args (optional) hash of script tags options
> + * e.g. to provide another version or the defer attr
> + * @return HtmlElement A<script> element.
> + */
> +function JavaScript ($js, $script_args = false) {
> + $default_script_args = array(//'version' => 'JavaScript', // not xhtml conformant
> + 'type' => 'text/javascript');
> + $script_args = $script_args ? array_merge($default_script_args, $script_args)
> + : $default_script_args;
> + if (empty($js))
> + return HTML(HTML::script($script_args),"\n");
> + else
> + // see http://devedge.netscape.com/viewsource/2003/xhtml-style-script/
> + return HTML(HTML::script($script_args,
> + new RawXml((ENABLE_XHTML_XML ? "\n//<![CDATA[" : "\n<!--//")
> + . "\n".trim($js)."\n"
> + . (ENABLE_XHTML_XML ? "//]]>\n" : "// -->"))),"\n");
> +}
> +
> +/** Conditionally display content based of whether javascript is supported.
> + *
> + * This conditionally (on the client side) displays one of two alternate
> + * contents depending on whether the client supports javascript.
> + *
> + * NOTE:
> + * The content you pass as arguments to this function must be block-level.
> + * (This is because the<noscript> tag is block-level.)
> + *
> + * @param mixed $if_content Content to display if the browser supports
> + * javascript.
> + *
> + * @param mixed $else_content Content to display if the browser does
> + * not support javascript.
> + *
> + * @return XmlContent
> + */
> +function IfJavaScript($if_content = false, $else_content = false) {
> + $html = array();
> + if ($if_content) {
> + $xml = AsXML($if_content);
> + $js = sprintf('document.write("%s");',
> + addcslashes($xml, "0円..37円!@\\177円..377円"));
> + $html[] = JavaScript($js);
> + }
> + if ($else_content) {
> + $html[] = HTML::noscript(false, $else_content);
> + }
> + return HTML($html);
> +}
> +
> +// (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:
> +?>
>
>
> Property changes on: trunk/lib/HtmlElement5.php
> ___________________________________________________________________
> Added: svn:keywords
> + Id
>
> Modified: trunk/lib/IniConfig.php
> ===================================================================
> --- trunk/lib/IniConfig.php	2010年06月04日 14:46:09 UTC (rev 7465)
> +++ trunk/lib/IniConfig.php	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -154,7 +154,7 @@
> 'PLUGIN_CACHED_DATABASE', 'PLUGIN_CACHED_FILENAME_PREFIX',
> 'PLUGIN_CACHED_HIGHWATER', 'PLUGIN_CACHED_LOWWATER', 'PLUGIN_CACHED_MAXLIFETIME',
> 'PLUGIN_CACHED_MAXARGLEN', 'PLUGIN_CACHED_IMGTYPES',
> - 'WYSIWYG_BACKEND',
> + 'WYSIWYG_BACKEND', 'PLUGIN_MARKUP_MAP',
> // extra logic:
> 'SERVER_NAME','SERVER_PORT','SCRIPT_NAME', 'DATA_PATH', 'PHPWIKI_DIR', 'VIRTUAL_PATH',
> 	 'EXTERNAL_HTML2PDF_PAGELIST', 'PLUGIN_CACHED_CACHE_DIR'
> @@ -196,7 +196,8 @@
> 'BLOG_DEFAULT_EMPTY_PREFIX', 'DATABASE_PERSISTENT',
> 'ENABLE_DISCUSSION_LINK', 'ENABLE_CAPTCHA',
> 'ENABLE_WYSIWYG', 'WYSIWYG_DEFAULT_PAGETYPE_HTML',
> - 'DISABLE_MARKUP_WIKIWORD', 'ENABLE_MARKUP_COLOR',
> + 'DISABLE_MARKUP_WIKIWORD', 'ENABLE_MARKUP_COLOR', 'ENABLE_MARKUP_TEMPLATE',
> + 'ENABLE_MARKUP_MEDIAWIKI_TABLE',
> 'ENABLE_MARKUP_DIVSPAN', 'USE_BYTEA', 'UPLOAD_USERDIR', 'DISABLE_UNITS',
> 	 'ENABLE_SEARCHHIGHLIGHT', 'DISABLE_UPLOAD_ONLY_ALLOWED_EXTENSIONS',
> 'ENABLE_AUTH_OPENID', 'INSECURE_ACTIONS_LOCALHOST_ONLY',
> @@ -418,6 +419,18 @@
> in_array(DATABASE_TYPE, array('SQL','ADODB','PDO')) ? 2 : 0);
> }
>
> + global $PLUGIN_MARKUP_MAP;
> + $PLUGIN_MARKUP_MAP = array();
> + if (defined('PLUGIN_MARKUP_MAP') and trim(PLUGIN_MARKUP_MAP) != "") {
> +	$_map = preg_split('/\s+/', PLUGIN_MARKUP_MAP);
> +	foreach ($_map as $v) {
> +	 list($xml,$plugin) = split(':', $v);
> +	 if (!empty($xml) and !empty($plugin))
> +	 $PLUGIN_MARKUP_MAP[$xml] = $plugin;
> +	}
> +	unset($_map); unset($xml); unset($plugin); unset($v);
> + }
> +
> if (empty($rs['TEMP_DIR'])) {
> 	$rs['TEMP_DIR'] = "/tmp";
> 	if (getenv("TEMP"))
> @@ -633,6 +646,7 @@
> $AllAllowedPlugins = $ActionPages;
> // Add plugins that have no corresponding action page
> $AllAllowedPlugins[] = 'AsciiSVG';
> + $AllAllowedPlugins[] = 'AtomFeed';
> $AllAllowedPlugins[] = 'BoxRight';
> $AllAllowedPlugins[] = 'CalendarList';
> $AllAllowedPlugins[] = 'Calendar';
>
> Modified: trunk/lib/XmlParser.php
> ===================================================================
> --- trunk/lib/XmlParser.php	2010年06月04日 14:46:09 UTC (rev 7465)
> +++ trunk/lib/XmlParser.php	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -56,8 +56,10 @@
> $this->_parser = xml_parser_create($encoding);
> else
> $this->_parser = xml_parser_create();
> -	xml_parser_set_option($this->_parser, XML_OPTION_TARGET_ENCODING, $GLOBALS['charset']);
> - //xml_set_object($this->_parser,&$this);
> +
> + if (isset($GLOBALS['charset']))
> + xml_parser_set_option($this->_parser, XML_OPTION_TARGET_ENCODING, $GLOBALS['charset']);
> +
> xml_set_element_handler($this->_parser,
> array(&$this, 'tag_open'),
> array(&$this, 'tag_close' ));
>
> Added: trunk/lib/plugin/AtomFeed.php
> ===================================================================
> --- trunk/lib/plugin/AtomFeed.php	 (rev 0)
> +++ trunk/lib/plugin/AtomFeed.php	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -0,0 +1,85 @@
> +<?php // -*-php-*-
> +// $Id$
> +/*
> + * Copyright 2010 Sébastien Le Callonnec
> + *
> + * 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
> +*/
> +/**
> + * @author: Sébastien Le Callonnec
> + */
> +require_once('lib/WikiPlugin.php');
> +require_once('lib/AtomParser.php');
> +
> +class WikiPlugin_AtomFeed
> +extends WikiPlugin
> +{
> + function getName() {
> + return _('AtomFeed');
> + }
> +
> + function getDescription() {
> + return _('Atom Aggregator Plugin');
> + }
> +
> + function getDefaultArguments() {
> + return array(
> + 'feed' => "",
> + 'description' => "",
> + 'url' => "",
> + 'maxitem' => 0,
> + 'titleonly' => false
> + );
> + }
> +
> + function run($dbi, $argstr,&$request, $basepage) {
> + extract($this->getArgs($argstr, $request));
> + $parser = new AtomParser();
> +
> + assert(!empty($url));
> + $parser->parse_url($url);
> +
> + $html = '';
> +
> + $items = HTML::dl();
> + foreach ($parser->feed as $feed) {
> + $title = HTML::h3(HTML::a(array('href' => $feed["links"]["0"]["href"]), $feed["title"]));
> + $counter = 1;
> + foreach($parser->entries as $entry) {
> + $item = HTML::dt(HTML::a(array('href' => $entry["links"]["0"]["href"]), $entry["title"]));
> + $items->pushContent($item);
> +
> + if (!$titleonly) {
> + $description = HTML::dd(HTML::raw(html_entity_decode($entry["content"])));
> + } else {
> + $description = HTML::dd();
> + }
> + $items->pushContent($description);
> +
> + if ($maxitem> 0&& $counter>= $maxitem) {
> + break;
> + }
> + $counter++;
> + }
> + $html = HTML::div(array('class'=> 'rss'), $title);
> + $html->pushContent($items);
> + }
> +
> + return $html;
> + }
> +}
> +?>
> \ No newline at end of file
>
>
> Property changes on: trunk/lib/plugin/AtomFeed.php
> ___________________________________________________________________
> Added: svn:keywords
> + Id
>
> Added: trunk/tests/unit/lib/AtomParserTest.php
> ===================================================================
> --- trunk/tests/unit/lib/AtomParserTest.php	 (rev 0)
> +++ trunk/tests/unit/lib/AtomParserTest.php	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -0,0 +1,220 @@
> +<?php
> +// $Id$
> +/*
> + * Copyright 2010 Sébastien Le Callonnec
> + *
> + * 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
> + */
> +/**
> + * @author: Sébastien Le Callonnec
> + */
> +require_once('lib/AtomParser.php');
> +require_once('PHPUnit/Framework.php');
> +
> +class AtomParserTest
> +extends phpwiki_TestCase
> +{
> + function testSimpleAtomFileParsing() {
> + $fake_atom_file =<<<ATOM
> +<?xml version="1.0" encoding="utf-8"?>
> +<feed xmlns="http://www.w3.org/2005/Atom"
> + xmlns:georss="http://www.georss.org/georss">
> +<link href="http://www.phpwiki.org/fakeurl" rel="self" type="application/atom+xml" />
> +<title>This is a fake feed</title>
> +<updated>2010年05月15日T01:00:00Z</updated>
> +<id>http://www.phpwiki.org/fakeurl</id>
> +<subtitle>Cool feed</subtitle>
> +<author>
> +<name>Sébastien Le Callonnec</name>
> +<email>sl...@ya...</email>
> +</author>
> +
> +<entry>
> +<title>Foobar Éire</title>
> +<link href="http://maps.google.com/maps?f=q&amp;sll=53.125728,-6.068907&amp;ie=UTF8"/>
> +<content type="xhtml">
> +<div xmlns="http://www.w3.org/1999/xhtml">Millenium Spire, Dublin
> +<div class="geo">Geo coordinates:
> +<abbr class="latitude" title="53.349441">53.349441</abbr>
> +<abbr class="longitude" title="-6.260282">-6.260282</abbr>
> +</div>
> +</div>
> +</content>
> +<updated>2010年05月15日T01:00:00Z</updated>
> +<published>2010年05月15日T01:00:00Z</published>
> +<georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
> +<id>tag:www.phpwiki.org,2010年05月15日:/fakeurl/20100515223621</id>
> +</entry>
> +
> +</feed>
> +ATOM;
> + $parser = new AtomParser();
> + $parser->parse($fake_atom_file);
> +
> + $this->assertFalse(count($parser->feed) == 0);
> +
> + $current_feed = $parser->feed[0];
> + $this->assertEquals("This is a fake feed", $current_feed["title"]);
> +
> + $this->assertFalse(count($current_feed["links"]) == 0);
> + $this->assertEquals("http://www.phpwiki.org/fakeurl", $current_feed["links"][0]["href"]);
> + $this->assertEquals("Cool feed", $current_feed["subtitle"]);
> + $this->assertEquals("2010-05-15T01:00:00Z", $current_feed["updated"]);
> +
> + $this->assertFalse(count($current_feed["authors"]) == 0);
> +
> + $current_author = $current_feed["authors"][0];
> + $this->assertEquals("Sébastien Le Callonnec", $current_author["name"]);
> + $this->assertEquals("sl...@ya...", $current_author["email"]);
> +
> + $this->assertFalse(count($parser->entries) == 0);
> +
> + $current_entry = $parser->entries[0];
> + $this->assertEquals("Foobar Éire", $current_entry["title"]);
> + $this->assertEquals("http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8", $current_entry["links"][0]["href"]);
> + $this->assertEquals("2010-05-15T01:00:00Z", $current_entry["updated"]);
> + $this->assertEquals("2010-05-15T01:00:00Z", $current_entry["published"]);
> + $this->assertEquals("tag:www.phpwiki.org,2010年05月15日:/fakeurl/20100515223621", $current_entry["id"]);
> +
> + $payload =<<<CONTENT
> +<div xmlns="http://www.w3.org/1999/xhtml">Millenium Spire, Dublin
> +<div class="geo">Geo coordinates:
> +<abbr class="latitude" title="53.349441">53.349441</abbr>
> +<abbr class="longitude" title="-6.260282">-6.260282</abbr>
> +</div>
> +</div>
> +CONTENT;
> + $this->assertEquals($payload, $current_entry["content"]);
> + }
> +
> + function testExtensiveAtomExampleFromRFC4287() {
> + $fake_atom_file =<<<ATOM
> +<?xml version="1.0" encoding="utf-8"?>
> +
> +<feed xmlns="http://www.w3.org/2005/Atom">
> +<title type="text">dive into mark</title>
> +<subtitle type="html">
> + A&lt;em&gt;lot&lt;/em&gt; of effort
> + went into making this effortless
> +</subtitle>
> +
> +<updated>2005年07月31日T12:29:29Z</updated>
> +<id>tag:example.org,2003:3</id>
> +<link rel="alternate" type="text/html"
> + hreflang="en" href="http://example.org/"/>
> +<link rel="self" type="application/atom+xml"
> + href="http://example.org/feed.atom"/>
> +<rights>Copyright (c) 2003, Mark Pilgrim</rights>
> +
> +<generator uri="http://www.example.com/" version="1.0">
> + Example Toolkit
> +</generator>
> +<entry>
> +<title>Atom draft-07 snapshot</title>
> +<link rel="alternate" type="text/html"
> + href="http://example.org/2005/04/02/atom"/>
> +
> +<link rel="enclosure" type="audio/mpeg" length="1337"
> + href="http://example.org/audio/ph34r_my_podcast.mp3"/>
> +<id>tag:example.org,2003:3.2397</id>
> +<updated>2005年07月31日T12:29:29Z</updated>
> +<published>2003年12月13日T08:29:29-04:00</published>
> +
> +<author>
> +<name>Mark Pilgrim</name>
> +<uri>http://example.org/</uri>
> +<email>f8...@ex...</email>
> +
> +</author>
> +<contributor>
> +<name>Sam Ruby</name>
> +</contributor>
> +<contributor>
> +
> +<name>Joe Gregorio</name>
> +</contributor>
> +<content type="xhtml" xml:lang="en"
> + xml:base="http://diveintomark.org/">
> +<div xmlns="http://www.w3.org/1999/xhtml">
> +<p><i>[Update: The Atom draft is finished.]</i></p>
> +
> +</div>
> +</content>
> +</entry>
> +</feed>
> +ATOM;
> + $parser = new AtomParser();
> + $parser->parse($fake_atom_file);
> +
> + $this->assertFalse(count($parser->feed) == 0);
> +
> + $current_feed = $parser->feed[0];
> + $this->assertEquals("dive into mark", $current_feed["title"]);
> + $this->assertEquals("Copyright (c) 2003, Mark Pilgrim", $current_feed["rights"]);
> + $this->assertEquals("A<em>lot</em> of effort\n went into making this effortless", $current_feed["subtitle"]);
> + $this->assertEquals("2005-07-31T12:29:29Z", $current_feed["updated"]);
> + $this->assertEquals("tag:example.org,2003:3", $current_feed["id"]);
> + $this->assertEquals("Example Toolkit", $current_feed["generator"]);
> +
> + $this->assertTrue(count($current_feed["authors"]) == 0);
> + $this->assertTrue(count($current_feed["contributors"]) == 0);
> +
> +
> + $this->assertFalse(count($parser->entries) == 0);
> +
> + $current_entry = $parser->entries[0];
> + $this->assertEquals("Atom draft-07 snapshot", $current_entry["title"]);
> + $this->assertEquals("2005-07-31T12:29:29Z", $current_entry["updated"]);
> + $this->assertEquals("2003-12-13T08:29:29-04:00", $current_entry["published"]);
> + $this->assertEquals("tag:example.org,2003:3.2397", $current_entry["id"]);
> + $this->assertEquals(2, count($current_entry["links"]));
> +
> + $this->assertTrue(count($current_entry["authors"]) == 1);
> + $this->assertTrue(count($current_entry["contributors"]) == 2);
> +
> + $current_author = $current_entry["authors"][0];
> + $this->assertEquals("Mark Pilgrim", $current_author["name"]);
> + $this->assertEquals("f8...@ex...", $current_author["email"]);
> +
> + $first_contributor = $current_entry["contributors"][0];
> + $second_contributor = $current_entry["contributors"][1];
> +
> + $this->assertEquals("Sam Ruby", $first_contributor["name"]);
> + $this->assertEquals("Joe Gregorio", $second_contributor["name"]);
> +
> + $first_link = $current_entry["links"][0];
> + $this->assertEquals("alternate", $first_link["rel"]);
> + $this->assertEquals("text/html", $first_link["type"]);
> + $this->assertEquals("http://example.org/2005/04/02/atom", $first_link["href"]);
> +
> + $second_link = $current_entry["links"][1];
> + $this->assertEquals("enclosure", $second_link["rel"]);
> + $this->assertEquals("audio/mpeg", $second_link["type"]);
> + $this->assertEquals("1337", $second_link["length"]);
> + $this->assertEquals("http://example.org/audio/ph34r_my_podcast.mp3", $second_link["href"]);
> +
> + $payload =<<<CONTENT
> +<div xmlns="http://www.w3.org/1999/xhtml">
> +<p><i>[Update: The Atom draft is finished.]</i></p>
> +
> +</div>
> +CONTENT;
> +
> + $this->assertEquals($payload, $current_entry["content"]);
> + }
> +}
> +?>
> \ No newline at end of file
>
>
> Property changes on: trunk/tests/unit/lib/AtomParserTest.php
> ___________________________________________________________________
> Added: svn:keywords
> + Id
>
> Added: trunk/tests/unit/lib/plugin/AtomFeedTest.php
> ===================================================================
> --- trunk/tests/unit/lib/plugin/AtomFeedTest.php	 (rev 0)
> +++ trunk/tests/unit/lib/plugin/AtomFeedTest.php	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -0,0 +1,80 @@
> +<?php
> +// $Id$
> +/*
> + * Copyright 2010 Sébastien Le Callonnec
> + *
> + * 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
> + */
> +/**
> + * @author: Sébastien Le Callonnec
> + */
> +require_once('lib/plugin/AtomFeed.php');
> +require_once('lib/AtomParser.php');
> +require_once('lib/HtmlElement.php');
> +
> +class AtomFeedTest
> +extends phpwiki_TestCase
> +{
> + var $atom_feed_plugin;
> +
> + public function setUp() {
> + parent::setUp();
> + $this->atom_feed_plugin = new WikiPlugin_AtomFeed();
> + }
> +
> + public function testRunMaxItem() {
> + global $request;
> + $expected_html =<<<EXPECTED
> +<div class="rss"><h3><a href="http://www.phpwiki.org/fakeurl">This is a fake feed</a></h3>
> +<dl>
> +<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire</a></dt>
> +<dd><div xmlns="http://www.w3.org/1999/xhtml">Millenium Spire, Dublin
> +<div class="geo">Geo coordinates:
> +<abbr class="latitude" title="53.349441">53.349441</abbr>
> +<abbr class="longitude" title="-6.260282">-6.260282</abbr>
> +</div>
> +</div></dd>
> +</dl>
> +</div>
> +EXPECTED;
> + $html = $this->atom_feed_plugin->run(null, 'url=file://' . dirname(__FILE__) . '/atom-example.xml maxitem=1', $request, '.');
> + $this->assertEquals($expected_html, trim(html_entity_decode($html->asXML())));
> + }
> +
> + public function testRunTitleOnly() {
> + global $request;
> + $expected_html =<<<EXPECTED
> +<div class="rss"><h3><a href="http://www.phpwiki.org/fakeurl">This is a fake feed</a></h3>
> +<dl>
> +<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire</a></dt>
> +<dd></dd>
> +<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire 2</a></dt>
> +<dd></dd>
> +<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire 3</a></dt>
> +<dd></dd>
> +<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire 4</a></dt>
> +<dd></dd>
> +<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire 5</a></dt>
> +<dd></dd>
> +</dl>
> +</div>
> +EXPECTED;
> + $html = $this->atom_feed_plugin->run(null, 'url=file://' . dirname(__FILE__) . '/atom-example.xml titleonly=true', $request, '.');
> + $this->assertEquals($expected_html, trim(html_entity_decode($html->asXML())));
> + }
> +}
> +?>
> \ No newline at end of file
>
>
> Property changes on: trunk/tests/unit/lib/plugin/AtomFeedTest.php
> ___________________________________________________________________
> Added: svn:keywords
> + Id
>
> Added: trunk/tests/unit/lib/plugin/atom-example.xml
> ===================================================================
> --- trunk/tests/unit/lib/plugin/atom-example.xml	 (rev 0)
> +++ trunk/tests/unit/lib/plugin/atom-example.xml	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -0,0 +1,94 @@
> +<?xml version="1.0" encoding="utf-8"?>
> +<feed xmlns="http://www.w3.org/2005/Atom"
> + xmlns:georss="http://www.georss.org/georss">
> +<link href="http://www.phpwiki.org/fakeurl" rel="self" type="application/atom+xml" />
> +<title>This is a fake feed</title>
> +<updated>2010年05月15日T01:00:00Z</updated>
> +<id>http://www.phpwiki.org/fakeurl</id>
> +<subtitle>Cool feed</subtitle>
> +<author>
> +<name>Sébastien Le Callonnec</name>
> +<email>sl...@ya...</email>
> +</author>
> +
> +<entry>
> +<title>Foobar Éire</title>
> +<link href="http://maps.google.com/maps?f=q&amp;sll=53.125728,-6.068907&amp;ie=UTF8"/>
> +<content type="xhtml">
> +<div xmlns="http://www.w3.org/1999/xhtml">Millenium Spire, Dublin
> +<div class="geo">Geo coordinates:
> +<abbr class="latitude" title="53.349441">53.349441</abbr>
> +<abbr class="longitude" title="-6.260282">-6.260282</abbr>
> +</div>
> +</div>
> +</content>
> +<updated>2010年05月15日T01:00:00Z</updated>
> +<published>2010年05月15日T01:00:00Z</published>
> +<georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
> +<id>tag:www.phpwiki.org,2010年05月15日:/fakeurl/20100515223621</id>
> +</entry>
> +<entry>
> +<title>Foobar Éire 2</title>
> +<link href="http://maps.google.com/maps?f=q&amp;sll=53.125728,-6.068907&amp;ie=UTF8"/>
> +<content type="xhtml">
> +<div xmlns="http://www.w3.org/1999/xhtml">Again Millenium Spire, Dublin
> +<div class="geo">Geo coordinates:
> +<abbr class="latitude" title="53.349441">53.349441</abbr>
> +<abbr class="longitude" title="-6.260282">-6.260282</abbr>
> +</div>
> +</div>
> +</content>
> +<updated>2010年05月15日T01:00:00Z</updated>
> +<published>2010年05月15日T01:00:00Z</published>
> +<georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
> +<id>tag:www.phpwiki.org,2010年05月15日:/fakeurl/20100515223622</id>
> +</entry>
> +<entry>
> +<title>Foobar Éire 3</title>
> +<link href="http://maps.google.com/maps?f=q&amp;sll=53.125728,-6.068907&amp;ie=UTF8"/>
> +<content type="xhtml">
> +<div xmlns="http://www.w3.org/1999/xhtml">Still Millenium Spire, Dublin
> +<div class="geo">Geo coordinates:
> +<abbr class="latitude" title="53.349441">53.349441</abbr>
> +<abbr class="longitude" title="-6.260282">-6.260282</abbr>
> +</div>
> +</div>
> +</content>
> +<updated>2010年05月15日T01:00:00Z</updated>
> +<published>2010年05月15日T01:00:00Z</published>
> +<georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
> +<id>tag:www.phpwiki.org,2010年05月15日:/fakeurl/20100515223623</id>
> +</entry>
> +<entry>
> +<title>Foobar Éire 4</title>
> +<link href="http://maps.google.com/maps?f=q&amp;sll=53.125728,-6.068907&amp;ie=UTF8"/>
> +<content type="xhtml">
> +<div xmlns="http://www.w3.org/1999/xhtml">Yet Again Millenium Spire, Dublin
> +<div class="geo">Geo coordinates:
> +<abbr class="latitude" title="53.349441">53.349441</abbr>
> +<abbr class="longitude" title="-6.260282">-6.260282</abbr>
> +</div>
> +</div>
> +</content>
> +<updated>2010年05月15日T01:00:00Z</updated>
> +<published>2010年05月15日T01:00:00Z</published>
> +<georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
> +<id>tag:www.phpwiki.org,2010年05月15日:/fakeurl/20100515223624</id>
> +</entry>
> +<entry>
> +<title>Foobar Éire 5</title>
> +<link href="http://maps.google.com/maps?f=q&amp;sll=53.125728,-6.068907&amp;ie=UTF8"/>
> +<content type="xhtml">
> +<div xmlns="http://www.w3.org/1999/xhtml">Yes, yes Millenium Spire, Dublin
> +<div class="geo">Geo coordinates:
> +<abbr class="latitude" title="53.349441">53.349441</abbr>
> +<abbr class="longitude" title="-6.260282">-6.260282</abbr>
> +</div>
> +</div>
> +</content>
> +<updated>2010年05月15日T01:00:00Z</updated>
> +<published>2010年05月15日T01:00:00Z</published>
> +<georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
> +<id>tag:www.phpwiki.org,2010年05月15日:/fakeurl/20100515223625</id>
> +</entry>
> +</feed>
> \ No newline at end of file
>
>
> Property changes on: trunk/tests/unit/lib/plugin/atom-example.xml
> ___________________________________________________________________
> Added: svn:keywords
> + Id
>
> Modified: trunk/tests/unit/test.php
> ===================================================================
> --- trunk/tests/unit/test.php	2010年06月04日 14:46:09 UTC (rev 7465)
> +++ trunk/tests/unit/test.php	2010年06月07日 08:12:29 UTC (rev 7466)
> @@ -400,6 +400,7 @@
> /* valid tests only with clean virgin setup */
> 'AllPagesTest','AllUsersTest','OrphanedPagesTest',
> 'WantedPagesTest','TextSearchTest','IncludePageTest',
> + 'AtomParserTest','AtomFeedTest',
> /* final tests which require all valid pages and consumes> 32MB */
> 'DumpHtml');
> // support db=file db=dba test=SetupWiki test=DumpHtml debug=num -dconstant=value
>
>
> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> ____________________________...
 
[truncated message content]
From: Sébastien Le C. <sl...@ya...> - 2010年06月03日 17:47:11
Hi Reini,
On 02/06/2010 11:43, Reini Urban wrote:
>
> I usually don't run the shell scripts anymore,
> just the new webinterface tests/unit//test.php
> which does the same, and more
Excellent. I still get a couple of failures, but that definitely looks 
easier to use. Thanks for that!
It might be a good idea to remove the Perl scripts from the code base, 
if they are not used any longer: that would clean things up. It looks 
like they are not maintained anymore, anyway?
Thanks a mil,
Seb
From: Reini U. <ru...@x-...> - 2010年06月02日 10:43:09
2010年6月1日 Sébastien Le Callonnec <sl...@ya...>:
> I’m in the process of writing a plugin for PhpWiki, and I’m writing unit
> tests, but I’m somewhat confused as to how to integrate them in the
> existing suite of tests.
>
> I’ve tried to run the runme_all script (which needed a bit of fixing,
> see
> https://sourceforge.net/tracker/?func=detail&aid=3010043&group_id=6121&atid=106121)
> but I’m getting quite a fair bit of errors, more than likely because it
> looks like I need a "test" environment set up. Is there any
> documentation about conventions regarding unit tests in the project?
> How do you guys run them? There’s quite a fair bit of scripts in the
> tests folder, but I’m not sure which one(s) to use.
I usually don't run the shell scripts anymore,
just the new webinterface tests/unit//test.php
which does the same, and more
-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/
From: Sébastien Le C. <sl...@ya...> - 2010年06月01日 18:41:33
Hi All,
I’m in the process of writing a plugin for PhpWiki, and I’m writing unit 
tests, but I’m somewhat confused as to how to integrate them in the 
existing suite of tests.
I’ve tried to run the runme_all script (which needed a bit of fixing, 
see 
https://sourceforge.net/tracker/?func=detail&aid=3010043&group_id=6121&atid=106121) 
but I’m getting quite a fair bit of errors, more than likely because it 
looks like I need a "test" environment set up. Is there any 
documentation about conventions regarding unit tests in the project? 
How do you guys run them? There’s quite a fair bit of scripts in the 
tests folder, but I’m not sure which one(s) to use.
Thanks,
Seb
From: Marc-Etienne V. <Mar...@al...> - 2010年05月26日 09:09:21
Le 25/05/2010 15:55, Reini Urban a écrit :
> Marc-Etienne,
>
> Why did go berserk and removed the getVersion API?
> Subversion id's still provide the only hint on versions for installed
> plugins.
Hello Reini,
We now have a unique identifier for all Phpwiki, including
plugins.
It was confusing for users that getVersion returned
different numbers in PluginManager.
Best regards,
Marc-Etienne
-- 
Marc-Etienne Vargenau
Alcatel-Lucent France, Route de Villejust, 91620 NOZAY, FRANCE
+33 (0)1 30 77 28 33, Mar...@al...
From: Marc-Etienne V. <Mar...@al...> - 2010年05月26日 08:38:40
Le 25/05/2010 15:49, ru...@us... a écrit :
> Revision: 7444
> http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7444&view=rev
> Author: rurban
> Date: 2010年05月25日 13:49:31 +0000 (2010年5月25日)
>
> Log Message:
> -----------
> provide missing css source
>
> Modified Paths:
> --------------
> trunk/themes/Sidebar/sidebar.css
Hello Reini,
Thank you for this missing file.
I still have the following problems with the minimizer for JS/CSS:
* no "make clean" in themes directory
* "make clean" does not work in themes with no Javascript
* in MonoBook, IEFixes.js cannot be minimized, yuicompressor-2.4.2 gives 
syntax errors
Best regards,
Marc-Etienne
-- 
Marc-Etienne Vargenau
Alcatel-Lucent France, Route de Villejust, 91620 NOZAY, FRANCE
+33 (0)1 30 77 28 33, Mar...@al...
From: Sébastien Le C. <sl...@ya...> - 2010年05月18日 17:21:48
Hi Reini,
On 17/05/2010 21:17, Reini Urban wrote:
>
> Making a new major release is not that easy as most possible cfg's
> have to be tested,
> I found some bugs lately, but didn't find those you found yet.
>
> The new default theme - a new Sidebar based upon Monobook - is still
> not finished.
> Otherwise it should be stable enough.
>
> I had some eye problem (ophthalmitis) in the last two weeks so I'm not
> very fast.
> Hope this over soon.
Sorry to hear that, I hope you'll get well soon!
Are the blocking issues in the bug tracker? I don't mind having a look 
at some if that would help moving things forward. I think there's some 
good stuff in svn, and phpwiki _does_ deserve a new release.
Regards,
Sébastien.
From: Sébastien Le C. <sl...@ya...> - 2010年05月18日 17:16:01
On 18/05/2010 11:24, Manuel Vacelet wrote:
> On Mon, May 17, 2010 at 8:53 PM, Sébastien Le Callonnec<sl...@ya...> wrote:
>> One remaining question, though (probably a FAQ, actually): is there a
>> way of not importing the PhpWiki "core" pages? When exporting, I
>> usually do a full dump, which contains PhpWikiAdministration and all the
>> Help pages, etc. but I don't to import them back, as I may be losing the
>> changes done to these pages as part of the upgrade.
>>
>> Any obvious way of achieving this?
>
> Hi Sebastien,
>
> To handle this case we had to develop a script that remove from within
> this archive all pages with "The PhpWiki team" as author and without
> modification (and maybe pages that are only modified by "The PhpWiki
> team").
>
> I don't have it right now but I could had a look in my archives sometime,
> Manuel
>
Hi Manuel,
Good one, this does the trick indeed. There are still a few "Help" 
files left behind, so I did the following:
rm -f Help*
grep -l "author=The%20PhpWiki%20programming%20team" * | xargs rm -f
Thanks a mil,
Sébastien.
From: Manuel V. <man...@gm...> - 2010年05月18日 10:24:31
On Mon, May 17, 2010 at 8:53 PM, Sébastien Le Callonnec <sl...@ya...> wrote:
> I've finally been able to import all my pages!!
>
> The last hurdle was that I was trying to export iso-8859-1 pages and
> import them into a utf-8 phpwiki setup: all the pages with non-ASCII
> characters were not being imported because the pagename was not
> converted into utf-8 after the urldecode when importing. A quick change
> to force the pagename to utf-8, and that's it!
>
> One remaining question, though (probably a FAQ, actually): is there a
> way of not importing the PhpWiki "core" pages? When exporting, I
> usually do a full dump, which contains PhpWikiAdministration and all the
> Help pages, etc. but I don't to import them back, as I may be losing the
> changes done to these pages as part of the upgrade.
>
> Any obvious way of achieving this?
Hi Sebastien,
To handle this case we had to develop a script that remove from within
this archive all pages with "The PhpWiki team" as author and without
modification (and maybe pages that are only modified by "The PhpWiki
team").
I don't have it right now but I could had a look in my archives sometime,
Manuel
From: Sébastien Le C. <sl...@ya...> - 2010年05月17日 19:53:29
I've finally been able to import all my pages!!
The last hurdle was that I was trying to export iso-8859-1 pages and 
import them into a utf-8 phpwiki setup: all the pages with non-ASCII 
characters were not being imported because the pagename was not 
converted into utf-8 after the urldecode when importing. A quick change 
to force the pagename to utf-8, and that's it!
One remaining question, though (probably a FAQ, actually): is there a 
way of not importing the PhpWiki "core" pages? When exporting, I 
usually do a full dump, which contains PhpWikiAdministration and all the 
Help pages, etc. but I don't to import them back, as I may be losing the 
changes done to these pages as part of the upgrade.
Any obvious way of achieving this?
Thanks,
Seb
On 14/05/2010 08:22, Sébastien Le Callonnec wrote:
> Hi,
>
>
> I have been looking into problems with some dumped archives which could
> not be imported back into phpwiki.
>
> After some investigation, I have isolated the problem to
> ParseMimeMultipart in ziplib.php; the preg_match was exiting too early.
> The regexp looks ok, but for big archives (whether it is a medium-size
> page with lots of revisions, or a huge file with a couple of revisions),
> preg_match seems to be failing.
>
> It turns out it looks like I'm hitting the pcre backtrack/recursion
> limit. Increasing the values of pcre.backtrack_limit and
> pcre.recursion_limit in php.ini as per
> http://ie.php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit
> seems to do the trick, but I was wondering if anybody has hit this issue
> before? I have quite large archives to import, and I am not sure
> whether preg_match is able to cope with them, even with the increased
> values.
>
>
> Thanks,
> Sébastien.
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Phpwiki-talk mailing list
> Php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpwiki-talk
>
From: Sébastien Le C. <sl...@ya...> - 2010年05月14日 07:23:03
Hi,
I have been looking into problems with some dumped archives which could 
not be imported back into phpwiki.
After some investigation, I have isolated the problem to 
ParseMimeMultipart in ziplib.php; the preg_match was exiting too early. 
 The regexp looks ok, but for big archives (whether it is a medium-size 
page with lots of revisions, or a huge file with a couple of revisions), 
preg_match seems to be failing.
It turns out it looks like I'm hitting the pcre backtrack/recursion 
limit. Increasing the values of pcre.backtrack_limit and 
pcre.recursion_limit in php.ini as per 
http://ie.php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit 
seems to do the trick, but I was wondering if anybody has hit this issue 
before? I have quite large archives to import, and I am not sure 
whether preg_match is able to cope with them, even with the increased 
values.
Thanks,
Sébastien.
From: Sébastien LE C. <sl...@ya...> - 2010年05月11日 09:52:02
Hi Marc-Etienne
No problem at all, in fairness it was a big lengthy email!! ;-)
I agree with Charles, phpWiki could do with a new major release that replaces the current stable one that's a bit old now.
I imagine most of the users would get to phpWiki through sourceforge, and seeing that the first version to come up is 1.2.11 cut in 2008, they more than likely pass their way.
Regards,
Sebastien.
> 
> Sébastien LE CALLONNEC a écrit :
> Hi Marc-Etienne,
> 
> As 
> stated in my email, everything "is based on the current source code from svn 
> trunk" since the "current" version (1.3.14) doesn't work out of the box. 
> You can also see this from the patch as it indicates the rev. number it's been 
> generated from.
> 
> 
> Regards,
> 
> Sebastien.
Hello Sébastien,
I am sorry, I did not read you e-mail 
> carefully enough.
I will have a look at your patches.
In fact, I 
> am mostly using Phpwiki integrated with
Gforge/Fusionforge so I do not use 
> the automatic
configuration (my configuration is in the "g" 
> file).
Best regards,
Marc-Etienne
-- 
Marc-Etienne 
> Vargenau
Alcatel-Lucent France, Route de Villejust, 91620 NOZAY, 
> FRANCE
+33 (0)1 30 77 28 33, 
> ymailto="mailto:Mar...@al..." 
> href="mailto:Mar...@al...">Mar...@al...
------------------------------------------------------------------------------
_______________________________________________
Phpwiki-talk 
> mailing list
> href="mailto:Php...@li...">Php...@li...
> href="https://lists.sourceforge.net/lists/listinfo/phpwiki-talk" target=_blank 
> >https://lists.sourceforge.net/lists/listinfo/phpwiki-talk
 
From: Marc-Etienne V. <Mar...@al...> - 2010年05月11日 09:27:09
Sébastien LE CALLONNEC a écrit :
> Hi Marc-Etienne,
> 
> As stated in my email, everything "is based on the current source code from svn trunk" since the "current" version (1.3.14) doesn't work out of the box. You can also see this from the patch as it indicates the rev. number it's been generated from.
> 
> 
> Regards,
> Sebastien.
Hello Sébastien,
I am sorry, I did not read you e-mail carefully enough.
I will have a look at your patches.
In fact, I am mostly using Phpwiki integrated with
Gforge/Fusionforge so I do not use the automatic
configuration (my configuration is in the "g" file).
Best regards,
Marc-Etienne
-- 
Marc-Etienne Vargenau
Alcatel-Lucent France, Route de Villejust, 91620 NOZAY, FRANCE
+33 (0)1 30 77 28 33, Mar...@al...
207 messages has been excluded from this view by a project administrator.

Showing results of 7779

<< < 1 .. 7 8 9 10 11 .. 312 > >> (Page 9 of 312)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /