Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-24-2013, 04:44 AM
induslady induslady is offline
 
Join Date: Jul 2006
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default ckeditor Customization

Hello,
Am looking for cusotmizing ckeditor in my forums, wherein I would want to remove the Options related to "Table" and "Codes" like "Wrap php tags around selected tags". PFA screen shot of the options that is marked in red box which I would like to remove.

Attachment 146500

Is there a way to do this ?

Appreciate any help. Thanks.
Reply With Quote
  #2  
Old 09-24-2013, 05:25 AM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe you can do this by turning off the advanced WYIWYG editor.

ACP -> Settings -> Options -> Message Posting Interface Options

Change Full Editor in the "Enable Clickable Message Formatting Controls" section to Enable Standard Controls

Note: This will limit your users to using only the basic editor. If you want them to be able to use the full WYSIWYG editor then you will have to make some template edits. I do not have the time to find those templates and suggest which edits to make, but don't worry someone else will come along and help you with that
Reply With Quote
  #3  
Old 09-24-2013, 08:29 AM
induslady induslady is offline
 
Join Date: Jul 2006
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello John,
Thanks for the response. In fact I would want WYSIWYG editor but just that I do not want some options in this editor like table, code etc. Looked up at the template - editor_ckeditor but it does not look like a simple template edit to comment those options.
Any other way to do this?
Reply With Quote
  #4  
Old 09-24-2013, 08:37 AM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not in a template. You would need to comment out the lines you don't want in ckeditor.php.

Sometimes it's a bit of trial and error to achieve this correctly.
Reply With Quote
  #5  
Old 09-24-2013, 10:13 AM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can do it with a plugin at "editor_toolbar_set"

Look at vb/ckeditor.php, line 338. It's built up the array $toolbar then changed it to $this->config['toolbar']. So you want to re-write $this->config['toolbar'][13] or $this->config['toolbar'][14] if $iespell, so it would be something like this

Code:
 
if($this->editor_type == 'fe' OR $this->editor_type == 'cms_article')
{
     if($iespell)
     {
          $this->config['toolbar'][14] = array( ........);
     }
     else
     {
          $this->config['toolbar'][13] = array( .......);
     }
}
Reply With Quote
  #6  
Old 09-25-2013, 03:28 AM
induslady induslady is offline
 
Join Date: Jul 2006
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Nerbert,
Re: You can do it with a plugin at "editor_toolbar_set"
I checked the Plugin manager in AdminCP but did not see this plugin. Where do I find it to edit?
Thanks.
Reply With Quote
  #7  
Old 09-25-2013, 04:41 AM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You make it yourself. You have the hook location and the basic structure of the code that goes in it. Now just pick and choose what parts you want based of the code in vb/ckeditor.php
Reply With Quote
  #8  
Old 09-25-2013, 08:55 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe it is simple, do either option:

1- Method A:

find out what id of each tool icon you want to hide using Chrome inspection element tool, then add a css style to your additional.css like this: #cke_6{display:none;}

so you will do that for each element you want to hide.

2- Method B (if you use ckeditor mod for MARCO):

you can go to Admin Cp/ settings/ User Registration Options/ select show standard editor toolbar.

if you are using a mod for the ckeditor such as, https://vborg.vbsupport.ru/showthread.php?t=264219

you can choose the options to show or hide whatever you like...

Good luck,
Reply With Quote
  #9  
Old 09-26-2013, 05:06 AM
induslady induslady is offline
 
Join Date: Jul 2006
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Nerbert,
Thanks for the pointer, yes I was able to achieve commenting out the toolbar by looking at the file - vb/ckeditor.php
Thanks fxdigi-cash too for your inputs too and that helped.

BTW do you guys have any suggestion here -
https://vborg.vbsupport.ru/showthread.php?t=302585

Thanks in advance.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:39 AM.


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.05827 seconds
  • Memory Usage 2,249KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete