HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Disable the WYSIWYG editor for the forums only?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#97311 (In Topic #19289)
Avatar

Well-settled

Is there a way that this can be achieved with out a lot of custom coding?
I know you can disable this to be either on or off in the admin area which is good, but I would like for it to still be available to the admin area but not for the forums without having to confuse users who see this when I turn it back on when I am using it for admin purposes.

I do understand every user can manually disable this when they come to post, but what I feel is this is missed by them as they do not know the posting area they are typing in is called an editor (let alone a WYSIWYG editor).

I think just for forum posting like on my site the normal editor box is ample (maybe with a few tweaks for youtube etc), so even a way to maybe swap the process around like to enable to the WYSIWYG editor if wanted instead of disabling if not would be good.

Any help in finding some info in how to do that would be appreciated

Thanks Mark


Last edit: by kenno
Back to the top
 
Posted
Rating:
#97312
Avatar

What's the aim? Is it because the WYSIWYG is a bit bloated and over-complex?

If so, we have a hidden option you can activate in OcCLE:

Code

:set_value('simplify_wysiwyg_by_permissions','1');
It doesn't disable WYSIWYG, but it does show a simpler WYSIWYG to most users.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97315
Avatar

Well-settled

Hi Chris

Well I guess that is somewhat the aim, to make it more basic.
But it is not just so that it is fully complex in terms of layout and whats on offer, it is just that I think a "plain jane" very basic editor is a lot easier transition for my users who have come from a similar basic editor what is installed in Ravennuke (basically the phpbb2 forum post editor)

My own site is now being imported from Ravennuke like the golf site and I am trying to pre-empt certain areas which I think will cause them the most annoyance as with users of these type of sites, they really do not like change.

Also there are certain things which do not quite work in the editor as they do in the normal posting box which adds to the annoyance of these type of users who only want to make a quick post and move on.
Silly things like the spell checker in the browsers do not work while posting in there.
Sometimes it adds additional spacing between there posts, not being able to right click and paste very easily.
All very basic things which I don`t think the average poster who all they want to do is write a quick message and move on want to think about.

But o will they moan about them haha
Back to the top
 
Posted
Rating:
#97316
Avatar

Ok well I don't think it could be disabled by default without code changes I'm afraid. That said, it might be quite easy. JAVASCRIPT_EDITING.tpl:

Code

function wysiwyg_cookie_says_on()
{
   var cookie=read_cookie('use_wysiwyg');
   return ((cookie=='') || (cookie=='1')) && (browser_matches('wysiwyg') && ('{$MOBILE}'!='1'));
}

I suspect removing (cookie=='') || would effectively toggle the default.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97318
Avatar

Well-settled

I shall give this a try Chris.
Toggling the default being that they can still enable this if they wanted to then?

Will let you know

As always a great help

Mark
Back to the top
 
Posted
Rating:
#97319
Avatar

correct


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97320
Avatar

Well-settled

Chris

I tried this and it did change the default option to show the standard editor as default, but when clicking the link to enable the WYSIWYG editor, it now just jumps to the top of the site and will not enable this
Back to the top
 
Posted
Rating:
#97321
Avatar

That suggests to me you accidentally created a parse error. The function should be:

Code

function wysiwyg_cookie_says_on()
{
   var cookie=read_cookie('use_wysiwyg');
   return ((cookie=='1')) && (browser_matches('wysiwyg') && ('{$MOBILE}'!='1'));
}



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97322
Avatar

Well-settled

I need to try and only remove sections of code what I am advised to  O_o  O_o
You was correct, I removed all of this ((cookie=='') || instead of just (cookie=='') ||.

Seems to work like a charm, thanks again for your help.

Mark
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: