Topic: HOW do you turn of WYSIWYG for specific modules?
maarten
avatar
Freshman
Freshman
Posts: 10

Posted:
26.Dec 2002 - 05:30

What I really would like to know is how you turn off the WYSIWYG editor for some modules. There is no real documentation to be found anywhere on this subject. If there is please point the way!

thanks
CyberSliver
avatar
Freshman
Freshman
Posts: 3

Posted:
26.Dec 2002 - 21:15

Currently the only way to disable the WYSIWYGEditor in a module (or rather a page) is by modifying the module.

Call

Code

pnConfigSetVar('WYSIWYGEditor', 0);
just before the header.
jburke11
avatar
Registered User
Registered User
Posts: 1

Posted:
3.Jan 2003 - 03:22

I added the following line to includes/page_header.php at about line 500 (just before "include("header.php")):

Code

pnConfigSetVar('WYSIWYGEditor', 0);


Seems to work -- I don't get the editor anymore in phpBB2, at least not that I have come across. Anyone else tried this? If so, can you let me know if you run into any problems.
SwissMac
avatar
Helper
Helper
Posts: 187

Posted:
4.Jan 2003 - 07:26

Is the WYSIWIG editor itself editable? In other words, can some features be disabled, either globally, or more selectively?

Cheers,

Nigel
SadGeezer
avatar
Helper
Helper
Posts: 115

Posted:
7.Jan 2003 - 05:49

Yes it is, it's a lot of messing around though.

I was able to edit the HTML files in the javascript and one javascript file directory to take out most of the functions and only leave in the text formatting and upload function (and swapmode).

You will need to edit HTML and javascript to do this, but someone with limited programming knowledge like me can :)
SWEDEN4
avatar
Freshman
Freshman
Posts: 40

Posted:
10.Jan 2003 - 05:47

What is swapmode?
dberansky
avatar
Professional
Professional
Posts: 746

Posted:
10.Jan 2003 - 07:14

afaict, it toggles between WYSIWYG and source view.
SadGeezer
avatar
Helper
Helper
Posts: 115

Posted:
14.Jan 2003 - 21:06

CyberSliver

Currently the only way to disable the WYSIWYGEditor in a module (or rather a page) is by modifying the module.

Call

Code

pnConfigSetVar('WYSIWYGEditor', 0);
just before the header.


Worked for me too. (in Weblinks mod)
SadGeezer
avatar
Helper
Helper
Posts: 115

Posted:
16.Jan 2003 - 18:08

Actually, it didn't work perfectly. The problem being that you need to turn the WYSIWYG editor back on! When I used the above solution, it kept changing the setting (globally) for the WYSIWYG editor to 'No' and the only way I could get it back on was to go into the settings in the admin menu and reselect the radio button to 'Yes' again. :(

If this happened to you too, do this:

Wherever you have entered

Code

pnConfigSetVar('WYSIWYGEditor', 0);

add this just before the footer.php of the same subroutine (found just before the leftmost '}':

Code

pnConfigSetVar('WYSIWYGEditor', 1);


(the only problem is that if someone jumps out of the page while in the middle of an edit (ie. before they reach the end of the routine), the variable will not have been set back to '1' in the admin menu (settings).

It's possible that I'm doing something wrong here since I'm not a programmer. The above solution is the only one that I can think of.

Anyone any better ideas?

For instance, why not place

Code

pnConfigSetVar('WYSIWYGEditor', 0);

after the header.php statement of the page you want to disable WYSIWYG and then have the

Code

pnConfigSetVar('WYSIWYGEditor', 1);

placed somewhere near the top of the /html/header.php file? You would only need to place this once since it is called by all PN modules

That way, WYSIWYG would always have the value 1 in all pages except the ones that you wanted it dissabled.
SadGeezer
avatar
Helper
Helper
Posts: 115

Posted:
21.Jan 2003 - 01:37

SadGeezer

For instance, why not place

Code

pnConfigSetVar('WYSIWYGEditor', 0);

after the header.php statement of the page you want to disable WYSIWYG and then have the

Code

pnConfigSetVar('WYSIWYGEditor', 1);

placed somewhere near the top of the /html/header.php file? You would only need to place this once since it is called by all PN modules

That way, WYSIWYG would always have the value 1 in all pages except the ones that you wanted it dissabled.


I'm afraid that didn't work either :(

Does anyone know how to turn off WYSIWYG (Virtual Mode) in specific modules?
larsneo
avatar
Software Foundation
Software Foundation
Posts: 4482

Posted:
21.Jan 2003 - 12:22

see here and here for some nice workarounds...

--
regards from germany
..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..