PDA

View Full Version : WYSIWYG Editor


RTFA
08-15-2008, 12:25 AM
I am trying to add a new PHP module to my front page, yet my editor will not switch editor modes and all of the buttons are showing red X's.

http://img529.imageshack.us/img529/5648/wysiwygeditordd5.th.jpg (http://img529.imageshack.us/my.php?image=wysiwygeditordd5.jpg)

Brian
08-15-2008, 02:21 PM
Since the URL's are hard coded into vB's javascript files, the "Switch editor mode" button is not going to work from the Admin CP.
As for the images, please see our FAQ.
http://www.vbadvanced.com/forum/faq.php?faq=vba_trouble#faq_vba_trouble_images

Our Sponsors
 

offroadpassport
08-05-2009, 06:26 PM
which urls are hardcoded, i would like to enable this feature and i don't care if it's a "hack"... i'm not seeing anything in the vbulletin_textedit.js file that is a hardcoded url?

also are there any mods/hacks that replace the vbulletin texteditor with something more feature-rich (like freetextbox or fckeditor)?


---UPDATE:

ok so i found where in /clientscript/vbulletin_textedit.js you need to change: YAHOO.util.Connect.asyncRequest("POST","ajax.php?do=editorswitch"

to: YAHOO.util.Connect.asyncRequest("POST","/forum/ajax.php?do=editorswitch"

and that makes the button kinda work, and the mode of the editor switch... but it losses all the content with every switch!

the ajax.php file is responding with "<error><![CDATA[Your submission could not be processed because a security token was missing..."

i don't understand the security token system in vbulletin, so i'm not sure where it's getting lost... any help?

thanks


---FINAL UPDATE:

well the hack is complete, do the above edit in the js file, then...

in /admincp/vba_cmps_admin.php:

after line 527 which looks like this: $extrahead = '<script type="text/javascript" src="../clientscript/vba_cmps_admin.js"></script>';
add this line: $extrahead .= "\n".'<script type="text/javascript">var SECURITYTOKEN = "' .$vbulletin->userinfo[securitytoken]. '";</script>';


---CONCLUSION:

i think vbAdvanced could make this work without any vBulletin edits... if they included the change to the php file and then overrode the javascript function thats getting called with their own version that has the correct path, possible?

of course a REAL CMS would use something like FCKEditor, TinyMCE, or FreeTextBox and not rely on the dinky little vBulletin editor alone... it was meant for editing forum posts, not entire web pages.