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

Reply
 
Thread Tools Display Modes
  #11  
Old 03-26-2012, 11:01 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try:
Code:
if ($this->editor_type != "fe")
{
   $this->addCustomToolbarButtons();
}
(Adds buttons to all editors but full editor).
Reply With Quote
Благодарность от:
Emeralda
  #12  
Old 03-26-2012, 11:34 AM
Emeralda's Avatar
Emeralda Emeralda is offline
 
Join Date: Oct 2011
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uhm... where do I put it? I tried replacing the previous code with yours, but nothing appeared.
Reply With Quote
  #13  
Old 04-26-2012, 03:22 PM
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Location: India
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for adding any particular custom bbcode to Quick Reply, create new plugin

Hook: editor_construct
Title: bbcode button
plugin code:

PHP Code:
if ($this->editor_type == 'qr') {
$this->config['toolbar'][] = array('xxx');

Replace xxx with Title of custom bbcode, to get title of bbcode open BB Code Manager in admincp.
Reply With Quote
Благодарность от:
deverill2010
  #14  
Old 11-16-2012, 01:40 PM
cjwinternet cjwinternet is offline
 
Join Date: Oct 2005
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Badshah93 View Post
for adding any particular custom bbcode to Quick Reply, create new plugin

Hook: editor_construct
Title: bbcode button
plugin code:

PHP Code:
if ($this->editor_type == 'qr') {
$this->config['toolbar'][] = array('xxx');

Replace xxx with Title of custom bbcode, to get title of bbcode open BB Code Manager in admincp.
That works great, thanks.
Reply With Quote
  #15  
Old 12-05-2012, 10:31 AM
Sworm Sworm is offline
 
Join Date: Feb 2008
Posts: 422
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using this one for all the custom BBcodes in QR and QE:

Hook: editor_construct
Code:
if ($this->editor_type == 'qr' || $this->editor_type == 'qe')
{
$this->addCustomToolbarButtons();
}
and this one to add "code" - "php" - "html" in the Quick Reply/Edit

Hook: editor_toolbar_filter
Code:
if ($this->editor_type == 'qr' || $this->editor_type == 'qe')
{
$toolbar[] = array('Code', 'Html', 'Php');
}
They working for me.
Reply With Quote
  #16  
Old 11-20-2014, 06:03 PM
msau msau is offline
 
Join Date: Oct 2014
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Badshah93 View Post
for adding any particular custom bbcode to Quick Reply, create new plugin

Hook: editor_construct
Title: bbcode button
plugin code:

PHP Code:
if ($this->editor_type == 'qr') {
$this->config['toolbar'][] = array('xxx');

Replace xxx with Title of custom bbcode, to get title of bbcode open BB Code Manager in admincp.
nOOb to a lot of this stuff, this worked great, thanks a lot.
Reply With Quote
  #17  
Old 04-20-2015, 05:29 PM
jamoss's Avatar
jamoss jamoss is offline
 
Join Date: Apr 2002
Location: Los Angeles
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Try this, in a plugin using hook editor_toolbar_set:

Code:
if ($this->editor_type == 'qr')
{
   $this->addCustomToolbarButtons();
}
Perfect! Just what I needed.
Reply With Quote
  #18  
Old 04-21-2015, 04:49 PM
thetechgenius's Avatar
thetechgenius thetechgenius is offline
 
Join Date: Jun 2014
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sworm View Post
I'm using this one for all the custom BBcodes in QR and QE:

Hook: editor_construct
Code:
if ($this->editor_type == 'qr' || $this->editor_type == 'qe')
{
$this->addCustomToolbarButtons();
}
and this one to add "code" - "php" - "html" in the Quick Reply/Edit

Hook: editor_toolbar_filter
Code:
if ($this->editor_type == 'qr' || $this->editor_type == 'qe')
{
$toolbar[] = array('Code', 'Html', 'Php');
}
They working for me.
Wow, that worked perfect! Thank you!

The only problem I have is, the PHP, HTML, and Code BBcodes show up twice in the Quick Reply Box. And I only have the first plugin active, when I have both plugins active, the PHP/HTML/Code BBCodes show up 3 times. Without the second plugin active, they show up twice.

Here is a screenshot:
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 11:32 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07552 seconds
  • Memory Usage 2,253KB
  • Queries Executed 13 (?)
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
  • (6)bbcode_code
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (2)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete