Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
HOW do you turn of WYSIWYG for specific modules?
  • Posted: 26.12.2002, 05:30
     
    maarten
    rank:
    Freshman Freshman
    registered:
     December 1969
    Status:
    offline
    last visit:
    16.03.06
    Posts:
    10
    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
  • Posted: 26.12.2002, 21:15
     
    CyberSliver
    rank:
    Freshman Freshman
    registered:
     December 1969
    Status:
    offline
    last visit:
    26.12.02
    Posts:
    3
    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.
  • Posted: 03.01.2003, 03:22
     
    jburke11
    rank:
    Registered User Registered User
    registered:
     December 1969
    Status:
    offline
    last visit:
    16.01.03
    Posts:
    1
    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.
  • Posted: 04.01.2003, 07:26
     
    SwissMac
    rank:
    Helper Helper
    registered:
     May 2002
    Status:
    offline
    last visit:
    18.09.06
    Posts:
    187
    Is the WYSIWIG editor itself editable? In other words, can some features be disabled, either globally, or more selectively?

    Cheers,

    Nigel
  • Posted: 07.01.2003, 05:49
     
    SadGeezer
    rank:
    Helper Helper
    registered:
     September 2002
    Status:
    offline
    last visit:
    27.10.05
    Posts:
    115
    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 :)
  • Posted: 10.01.2003, 05:47
     
    SWEDEN4
    rank:
    Freshman Freshman
    registered:
     November 2002
    Status:
    offline
    last visit:
    23.07.03
    Posts:
    40
    What is swapmode?
  • Posted: 10.01.2003, 07:14
     
    dberansky
    rank:
    Professional Professional
    registered:
     June 2002
    Status:
    offline
    last visit:
    01.04.03
    Posts:
    746
    afaict, it toggles between WYSIWYG and source view.
  • Posted: 14.01.2003, 21:06
     
    SadGeezer
    rank:
    Helper Helper
    registered:
     September 2002
    Status:
    offline
    last visit:
    27.10.05
    Posts:
    115

    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)
  • Posted: 16.01.2003, 18:08
     
    SadGeezer
    rank:
    Helper Helper
    registered:
     September 2002
    Status:
    offline
    last visit:
    27.10.05
    Posts:
    115
    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.
  • Posted: 21.01.2003, 01:37
     
    SadGeezer
    rank:
    Helper Helper
    registered:
     September 2002
    Status:
    offline
    last visit:
    27.10.05
    Posts:
    115

    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?
  • Posted: 21.01.2003, 12:22
     
    larsneo
    rank:
    Software Foundation Software Foundation
    registered:
     December 1969
    Status:
    offline
    last visit:
    15.11.08
    Posts:
    4481
    see here and here for some nice workarounds...

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

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula