vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to change button placement in message toolbars (https://vborg.vbsupport.ru/showthread.php?t=312018)

msmayz 06-09-2014 04:46 PM

How to change button placement in message toolbars
 
Hey guys. How do I change the placement of the buttons in the message toolbars? I recently added a strikethrough button, but it appears at the end of the toolbar. I would like to move it so that it's located in the text emphasis group with the bold, italic, and underline buttons.

Thanks!

msmayz 06-11-2014 05:03 AM

Bumpity bump. I'd still like to move the new strikethrough button so that it's adjacent to the bold/italics/underline buttons in the toolbar. Any ideas? Anyone?

tbworld 06-11-2014 08:32 AM

Since you already have your plugin working:

The easiest way to do this is to edit the file "/vb/ckeditor.php". Find the class::method "SetToolbar" (around line #258) and add your ckeditor plugin reference directly to the toolbars. You can easily rearrange the toolbars in this class::method.

If you need to do this via a plugin you can recreate/rearrange the toolbar arrays and use the hook: 'editor_toolbar_set'.

Example: (for "/vb/ckeditor.php").
PHP Code:

  // Hopefully, I did not over simplify.

  
$toolbar[] = array('Bold''Italic''Underline');  //original
  
$toolbar[] = array('Bold',  'MyCustomPlugin',  'Italic'' Underline'); // new - positioned 



Sincere thanks for all the 'pioneers' that indirectly (years ago) took the time to point me in the right direction via your articles and posts. You guys/gals never get praised enough: @Cellarius, @Nerbert, @Lynne, @Kh99. If I missed anyone I apologize.

msmayz 06-15-2014 06:20 AM

Thanks, tbworld! That worked perfectly.

My only issue now is that the new BBCode button appears in both places: with the bold/italics/underline group (which is what I wanted, yay!), and at the very end of the last toolbar. How do I remove it from the latter location?


All times are GMT. The time now is 02:43 PM.

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.01114 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete