This extension is just a simple Wiki parser-class for Yii, extended from CodeHolic's (Creole) Wiki Markup Parser
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.0 or above
Installation ¶
- Extract the release file under
protected/extensions
Usage ¶
See the following code example:
Yii::import('application.extensions.wikiext.wikiext');
// or you can include it in the config/main.php file
// if needed
// ...
// 'import'=>array(
// 'application.models.*',
// 'application.components.*',
// 'ext.wikiext.*'
// )
// ...
$wiki=new wikiext();
$wiki->parse( $string );
Change Log ¶
April 26, 2010 ¶
- Initial release.
Error!
Hello
After using this extension I got following error:
PHP Error
get_class() expects parameter 1 to be object, array given
/Library/WebServer/Documents/danaservers/protected/extensions/wikiext/wikiext.php(100)
I seems that the error is coming from parse() function. Can you help me to solve the problem?
Thank You
sure
shahram,
Thanks for trying to use it, sorry that it doesn't work :/
I'm more than happy to help. Could you please tell me more about your environment? Operating system, PHP version?
thanks,
--iM
@imehesz
Dear imehesz,
Thank you for your quick support.
Currently, I am using Yii/1.1.6 on Mac OS X 10.6.7 running Apache/2.2.17 (Unix) PHP/5.3.4 with 20090626 PHP API.
I thank you for your help in advanced.
answer
@shahram
hello,
so, I looked at the code, and the problem is PHP5.3 - I checked on the Creole site if they have a PHP5.3 version of their Class, but they don't have it :/
I might be able to fix it, but I'd need more time.
You might wanna take a look at this instead:
http://www.yiiframework.com/forum/index.php?/topic/13692-simplewiki-for-yii/
I hope this helps ...
--i
same problem
get_class() expects parameter 1 to be object, array given
/srv/www/guesswhat/protected/extensions/wikiext/wikiext.php(100)
088 $target->set_attribute($attr, $value);
089 }
090 }
091
092 function match($data) {
093 return preg_match($this->regex, $data, $matches, PREG_OFFSET_CAPTURE)
094 ? $matches : false;
095 }
096
097 function apply($node, $data, $options = array()) {
098 $tail = $data;
099
100 if (!get_class($this->fallback)) {
101 $this->fallback = $this->fallback
102 ? new creole_rule($this->fallback)
103 : new creole_rule_default_fallback();
104 }
105
106 while (true) {
107 $best = false;
108 $rule = false;
109
110 for ($i = 0; $i < count($this->children); $i++) {
111 if (!isset($matches[$i])) {
112 if (!get_class($this->children[$i])) {
Stack Trace
0
– /srv/www/guesswhat/protected/extensions/wikiext/wikiext.php(100): get_class(
Update available
Most of the above problems have been resolved in the latest version. It was released on March 24 2012 and can be downloaded from:
https://gitorious.org/w/trunk
Just take the Wikiext class from the top of wikiext.php and add creole.php underneath it.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.