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)
-   -   New vbcode.js - vBcode and smilie user interface improvement (https://vborg.vbsupport.ru/showthread.php?t=24033)

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

Hello vB Troopers,

With special permission from the Dev Team I am proud to release an improved version of vbcode.js. Any usage of this script other than in licensed vBulletin driven Boards is a direct violation of Jelsoft copyrights. Any violators will be prosecuted to the full extent of the law!

One MAJOR Improvement(note: only works with IE, NS users are out o luck! But who uses NS anyway?)

vBcode and smilies will be inserted wherever the cursor is instead of at the end of the text.

Installation
Copy the new vbcode.js file over your old one(see "Another small note" below). If you'd like to keep the old file just rename it before copying the new one.

You need to add the following text to the "message" textarea tag:
Code:

onChange=getActiveText(this) onclick=getActiveText(this)
It should basically look similiar to this:
Code:

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

Please note: The variable($message) may be different in some templates, editpost for example, so make sure to keep the original variable in the textarea attribute "name =". Otherwise the text may be missing in some instances.

This textarea can be found in the following templates:

Calendar Templates

calendar_enterevent

New Posting Templates

newreply

newthread

Private Messaging Templates

priv_forwardmultiple

priv_sendprivmsg

priv_sendtobuddies

and the editpost template

additional template changes

In the vbcode_popup_smilies template you must delete the following code:
Code:

<script language="JavaScript">
function smilie(smilietext) {
        opener.document.vbform.message.value += smilietext+" ";
        //opener.vbform.message.focus();
}
</script>

In the vbcode__popup_smiliebits template you must change:
Code:

<a href="javascript:smilie('$smilie[text]')">
to:
Code:

<a href="javascript:opener.smilie('$smilie[text]')">
small note:If you use the above code pleas omit the space between java and script.


If these changes aren't made the new script WILL NOT WORK!

I hope to hear from those who use it, and please let me know if you find a bug.


vB.org is using this hack. Try it out!:D

Scott

Latest release date: 20.04.2002
Any version older than this should be updated.

smithy256 07-30-2001 07:30 PM

thanks but i cant install it because im a complete newbie.

s.molinari 07-30-2001 07:38 PM

Quote:

Originally posted by smithy256
thanks but i cant install it because im a complete newbie.
Can you copy a file to your web server and cut and paste in windows?

That's all the skills you need.:)


Scott

Delhaze 07-30-2001 07:46 PM

I have the latest version installed and all is well. :)

I would also like to congratulate the VB team for allowing this file to be posted.

You have completely restored my faith with your new common sense approach.

It will also reduce the number of hits I was getting to this file on my board. :D

ThomasP 07-30-2001 09:12 PM

Hi Scott,

really a great hack! Works like a charm, "installation" was easy.

And thanks to the vB Team, too.

cu & Gr??e ;)
-Tom

P.S.: At least it works in NS the way it did before, so this is not really a drawback...

RobAC 07-31-2001 12:57 AM

Found a problem with this hack. If I go to edit a post I made, the content of my post does not show up within the text field. I had to revert my editpost template back to the original. Anyone else experiencing this?

s.molinari 07-31-2001 04:27 AM

Quote:

Originally posted by RobAC
Found a problem with this hack. If I go to edit a post I made, the content of my post does not show up within the text field. I had to revert my editpost template back to the original. Anyone else experiencing this?
Hello Rob,

You were probably a bit too fast. In the editpost template you probably copy and pasted over the $postinfo[message] variable. It is something I should point out in my installation instructions.

The textarea in editpost should look like this:
Code:

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

Scott

tubedogg 07-31-2001 05:18 AM

Awesome Scott :)
v cool and works great.

s.molinari 07-31-2001 06:38 AM

Quote:

Originally posted by tubedogg
Awesome Scott :)
v cool and works great.

Thanx for the compliment Kevin. Coming from you means alot!:D

Scott

VirtueTech 07-31-2001 07:42 AM

I found the script and used it...I had problems with my netscape users...they seemed to get script errors...when this ran.

Not sure what it was...I didn't get to test it with netscape...

EDITED - I thought this was the original thread you started. I didn't see the new vbcode.js at the top of the page...I came into this thread via 'lastpost'. I got the last vbcode off Ztsky's site and that one didn't work.

This new one you posted works great! Thanks. :)


All times are GMT. The time now is 03:01 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.01337 seconds
  • Memory Usage 1,745KB
  • 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
  • (6)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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