| Re: WF-Links 1.09? |
| by Mamba on 2012/6/26 2:41:22 Quote: BUG: Screenshot automaticly! Thanks, Shine. It's now in XOOPS SVN. I also changed the Editor to a dynamic list, instead of hard coded, as it was before. I need to do more tests on this. |
| Re: WF-Links 1.09? |
| by Mamba on 2012/6/26 2:19:28 le="color: #000000"><?php Notice: Undefined index: extensions in file /class/module.textsanitizer.php line 622 Warning: array_filter() expects parameter 1 to be array, null given in file /class/module.textsanitizer.php line 622 This was a tricky bug, at least for me! First, I was looking at the chain of events, trying to figure out what was calling the function executeExtensions, inside which the array_filter was located? It was: displayTarea --> xoopsCodeDecode($text); ------> executeExtensions I was looking at the parameters of the various displayTarea calls from within WF-Links, like this one: le="color: #000000"><?php $link['description2'] = $wfmyts -> displayTarea( $link_arr['description'], 1, 1, 1, 1, 1 ); but couldn't find anything wrong. But in the debugger, I saw that the value for $this->config['extensions'] was null: le="color: #000000"><?php $this->config['extensions'] = null I compared a similar call to displayTarea in xForms, le="color: #000000"><?php $xoopsTpl->assign('forms_intro', $myts->displayTarea($xoopsModuleConfig['intro'])); and it was: le="color: #000000"><?php $this->config['extensions'] = {array}[11] iframe = 0 image= 1 flash = 1 youtube = 1 mp3 = 0 wmp = 0 wiki = false mms = 0 rtsp = 0 ul = 0 li = 0 So something was wrong with our $wfmyts. WF-Links, the same as XoopsTube, is extending MyTextSanitizer in /class/myts_extended.php le="color: #000000"><?php class wflTextSanitizer extends MyTextSanitizer { function wflTextSanitizer() { } function htmlSpecialCharsStrip( $text ) { return $this -> htmlSpecialChars( $this -> stripSlashesGPC( $text) ); } } Now the question, what is wrong with it, and what consequences does it have? I realized that the function le="color: #000000"><?php function wflTextSanitizer() { } was overriding the original construction method of MyTextSanitizer: le="color: #000000"><?php function __construct() { $this->path_basic = XOOPS_ROOT_PATH . '/class/textsanitizer'; $this->path_plugin = XOOPS_ROOT_PATH . '/Frameworks/textsanitizer'; $this->config = $this->loadConfig(); } and as a result the "$this->loadConfig()", which was loading the extensions, was never executed. After removing it, all the errors related to "Undefined index: extensions" are gone. |
| Re: WF-Links 1.09? |
| by Shine on 2012/6/25 9:17:13 BUG: Screenshot automaticly! File: templates/linkload.html Prox line:28 le="color: #000000"><?php <{if $wfllink.autoscrshot == 1}> <div> <a href="<{$xoops_url}>/modules/<{$wfllink.module_dir}>/visit.php?cid=<{$wfllink.cid}>&lid=<{$wfllink.id}>" target="_blank"><img src="http://mozshot.nemui.org/shot/128x128?<{$wfllink.url}>" align="right" /></a> </div> <{/if}> Replace with: le="color: #000000"><?php <{if $wfllink.autoscrshot == 1}> <div> <a href="<{$xoops_url}>/modules/<{$wfllink.module_dir}>/visit.php?cid=<{$wfllink.cid}>&lid=<{$wfllink.id}>" target="_blank"><img src="http://open.thumbshots.org/image.pxf?url=<{$wfllink.url}>" align="right" /></a> </div> <{/if}> |
| Re: WF-Links 1.09? |
| by Mamba on 2012/6/24 21:02:09 Quote: Hopefully you can solve it. I'll look into it when I find some more time. Quote: Also the -other- famous Xoopstree msg is there: I never worked with XoopsTree, so I don't how to do it. If somebody has experience, maybe they could help. |
| Re: WF-Links 1.09? |
| by Shine on 2012/6/24 20:54:22 Quote: Notice: Undefined index: extensions in file /class/module.textsanitizer.php line 622 I know. But this goes way above my codeskill knowledge unfortunately. Hopefully you can solve it. Also the -other- famous Xoopstree msg is there: Quote: Class 'XoopsTree' is deprecated, check 'XoopsObjectTree' in tree.php Seems complicated to solve this?? ( https://xoops.org/modules/newbb/viewtopic.php?topic_id=72162&forum=75&post_id=332163#forumpost332163 ) Yeah, we are getting around with Mc Donalds WF-Links. Great! |