I do this as a free service, I am a student however and all donations are welcome. You can click on the Paypalicon to make a donation:
I will add instructions for pulling data when editing a file.
This article was done for vB 3.5 and later, I now bring you the article for vB 4.0 in regards to the editor in modifications.
Working Versions: Currently 4.1.10
Testing Versions: NONE
This tutorial will provide you the proper method for including the WYSIWYG editor in your modifications. I have tested this and it works so following this tutorial will provide a working editor. You are welcome to tweak it to your liking so that you get different output's or vice versa.
Lets begin.
Step 1. Make sure you have already added the row to your database table. The new row to add is:
PHP Code:
`message` varchar(255)
You can alter that to be messagearea, message, description, etc and it will work just the same.
Step 2. Open your template containing your form.
Step 3. Install the provided plugin xml file.
Step 3. Add the following lines of code.
Now add this in place of your opening form tag (Remember to change your action to your correct file):
Step 5. Save and close your file, upload and test. Make sure you saved your template as well.
This is a short article/tutorial and I hope many find it useful. Even though I did not come up with the code or discover the code, I am happy to help others out as I was helped out.
The multipart/form-data encoding type shouldn't be required, as I'm not supporting attachments in this form. However, i added both that and the class just to test it out, and neither made a difference (except that the class made the style look ugly, which is why I removed it in the first place).
Buttons still not working.
For Quick Reply to work you need to include the following in the <head>
When i submit, the data in $_POST['message']; is not the new data from en textarea, it is the old in $profile_data.
Any ideas?
EDIT: It's only in the WYSIWYG-mode that it refuses to save the new data. In the regular mode where the bb-code is visible unformatted it saves without problems.
I ask because I want to use my own validation method, and you can't have TWO returns on an onsubmit. If I delete this part, it doesn't seem to have any adverse effects. So what does this do, and why is it needed?
I ask because I want to use my own validation method, and you can't have TWO returns on an onsubmit. If I delete this part, it doesn't seem to have any adverse effects. So what does this do, and why is it needed?
You can't remove this if you want to save the data. If you want to add your own validation you can do it in 2 ways:
1.- Add at the end another return. eg
Alright, thanks for the answer... although I did remove it, and it still saved the data without issue...
However, I have a different question... is there a reason why the editor controls would randomly disappear from the editor? No buttons or smilies are appearing, just the text box.
EDIT: It's only in the WYSIWYG-mode that it refuses to save the new data. In the regular mode where the bb-code is visible unformatted it saves without problems.
To the <form> add onsubmit="return vB_Editor['{vb:raw editorid}'].prepare_submit(this.inputname.value, {vb:raw vboptions.postminchars})"
This javascript moves the wysiwyg data into textbox before it submits the form.
Okay... next question... how do I DISABLE the wysiwyg option with a text box?
On my quick reply form, i want it to use the standard editor, with no WYSIWYG option.
--------------- Added [DATE]1273268438[/DATE] at [TIME]1273268438[/TIME] ---------------
I dont think onsubmit="return vB_Editor['{vb:raw editorid}'].prepare_submit(this.inputname.value, {vb:raw vboptions.postminchars})" works correctly. I have that code in my forms, and it still won't save the text when I am in WYSIWYG mode. It still saves perfectly fine in the standard editor.
so guys, i figured out the problem, that you there is no message if you are in the wysiwyg mode! actually my soluiton is not that pretty, but it works fine.
in that case i dont give the message to the vB_Editor to check the minimum word amount ... but hell i dont care - i just want a message :P
but that actually result in pure html which will arrive the db
Thanks for this great thread. It saved me a lot of time. But I was wondering if it was possible to remove the smilies panel easily only for my mod? Or maybe I should use the WYSIWYG from the quick reply?
If only the second option available, what's the variable name?
--- edit ---
Ok, after looking into the source code I found out: