Page 1 of 1
Form Builder (FormBuilder) - Adding Static Text with a wysiwyg editor
Posted: Thu Jul 03, 2008 8:32 am
by lucid
I'm using FormBuilder to create a new form but there are a couple of places that need some static text.
There is an option to add a "Static Text" but there is no wysiwyg editor to style text. Actually I played around a little more before posting and logged in as an admin user (previously logged in as an editor) and there is now a wysiwyg editor.
Does anyone know which permission I have to check to turn the wysiwyg editor for other groups?
Thanks.
Re: Form Builder (FormBuilder) - Adding Static Text with a wysiwyg editor
Posted: Thu Jul 03, 2008 12:08 pm
by lucid
So I poked around the code for a little white to try and shed some light on to the WYSIWYG editor and found a like in the StaticTextField.class.phh files (modules/FormBuilder/Classes folder) which reads:
$mod->CreateTextArea((get_preference(get_userid(), 'use_wysiwyg')=='1'), $formDescriptor, $this->GetOption('text',''), 'fbrp_opt_text','pageheadtags'))
The function below determines whether or not a WYSIWYG editor is used:
get_preference(get_userid(), 'use_wysiwyg')=='1')
So I searched for 'use_wysiwyg' and it appears in the edituser.php file (admin/ folder):
$use_wysiwyg = "";
line: 75 #if (isset($_POST["use_wysiwyg"])){$use_wysiwyg = $_POST["use_wysiwyg"];}
line: 76 #else{$use_wysiwyg = get_preference($userid, 'use_wysiwyg');}
and
line: 105 #set_preference($userid, 'use_wysiwyg', $use_wysiwyg);
line: 106 #audit(-1, '', 'Edited User');
All of these are commented out so I don't really understand how a non-admin account can use a WYSIWYG editor unless you hack the file. [which I have done now but i'm looking for a better way - $mod->CreateTextArea(ture, $formDescriptor, $this->GetOption('text',''), 'fbrp_opt_text','pageheadtags')) ]
Any ideas?
Re: Form Builder (FormBuilder) - Adding Static Text with a wysiwyg editor
Posted: Fri Jul 04, 2008 1:49 am
by Dr.CSS
Have you looked into the permissions for Editor, out of the box they have a lot of permissions unchecked...
Re: Form Builder (FormBuilder) - Adding Static Text with a wysiwyg editor
Posted: Mon Jul 07, 2008 1:26 am
by lucid
I tried to work out which permission would turn this feature on before I went into the code but I couldn't work out which one it was. I opened up 2 browser windows and compare the admin group with the editor group but still no luck.
Was wondering if anyone knew which setting it was.