Lets stay focused on 9 for now with bug fixes, I will fix these issues before 10.  Thanks for your help Jonny.

On Thu, Jun 21, 2012 at 7:54 AM, Jonny Bradley <svnupdates@nospaces.net> wrote:

Hi again Robert (sorry, wasn't looking for a week or two!)

This one seems to produce a huge stream of warnings and is apparently trying to actually load loads of files that don't exist.

I'm getting loads of errors like:

> PHP (5.3.8) ERROR (E_WARNING):
> File: lib/core/Zend/Loader.php
> Line: 134
> Type: include_once(WikiPlugin/img.php) [function.include-once]: failed to open stream: No such file or directory


Warnings fixed in r42023 but no more time to check other consequences... there is no class such as WikiPlugin_img or any of the other ones, i just don't get it, sorry.

jb





On 14 Jun 2012, at 15:14, robertplummer@users.sourceforge.net wrote:

> Revision: 41950
>          http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=41950&view=rev
> Author:   robertplummer
> Date:     2012-06-14 14:14:05 +0000 (Thu, 14 Jun 2012)
> Log Message:
> -----------
> [FIX] Ensure that the new plugins can actually run without a duplicate in the lib/wiki-plugin folder
> [FIX] Change the name of the end html wiki plugin to that of oohtml so we can run them at the same time
>
> Modified Paths:
> --------------
>    trunk/lib/core/WikiPlugin/HtmlBase.php
>    trunk/lib/core/WikiPlugin/OperatorBase.php
>    trunk/lib/parser/parserlib.php
>
> Added Paths:
> -----------
>    trunk/lib/core/WikiPlugin/oohtml.php
>
> Removed Paths:
> -------------
>    trunk/lib/core/WikiPlugin/Html.php
>
> Deleted: trunk/lib/core/WikiPlugin/Html.php
> ===================================================================
> --- trunk/lib/core/WikiPlugin/Html.php        2012-06-14 13:09:57 UTC (rev 41949)
> +++ trunk/lib/core/WikiPlugin/Html.php        2012-06-14 14:14:05 UTC (rev 41950)
> @@ -1,48 +0,0 @@
> -<?php
> -// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
> -//
> -// All Rights Reserved. See copyright.txt for details and a complete list of authors.
> -// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
> -// $Id: wikiplugin_html.php 40030 2012-03-04 12:55:30Z gezzzan $
> -
> -class WikiPlugin_Html extends WikiPlugin_HtmlBase
> -{
> -     var $type = 'html';
> -     var $validate = 'all';
> -     var $prefs = array('wikiplugin_html');
> -     var $filter = 'rawhtml_unsafe';
> -     var $icon = 'img/icons/mime/html.png';
> -     var $tags = array( 'basic' );
> -
> -     function __constuct()
> -     {
> -             $this->name = tra('HTML');
> -             $this->documentation = 'PluginHTML';
> -             $this->description = tra('Add HTML to a page');
> -             $this->body = tra('HTML code');
> -             $this->params = array(
> -                     'wiki' => array(
> -                             'required' => false,
> -                             'name' => tra('Wiki Syntax'),
> -                             'description' => tra('Parse wiki syntax within the HTML code.'),
> -                             'options' => array(
> -                                     array('text' => '', 'value' => ''),
> -                                     array('text' => tra('No'), 'value' => 0),
> -                                     array('text' => tra('Yes'), 'value' => 1),
> -                             ),
> -                             'filter' => 'int',
> -                             'default' => '0',
> -                     ),
> -             );
> -     }
> -
> -     function output($data, $params, $index, $parser)
> -     {
> -             // parse using is_html if wiki param set, or just decode html entities
> -             if ( isset($params['wiki']) && $params['wiki'] === 1 ) {
> -                     return  TikiLib::lib('tiki')->parse_data($data, array('is_html' => true));
> -             } else {
> -                     return html_entity_decode($data, ENT_NOQUOTES, 'UTF-8');
> -             }
> -     }
> -}
>
> Modified: trunk/lib/core/WikiPlugin/HtmlBase.php
> ===================================================================
> --- trunk/lib/core/WikiPlugin/HtmlBase.php    2012-06-14 13:09:57 UTC (rev 41949)
> +++ trunk/lib/core/WikiPlugin/HtmlBase.php    2012-06-14 14:14:05 UTC (rev 41950)
> @@ -11,6 +11,7 @@
>       var $type;
>       var $documentation;
>       var $description;
> +     var $format;
>       var $prefs;
>       var $body;
>       var $validate;
> @@ -271,6 +272,17 @@
>               'resize' => '',
>       );
>
> +     public function info()
> +     {
> +             $info = array();
> +             foreach($this as $key => $param)
> +             {
> +                     $info[$key] = $param;
> +             }
> +
> +             return $info;
> +     }
> +
>       protected function paramDefaults(&$params)
>       {
>               $defaults = array();
>
> Modified: trunk/lib/core/WikiPlugin/OperatorBase.php
> ===================================================================
> --- trunk/lib/core/WikiPlugin/OperatorBase.php        2012-06-14 13:09:57 UTC (rev 41949)
> +++ trunk/lib/core/WikiPlugin/OperatorBase.php        2012-06-14 14:14:05 UTC (rev 41950)
> @@ -11,6 +11,7 @@
>       var $type;
>       var $documentation;
>       var $description;
> +     var $format;
>       var $prefs;
>       var $body;
>       var $validate;
> @@ -23,6 +24,17 @@
>
>       var $np = true;
>
> +     public function info()
> +     {
> +             $info = array();
> +             foreach($this as $key => $param)
> +             {
> +                     $info[$key] = $param;
> +             }
> +
> +             return $info;
> +     }
> +
>       protected function paramDefaults(&$params)
>       {
>               $defaults = array();
>
> Added: trunk/lib/core/WikiPlugin/oohtml.php
> ===================================================================
> --- trunk/lib/core/WikiPlugin/oohtml.php                              (rev 0)
> +++ trunk/lib/core/WikiPlugin/oohtml.php      2012-06-14 14:14:05 UTC (rev 41950)
> @@ -0,0 +1,48 @@
> +<?php
> +// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
> +//
> +// All Rights Reserved. See copyright.txt for details and a complete list of authors.
> +// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
> +// $Id: wikiplugin_html.php 40030 2012-03-04 12:55:30Z gezzzan $
> +
> +class WikiPlugin_oohtml extends WikiPlugin_HtmlBase
> +{
> +     var $type = 'oohtml';
> +     var $validate = 'all';
> +     var $prefs = array('wikiplugin_html');
> +     var $filter = 'rawhtml_unsafe';
> +     var $icon = 'img/icons/mime/html.png';
> +     var $tags = array( 'basic' );
> +
> +     function __constuct()
> +     {
> +             $this->name = tra('Object oriented version of the html wiki plugin');
> +             $this->documentation = 'PluginHTML';
> +             $this->description = tra('Add HTML to a page');
> +             $this->body = tra('HTML code');
> +             $this->params = array(
> +                     'wiki' => array(
> +                             'required' => false,
> +                             'name' => tra('Wiki Syntax'),
> +                             'description' => tra('Parse wiki syntax within the HTML code.'),
> +                             'options' => array(
> +                                     array('text' => '', 'value' => ''),
> +                                     array('text' => tra('No'), 'value' => 0),
> +                                     array('text' => tra('Yes'), 'value' => 1),
> +                             ),
> +                             'filter' => 'int',
> +                             'default' => '0',
> +                     ),
> +             );
> +     }
> +
> +     function output($data, $params, $index, $parser)
> +     {
> +             // parse using is_html if wiki param set, or just decode html entities
> +             if ( isset($params['wiki']) && $params['wiki'] === 1 ) {
> +                     return  TikiLib::lib('tiki')->parse_data($data, array('is_html' => true));
> +             } else {
> +                     return html_entity_decode($data, ENT_NOQUOTES, 'UTF-8');
> +             }
> +     }
> +}
> \ No newline at end of file
>
> Modified: trunk/lib/parser/parserlib.php
> ===================================================================
> --- trunk/lib/parser/parserlib.php    2012-06-14 13:09:57 UTC (rev 41949)
> +++ trunk/lib/parser/parserlib.php    2012-06-14 14:14:05 UTC (rev 41950)
> @@ -605,7 +605,7 @@
>       //*
>       function plugin_exists( $name, $include = false )
>       {
> -             $className = 'WikiPlugin_' . ucfirst($name);
> +             $className = 'WikiPlugin_' . $name;
>               if (class_exists($className)) return true;
>
>               $php_name = 'lib/wiki-plugins/wikiplugin_';
> @@ -635,6 +635,13 @@
>                       return $known[$name];
>               }
>
> +             $className = 'WikiPlugin_' . $name;
> +             $classExists = class_exists($className);
> +             if ($classExists == true) {
> +                     $class = new $className;
> +                     $known[$name] = $class->info();
> +             }
> +
>               if ( ! $this->plugin_exists($name, true) )
>                       return $known[$name] = false;
>
> @@ -806,6 +813,7 @@
>                       return true;
>
>               $meta = $this->plugin_info($name);
> +
>               if ( ! isset( $meta['validate'] ) )
>                       return true;
>
> @@ -1019,7 +1027,11 @@
>               }
>
>               //This is the class name for new simplified plugin system, if object does exist, it will use it, if not it uses old plugins
> -             $className = 'WikiPlugin_' . ucfirst($name);
> +             $className = 'WikiPlugin_' . $name;
> +             $classExists = class_exists($className);
> +             if ($classExists == true) {
> +                     $class = new $className;
> +             }
>
>               $func_name = 'wikiplugin_' . $name;
>
> @@ -1027,8 +1039,9 @@
>                       $this->plugin_apply_filters($name, $data, $args);
>               }
>
> -             if ( function_exists($func_name) || class_exists($className)) {
> +             if ( function_exists($func_name) || $classExists == true) {
>                       $pluginFormat = 'wiki';
> +
>                       $info = $this->plugin_info($name);
>                       if ( isset( $info['format'] ) ) {
>                               $pluginFormat = $info['format'];
> @@ -1040,8 +1053,7 @@
>                               $data = nl2br($data);
>                       }
>
> -                     if (class_exists($className)) {
> -                             $class = new $className;
> +                     if ($classExists == true) {
>                               $output = $class->exec($data, $args, $offset, $this);
>                       } else {
>                               $output = $func_name($data, $args, $offset);
> @@ -1157,6 +1169,7 @@
>               global $tikilib;
>
>               $info = $this->plugin_info($name);
> +
>               $default = TikiFilter::get(isset( $info['defaultfilter'] ) ? $info['defaultfilter'] : 'xss');
>
>               // Apply filters on the body
>
> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Tikiwiki-cvs mailing list
> Tikiwiki-cvs@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Tikiwiki-cvs mailing list
Tikiwiki-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs



--
Robert Plummer