vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Add button to Newreply... (https://vborg.vbsupport.ru/showthread.php?t=41465)

Boofo 07-24-2002 12:12 PM

Add button to Newreply...
 
I'm having trouble getting the code right to add a button to the vbCode in the newreply template. I want to add a button like the quote button but this one will insert a space into the message. Here's what I have so far but it is not working. Can someone please help steer me in the right direction with this?

PHP Code:

In vbcode_language.js find

----------
quote_text "Insert a quote into your message";
----------

After that add

----------
space_text "Insert a SPACE into your message";
----------

In vbcode_buttons template find

----------
<
input type="button" class="bginput" value="PHP" title="PHP CODE" onclick="vbcode(this.form,'PHP','')" onmouseover="stat('php')">
----------

After that add

----------
<
input type="button" class="bginput" value="SPACE" title="Insert a Space" onclick="vbcode(this.form,'&nbsp;','')" onmouseover="stat('space')"


bad_madman 07-25-2002 03:38 PM

Use the Smiley javascript code for this :bandit: *fg

replace your line
Code:

<input type="button" class="bginput" value="SPACE" title="Insert a Space" onclick="vbcode(this.form,'&nbsp;','')" onmouseover="stat('space')">
with:
Code:

<input type="button" class="bginput" value="SPACE" title="Insert a Space" onclick="javascript:smilie('& nbsp;')" onmouseover="stat('space')">
or with this:
Code:

<input type="button" class="bginput" value="SPACE" title="Insert a Space" onclick="javascript:document.vbform.message.value+='& nbsp;';document.vbform.message.focus();" onmouseover="stat('space')">
Note: & nbsp; -> without blank (between & and nbsp; )


All times are GMT. The time now is 01:47 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.01355 seconds
  • Memory Usage 1,715KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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