PDA

View Full Version : PHP 'WYSIWYG' Funktion


Mike-D
11-28-2009, 05:34 PM
Dear Coders,
since several hours I'm trying to figure it out, how to check the WYSIWYG Button inside the full editor. This means: Is it possible to check that the WYSIWYG mode https://vborg.vbsupport.ru/external/2011/07/26.gif is selected or not. I'm stumbled about the following lines of the /includes/functions_editor.php File for vB 3.83...
// set the editor mode
if (isset($_REQUEST['wysiwyg']))
{
// 2 = wysiwyg; 1 = standard
if ($_REQUEST['wysiwyg'])
{
$vbulletin->userinfo['showvbcode'] = 2;
}
else if ($vbulletin->userinfo['showvbcode'] == 0)
{
$vbulletin->userinfo['showvbcode'] = 0;
}
else
{
$vbulletin->userinfo['showvbcode'] = 1;
}
}


So I have two questions as follows:

($_REQUEST['wysiwyg']) Is this the one what enables the Switch function from NORMAL to the WYSIWYG mode?
What is showvbcode? I can' find it inside of the vB Settings.


Reason I ask: I'm trying to find a way if Members have selected the WYSIWYG mode. Both Conditions...
<if condition="$show['wysiwyg_compatible']">
<if condition="$show['is_wysiwyg_editor']">does not work for me. It seems to be that my problem is kinda hard to solve. Can anyone help me? Thanks in advance for all your help :)

--------------- Added 1259495591 at 1259495591 ---------------

Where are the PHP Coders? Any help would be good :)

Mike-D
11-30-2009, 08:50 AM
26 Views and no one is able to help? I might have guessed. A simple "Yes" or "No" would have helped me a lil bit. For the feature I will never start a Thread to get help :mad:

BTW: Problem solved! Andreas has helped me :)

kh99
11-30-2009, 10:17 AM
It's not enough just to be a php coder, it takes time to study code and figure out an answer. I spent some time looking at this question but couldn't determine the answer with enough certainty to respond, and I didn't want to guess.

I'm glad you found the answer. I hope that you will post it here so that next time someone wants to know they could find it by searching.