Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 05-26-2006, 01:02 PM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Creating a custom editor button to insert text

I wonder if someone can help me with this.

I want to create a new button on the regular and quickreply editors that will insert some pre-defined text into the reply box when it is clicked.

I am aware of this thread that will add extra buttons to the quickreply but those are for features already available on the full reply (like align, font etc.).

What I want to do is create a button for a CUSTOM function that is not anywhere else and that is NOT a custom bbcode.

In other words, a user clicks the button and a phrase like "abcdefghijk" is automatically inserted into the reply box so they don't have to type it themselves. Simply that.

Can this be done?

If it can, a little more complex would be if there was a drop-down menu to choose from several different phrases to insert....but that's not absolutely necessary...getting just the one custom phrase insert would be a tremendous help. I'm not a coder but I can follow directions. Can anyone help me? Thanks so much.
Reply With Quote
  #2  
Old 05-26-2006, 02:33 PM
creedmaniac creedmaniac is offline
 
Join Date: Jan 2006
Location: South Carolina
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this would be an awesome hack, it'd be useful to me as well
Reply With Quote
  #3  
Old 05-27-2006, 04:33 AM
Krahl Krahl is offline
 
Join Date: Aug 2005
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If this is turning into a full-blown request for a mod from one of our outstanding coders, I'll vote for the drop-down, multiple choice version.

Great idea, I hope someone can and will do this one!
Reply With Quote
  #4  
Old 05-28-2006, 10:45 AM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can anyone help? is this doable?

Me again. Been spending a lot of time trying to search for a way to do this. Again, I'm not a coder so I'm hampered quite a bit already there. Anyway, from what I've read so far....

Is there some way to use the "onclick" command within a link to do this? Make a button on the editor and "onclick" it returns "this" and puts it in the textarea box. Like the emoticons, that get inserted using "onclick". But instead of inserting :smilie: into the textarea it would insert a string of text that I pre-define.

Is this helping any? Getting closer at all?
Reply With Quote
  #5  
Old 05-31-2006, 12:04 PM
Emmy2 Emmy2 is offline
 
Join Date: Jan 2004
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Krahl
If this is turning into a full-blown request for a mod from one of our outstanding coders, I'll vote for the drop-down, multiple choice version.

Great idea, I hope someone can and will do this one!
If anyone is interested I've figured out how to create a button to insert text into the reply box. I've posted it in the Dice Roll thread because we are using it to insert code for a preset dice roll. But it could be used to insert ANY complex bbcode string or text sentence or whatever you wanted to insert with the click of a button.

My code to add one button is on page 6, then others add code to create drown down menus and user interfaces...

https://vborg.vbsupport.ru/showthrea...=113972&page=6

ps. unfortunately the code only works with the standard editors. Users would have to click the A/A button to toggle from the wysiwyg editor to standard to use the insert buttons.
Reply With Quote
Reply

Thread Tools
Display Modes

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:09 AM.


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.03934 seconds
  • Memory Usage 2,189KB
  • Queries Executed 11 (?)
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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_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