Hello, i've succesfully inserted Spaw in most textareas of my site\modules, but i need help doing something more.
I want a way to enable spaw only if user browser is MSIE otherwise it displays normal textarea field...
Since i use Xfsection, i saw that it use a trick based on an if statement...
le="color: #000000"><?php if (!strstr($HTTP_SERVER_VARS["HTTP_USER_AGENT"], "MSIE")) $wfsConfig['wysiwygeditor'] = '0'; if ($wfsConfig['wysiwygeditor'] == '1') { //html_editor('maintext'); $sw = new SPAW_Wysiwyg( 'maintext', $this->maintext, 'en', 'full', 'default', '98%', '550px' ); $sw -> show(); $smiliepath = $wfsConfig['smiliepath']; $smilie_array = XoopsLists::getimgListAsArray(XOOPS_ROOT_PATH."/".$smiliepath); echo "<br /><div style='text-align: left;'><b>" ._AM_SMILIE."</b><br />"; echo "<table><tr><td align='top' valign='left'>"; echo "<div><script type='text/javascript'> <!-- function showbutton() { document.all.".$textareaname."_mysmile.src = '".$xoopsConfig['xoops_url']."/$smiliepath/' + document.all.".$textareaname."_smiley.value; }
the problem here is that if the browser is MSIE it enables wysiwyg editor in $wfsConfig, otherwise is disabled...thats the trick, now since in "NEWS" module, for instance, i dont have any "$wfsConfig" is there a way to make that code like "universal" :)?
le="color: #000000"><?php //If admin - show admin form //TODO: Change to "If submit privilege" if ($approveprivilege) { //Show topic image? $sform->addElement(new XoopsFormRadioYN(_AM_TOPICDISPLAY, 'topicdisplay', $topicdisplay)); //Select image position $posselect = new XoopsFormSelect(_AM_TOPICALIGN, 'topicalign', $topicalign); $posselect->addOption('R', _AM_RIGHT); $posselect->addOption('L', _AM_LEFT); $sform->addElement($posselect); //Publish in home? //TODO: Check that pubinhome is 0 = no and 1 = yes (currently vice versa) $sform->addElement(new XoopsFormRadioYN(_AM_PUBINHOME, 'ihome', $ihome, _NO, _YES)); } [b]ob_start(); $sw = new SPAW_Wysiwyg( 'hometext', $hometext, 'en', 'full', 'default', '99%', '600px' ); $sw -> show(); $sform -> addElement( new XoopsFormLabel( _NW_THESCOOP, ob_get_contents() ) ); ob_end_clean(); //Extra info //If admin -> if submit privilege if ($approveprivilege) { ob_start(); $sw = new SPAW_Wysiwyg( 'bodytext', $bodytext, 'en', 'full', 'default', '99%', '600px' ); $sw -> show(); $sform -> addElement( new XoopsFormLabel( _AM_EXTEXT, ob_get_contents() ) ); ob_end_clean(); }[/b]
this is where i've put the spaw lines in modules/news/include/storyform.inc.php
and this is latest news module version...
help me getting this into an if statment with browser check php guru's

cheers Astuni
Long life to XOOPS!