Log in

View Full Version : Having problems using the VB editor


amykhar
06-27-2005, 05:53 PM
I don't know what I am doing wrong.

I am using

$editorid = construct_edit_toolbar($text, 0, 'nonforum', iif($vbulletin->options['privallowsmilies'], 1, 0));


to set up the editor. It appears in the template no problem.

In the source code, I see the textarea is named 'message'. So, I should be able to process the data in $_POST['message'] or run it through the clean array to validate it.

But, I am not receiving the text.

If I use

$editorid = construct_edit_toolbar("Hello", 0, 'nonforum', iif($vbulletin->options['privallowsmilies'], 1, 0));


to create the editor, then the editor shows up with "Hello" in it, and it passes through successfully. I can even change the word Hello to zzzz and have zzzz come through instead.

But if I use

$editorid = construct_edit_toolbar(" ", 0, 'nonforum', iif($vbulletin->options['privallowsmilies'], 1, 0));


Nothing passes through again.

I am banging my head on the wall. How in heck do I use this editor? I have been trying to mimic what I see in newreply.php and private.php - it's just not working right.

Any suggestions?

amykhar
06-27-2005, 06:08 PM
Never mind - I figured it out. :)

merk
06-28-2005, 12:07 AM
How'd you fix it? Id be interested to know since Ill be mucking around with the editor eventually :o

amykhar
06-28-2005, 01:08 AM
I was missing info in the template that used it.

Alan @ CIT
11-03-2005, 12:07 PM
Hey Amy, would you mind going into more details? I'm also banging my head against the same wall :(

Thanks in advanced for any insight you can give :)

Alan.

Edit:
Nevermind, got it working :)

Adding enctype="multipart/form-data" to the <form> tag got it working for me. The New PM template which I was basing mine on doesn't have this though, so I'm still confused, but it works which is enough for me :)