vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vBcode and smilie user interface improvement (https://vborg.vbsupport.ru/showthread.php?t=23366)

s.molinari 07-21-2001 10:00 PM

Ok, I'm not sure if this has already been done. I checked Kier's original hack and I searched for other possible hacks and didn't find any.

This hack or code improvement, as I would like to call it, helps out with the problem of the vBcode or smilies always being added to the end of the text in the textarea box. In other words no matter where you would like to add a vBcode or smilie it will always be placed at the end of the text written.

The new vbcode.js script below will fix this. With this improvement you could go any where in the text that you have written and add smilies or format the text in what ever way you would like. The added vBcode or smilie will always be inserted at the point where the cursor is.

Please note: You must add the following in the textarea tag for the message, otherwise the new script will not work. You'll find these textareas in the newreply and newthread templates.

Your new textarea tag should look like this(red code denotes the chages that should be made):

Code:

<textarea name="message" rows="20" cols="$textareacols" wrap="virtual" tabindex="2"
onChange=getActiveText(this) onclick=getActiveText(this) >$message</textarea>

All you have to do after changing the templates is copy the new vbcode.js onto your server and voila, your users will be loving you. :)

Enjoy and let me know what you think.


Scott

s.molinari 07-22-2001 02:32 PM

oops.......pressed the wrong botton. Here is the file.

Scott

eva2000 07-22-2001 02:32 PM

huh is the change in vb_code.js and the newthread and newreply as well?

s.molinari 07-22-2001 02:47 PM

Quote:

Originally posted by eva2000
huh is the change in vb_code.js and the newthread and newreply as well?
You must change the newthread and newreply templates in order to get the changes in the vbcode.js script to work.

Make more sense now?

Scott

eva2000 07-22-2001 02:50 PM

Quote:

Originally posted by s.molinari


You must change the newthread and newreply templates in order to get the changes in the vbcode.js script to work.

Make more sense now?

Scott

yup i posted before you did the attachment post that's why hehe

Freddie Bingham 07-22-2001 02:51 PM

Please remember to not post vBulletin source code *which* includes the javascript files.

ToraTora! 07-22-2001 02:57 PM

could you give a better area for description in the new reply and new thread area? Is this a hack for 2.01, because i am not finding these statements for 2.0.

Proximate line locations, or something along those lines?

ztsky 07-22-2001 02:59 PM

Works well,thank you.

ToraTora! 07-22-2001 03:00 PM

i must be blind, or this is for 2.01....

ToraTora! 07-22-2001 03:05 PM

nevermind. Blind is the answer we are looking for here. :)


All times are GMT. The time now is 06:19 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.02457 seconds
  • Memory Usage 1,729KB
  • 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_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete