vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   WYSIWYG Post Editor v1.0 (https://vborg.vbsupport.ru/showthread.php?t=40283)

eiSecure 06-24-2002 10:00 PM

WYSIWYG Post Editor v1.0
 
WYSIWYG Post Editor

Description:
Lets you have a Microsoft Word/FrontPage-like editing box when you reply to threads, create new threads, and/or edit posts.

Features:
- Supports BBCode
- HTML is converted to BBCode
- Gives user a visual layout of what he/she is typing
- Supports dynamic bolding/underlining/etc.
- Has cool-looking Office XP-styled buttons.:bunny:
- Allows users to choose wether to use this editor, or vB's default one.
- Makes BBCodes obsolete
- And many more...:bunny:

Installation Time:
About 20-30 minutes.

Credits:
Toolbar, Original Coding and Design: eiSecure (http://www.eisecure.com)
Debugging & HTML to BBCode Conversion: Superman53142 (http://www.aoaforums.com)
User Options for WYSIWYG: Velocd (http://www.diffusion4.com)

NOTE:UNLIKE PREVIOUS VERSIONS, THIS ONE DOES NOT REQUIRE THAT YOUR FORUM HAS HTML ENABLED IN POSTS!:)

You can view a demo of the hack in action here: http://forums.eisecure.com

If you encounter any problems or if anything doesn't work right, or if the instructions aren't correct, then please post them here.

If you want to limit this hack to people who are using IE5.5 or above, click here for instructions.

Thanks,
Alex

Superman53142 06-25-2002 09:01 PM

Cool. I'm installing right away :)

Velocd 06-25-2002 09:19 PM

Does the VBcode work though? Such as typing [php] will auto format? And also how about smilies? Will clicking on them insert them into the editor? Other than those two issues, this is defiantly excellent!

One request though: In the original WYSIWYG editor that was posted up in the request section, it had a feature to upload an image by browsing for it on your computer. Any way to implement that?

Velocd 06-25-2002 09:25 PM

Oh, and eiSecure you might want to clean up the install.txt file, it's a bit sloppy and hard to follow (kinda crunched up).

;)

eiSecure 06-25-2002 09:34 PM

Quote:

Originally posted by Velocd
Does the VBcode work though? Such as typing [php] will auto format? And also how about smilies? Will clicking on them insert them into the editor? Other than those two issues, this is defiantly excellent!

One request though: In the original WYSIWYG editor that was posted up in the request section, it had a feature to upload an image by browsing for it on your computer. Any way to implement that?

Yes, VBCode works fine, however, it is not displayed. What you see on the page is HTML, but when you submit, it's automatically converted to BBCode, so there shouldn't be any security issues there.:)

Smilies will auto-insert, but again, they won't be displayed images.

Images would be possible, if there is a way for the user to upload multiple files to the server.

Also, since you say the install is messy, how about you make one?;) :cool: :bunny:

Velocd 06-25-2002 09:55 PM

Quote:

Originally posted by eiSecure
Also, since you say the install is messy, how about you make one?;) :cool: :bunny:
hmmmmmmm....did I say sloppy? I meant it's perfect, *cough*but could be better*cough*. I'm busy at the moment though, and I'm sure people will be able to navigate their way through it (hopefully not destroying their forums in the process--j/k ;))

Quote:

Originally posted by eiSecure
Yes, VBCode works fine, however, it is not displayed. What you see on the page is HTML, but when you submit, it's automatically converted to BBCode, so there shouldn't be any security issues there.:)

Smilies will auto-insert, but again, they won't be displayed images.

Clickable smilies are not working for me :(
Sure, I can type a smilie face, which is basically a : and (, but the left box with smilies in them does not work when you click on it. Instead, I get a run time error my Microsoft Script Debugger picks up...

One solution to this is fixing it so the [get more] link works also, because it doesn't for me :( Once that works, users will at least know what vbcode to type to get a smilie to work.

Attached is a screenshot of the problem.

ALSO: where did the alignment button go? That was way cool, but now its gone...:(

Superman53142 06-25-2002 09:55 PM

BTW, I'm working on an update (some people like to rush out with releases ;)) that will insert the smilies as pictures into the WYSIWYG editor for visual purposes :)

Also, there is a bug in the templates that I noticed. You will have to add the following to all of the ****_wysiwyg templates:

Code:

<script language="Javascript" src="vbcode2.js"></script>
<script language="Javascript" src="vbcode_language.js"></script>

Alex is gonna fix the files ASAP :)

eiSecure 06-25-2002 09:57 PM

It's already fixed.:)

Just update your _wysiwyg templates with the ones in the first post.

Superman53142 06-25-2002 09:57 PM

Quote:

Originally posted by Velocd
Clickable smilies are not working for me :(
Sure, I can type a smilie face, which is basically a : and (, but the left box with smilies in them does not work when you click on it. Instead, I get a run time error my Microsoft Script Debugger picks up...

ALSO: where did the alignment button go? That was way cool, but now its gone...:(

First paragraph, see my last post. I just got this installed too :p

Was using outdated versions of the templates for coding purposes.

Also, there is no (that I know of, help me out here guys :)) equivilant "center" or "right" function for vbCode.

eiSecure 06-25-2002 09:58 PM

Quote:

Originally posted by Velocd


hmmmmmmm....did I say sloppy? I meant it's perfect, *cough*but could be better*cough*. I'm busy at the moment though, and I'm sure people will be able to navigate their way through it (hopefully not destroying their forums in the process--j/k ;))



Clickable smilies are not working for me :(
Sure, I can type a smilie face, which is basically a : and (, but the left box with smilies in them does not work when you click on it. Instead, I get a run time error my Microsoft Script Debugger picks up...

One solution to this is fixing it so the [get more] link works also, because it doesn't for me :( Once that works, users will at least know what vbcode to type to get a smilie to work.

Attached is a screenshot of the problem.

ALSO: where did the alignment button go? That was way cool, but now its gone...:(

heh..it was a bug caused by your addon.:p

It's fixed now. The align buttons were removed because they were supported only by HTML, and not BBCode.

You can still use tabs, though.:)

Superman53142 06-25-2002 10:03 PM

Quote:

Originally posted by eiSecure
heh..it was a bug caused by your addon.:p
Actually, it wasn't :p

It was caused by you removing the vbCode section, which is where the vbcode2.js script was included :D

eiSecure 06-25-2002 10:04 PM

Well, it was because I was thinking about his addon, which made me not pay attention to my coding.:p

Velocd 06-25-2002 10:04 PM

Quote:

Originally posted by Superman53142
BTW, I'm working on an update (some people like to rush out with releases ;)) that will insert the smilies as pictures into the WYSIWYG editor for visual purposes :)

Also, there is a bug in the templates that I noticed. You will have to add the following to all of the ****_wysiwyg templates:

Code:

<script language="Javascript" src="vbcode2.js"></script>
<script language="Javascript" src="vbcode_language.js"></script>

Alex is gonna fix the files ASAP :)

So...wait--Alex says in the next post that he fixed it. I'm not seeing the changes though in the newthread.txt or newreply.txt..

also, I'm not sure why the bug was caused, but if this is the solution then the edits to function.php and calling the query are not needed.

eiSecure 06-25-2002 10:05 PM

It's fixed in the updated download.:)

eiSecure 06-25-2002 10:06 PM

Quote:

Originally posted by Velocd
also, I'm not sure why the bug was caused, but if this is the solution then the edits to function.php and calling the query are not needed.
Good point.:)

[high]* eiSecure updates the crummy install.txt file[/high]

Superman53142 06-25-2002 10:07 PM

Quote:

Originally posted by Velocd


So...wait--Alex says in the next post that he fixed it. I'm not seeing the changes though in the newthread.txt or newreply.txt..

also, I'm not sure why the bug was caused, but if this is the solution then the edits to function.php and calling the query are not needed.

Indeed, they are not if you hard code them into the template, which is essentially what was done :p

I could rewrite it so that it is included in some other include, but I think hardcoding is just easier.

eiSecure 06-25-2002 10:08 PM

Saves you a DB query, too.:)

Superman53142 06-25-2002 10:09 PM

Quote:

Originally posted by eiSecure
Good point.:)

* eiSecure updates the crummy install.txt file

Alex, remove the line where it says you have to change vbcode_buttons, as well.

eiSecure 06-25-2002 10:10 PM

yep, done that, too.

Velocd 06-25-2002 10:16 PM

Works excellent now, the hack is finally 100% full working and bug free :)

eiSecure 06-25-2002 10:18 PM

Thanks.:)

Now... to get FireFly to install this hack here...:D

Velocd 06-25-2002 10:19 PM

Heh, not gonna happen, only the best hacks he installs (generally made by him ^_^)

Also he rather grow old and wait for VB3.

Superman53142 06-25-2002 10:21 PM

Quote:

Originally posted by Velocd
Works excellent now, the hack is finally 100% full working and bug free :)
Not quite. There's an error with quoting. I'm working on it :)

eiSecure 06-25-2002 10:21 PM

hmm... We'll see about that...

[high]* eiSecure takes out wallet and starts combing through money...;)[/high]

eiSecure 06-25-2002 10:23 PM

What's the error? I don't see any error...:confused:

Erwin 06-25-2002 10:26 PM

Aha! There you have it! :D

Installing immediately...

Superman53142 06-25-2002 10:27 PM

Error corrected :)

I have emailed Alex the updated version.

eiSecure 06-25-2002 10:29 PM

Okay, if you just installed this hack, after you finish installing, please re-download it, and re-apply the templates.:)

Superman53142 06-25-2002 10:31 PM

Quote:

Originally posted by eiSecure
Okay, if you just installed this hack, after you finish installing, please re-download it, and re-apply the templates.:)
That's a pain in the butt. The only thing changed is the switchit() function. If you know what you're doing, just change that. Here's the updated version:

EDIT: Darn it. It replaced some of the code. You'll have to download the updated versions.

Velocd 06-25-2002 10:48 PM

Another bug fix? d'oh! But hopefully this will be the last ;)

eiSecure 06-25-2002 10:50 PM

Yep...hopefully.:)

Superman53142 06-25-2002 10:52 PM

Quote:

Originally posted by Velocd
Another bug fix? d'oh! But hopefully this will be the last ;)
It should be. Every other function was tested pretty thouroughly (did I spell that right?). Of course, I did test some of it at 1AM last night :p

Parker Clack 06-25-2002 11:06 PM

Guys:

I love how it looks and works but everytime I use it double spaces the text, which I hit the return instead of single space, in the body of the textarea. If I type a one long sentence it will
wrap the text to the next line but if I hit the return key it will double space each time.

--Parker

Velocd 06-25-2002 11:25 PM

I've noticed this too, any solution eiSecure?

eiSecure 06-25-2002 11:28 PM

Yeah, there's an explanation for it...

This was made to function exactly like MS Word. To make it a single line break, just hold Shift and press Enter, just like in MS Word!:)

It's not a bug..it's a feature...;)

Velocd 06-25-2002 11:46 PM

eiSecure there are still some bugs I'm noticing with HTML disabled. If I use a single space (shift enter) then a double space right after, in the thread show it will show <br> tags....

Superman53142 06-25-2002 11:51 PM

Quote:

Originally posted by Velocd
eiSecure there are still some bugs I'm noticing with HTML disabled. If I use a single space (shift enter) then a double space right after, in the thread show it will show <br> tags....
I'll take a look. I didn't exactly know about the Shift-enter thing when I was writing the conversion code :p

EDIT: I am unable to reproduce this problem. Also, with the fix for the quoting error, that is an impossible problem, as all <br>'s are converted to "\n"'s.

Superman53142 06-25-2002 11:58 PM

Quote:

Originally posted by Parker Clack
Guys:

I love how it looks and works but everytime I use it double spaces the text, which I hit the return instead of single space, in the body of the textarea. If I type a one long sentence it will
wrap the text to the next line but if I hit the return key it will double space each time.

--Parker

The reason it is like this is because the WYSIWIG editor is like a pre-programmed part of IE. It's impossible (as far as I know :)), to change their settings for what the return key does. I coded the conversion scripts so that it replaces the <P></P> tags with double-spaces (\n\n, essentially) so that it would look the same as it did on the editor when you posted. As Alex (eiSecure) knew, you can press Shift-enter to get a single space (<br>), and this is converted to a single-space (\n) when you post.

eiSecure 06-26-2002 12:07 AM

I didn't 'discover', I 'knew'. ^_^

:bunny::p;):p:bunny:

Superman53142 06-26-2002 12:20 AM

Quote:

Originally posted by eiSecure
I didn't 'discover', I 'knew'. ^_^

:bunny::p;):p:bunny:

I stand corrected! :p


All times are GMT. The time now is 04:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01749 seconds
  • Memory Usage 1,830KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete