![]() |
|
Article Options |
[HOW TO] Add WYSIWYG Editor to Your Modifications
by
![]() I do this as a free service, I am a student however and all donations are welcome. You can click on the Paypal icon 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:
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 4. Add the following to your php file. Open the file you wish to add your editor to (Make sure you have this code in the area where your template containing the editor is to be called):
Then edit your template register and add the following:
Add this line to your php file after you define special templates, global templates, etc:
Add these to your specialtemplates:
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. Preview provided at attachments. Last edited by Mythotical; 20 Jan 2012 at 02:19.. |
||||||||||||||||||||||||
Views: 26319
|
Comments |
#2
|
||||||||
|
||||||||
Instead of adding all these templates to globaltemplates, you could add this:
Even better, use action templates:
__________________
Now released: DownloadsII 6.0.9 (for vB 4.x) and 5.1.2 (for vB 3.7.x and 3.8.x) Minatica.be - Belgian/Dutch computer and technology site No members have liked this post.
|
#3
|
||||
|
||||
Thanks.
![]()
__________________
Bilgivadisi No members have liked this post.
|
#4
|
||||||||
|
||||||||
Originally Posted by RS_Jelle
Thanks, I'll update the article to reflect your suggestion.![]()
I should ask what that does since I have never seen that code before. I'm sure others will question as well. No members have liked this post.
Last edited by Mythotical; 25 Nov 2009 at 17:53. |
#5
|
||||
|
||||
Originally Posted by Steve M
It just caches the editor templates, in an easier way ![]()
![]() From /includes/class_bootstrap.php:
+ If you don't do it this way, this mod won't work (if it gets ported to vB4).
__________________
Now released: DownloadsII 6.0.9 (for vB 4.x) and 5.1.2 (for vB 3.7.x and 3.8.x) Minatica.be - Belgian/Dutch computer and technology site No members have liked this post.
|
#6
|
||||
|
||||
Originally Posted by RS_Jelle
Ah great info, thank you for clarifying, I have included it in the article as well. I plan to go change my ported mods to include that as well.
![]()
No members have liked this post.
|
#7
|
|||
|
|||
I've followed the instruction, editors works as it must works, but in all pages there is that dammit yellow triangle at browser's status bar with error:
vB_XHTML_Ready has not been definied URI: http://www.microhellas.com/main/clie...tor.js?v=400b5 Maria No members have liked this post.
|
#8
|
|||
|
|||
Maria, can you show me the page that you get the yellow triangle? I don't get the triangle so I'm a bit concerned right now, oh yeah, what browser you viewing the page in?
No members have liked this post.
|
#9
|
|||
|
|||
Originally Posted by Steve M
Sure. http://www.microhellas.com/main/support.php![]()
Thank you so much. By the way. IE8 Maria No members have liked this post.
|
#10
|
|||
|
|||
Hmmmm, I opened it in IE8 but I get no error report. Let me check a few things and I'll post back.
Your welcome. No members have liked this post.
|
#11
|
|||
|
|||
Originally Posted by Steve M
Thank you for taking the time to help me. If you want, I've post the full product at:![]()
http://www.vbulletin.org/forum/showthread.php?t=230112 but I think that I follown your instructions step by step. Maria No members have liked this post.
|
#12
|
|||
|
|||
Apparently that error triangle is from subscriptions portion. Might be a bug with vB. I have tried to replicate it and even tried adding new tickets and such, still no error on my end. Sorry I couldn't provide more info than that. I'm actually sitting here scratching my head over it. LOL
No members have liked this post.
|
#13
|
|||
|
|||
Originally Posted by Steve M
Ok:-)) Let to see if anybody report it in my post. My site is not the stablest on the net, actually it has nothing, so maybe something else causes it.![]()
take care Maria No members have liked this post.
|
#14
|
|||
|
|||
Possibly, if you need help narrowing down where it may come from, I'll gladly help you out.
No members have liked this post.
|
#15
|
|||
|
|||
Bug? Request for check
I've spent today tearing my hair out in updating the wysiwig editor from vb3.8 to v4.0 in a product I handle. Eventually, I tried reproducing the problem using the code suggested here, and the same problem arose. Basically, when in full WYSIWIG mode, the text entered into the message box is not being returned to the server, unless one first refreshes the page. In standard mode (obtained either by using the control switch in the editor, or by setting the appropriate vb options), everything works fine. This means that the problem cropped up with IE and Firefox but not with Google Chrome or Safari, which always use the standard editor.
For some reason, though, this problem does not seem to crop up in, e.g., the standard VB editpost code. Possibilities are that I've made a mistake (quite possible...), or there's a bug in vb4.0 (I'm testing with RC2), or there's a switch/file that we're overlooking. The attached files are, as far as I can tell, a straight copy of the material posted at the start of this article, within a script that simply keeps re-presenting the form along with a record of the message entered by the user the previous time round. I'd be very grateful if someone can independently test this, and let me know if I'm going crazy or not. The two files are a php script to be loaded into the forum directory, and a template. No members have liked this post.
|
![]() |
«
Previous Article
|
Next Article
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Article Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 16:10.