Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by s.molinari s.molinari is offline
Developer Last Online: Sep 2018 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-29-2001 Last Update: Never Installs: 102
 
No support by the author.

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!

Scott

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #82  
Old 01-02-2002, 02:07 PM
s.molinari's Avatar
s.molinari s.molinari is offline
 
Join Date: Nov 2001
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello all,

Has anyone had javascript errors when the vbcode/smilies are turned off? I had a user on our board who had a problem but up till now I haven't heard any more complaints. Can somebody who's installed this hack test it? It works fine here when I turn off vB code/smilies. And I can't seem to replicate the problem.

Scott
Reply With Quote
  #83  
Old 01-03-2002, 12:10 AM
Brian Cruz's Avatar
Brian Cruz Brian Cruz is offline
 
Join Date: Nov 2001
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by s.molinari
Hello all,

Has anyone had javascript errors when the vbcode/smilies are turned off? I had a user on our board who had a problem but up till now I haven't heard any more complaints. Can somebody who's installed this hack test it? It works fine here when I turn off vB code/smilies. And I can't seem to replicate the problem.

Scott
I had a member e-mail me recently saying that she got an error whenever she clicked on a text input box, preventing her from posting at all. She said she gets this error:

LINE : 182 (less often, it's 183)
CHAR : 1
ERROR : object expected
CODE : 0

With private messages she gets this error:

LINE : 275
CHAR : 1
ERROR : objected expected
CODE : 0

I'll ask her if she has the vbcode buttons turned off and get back to you.
Reply With Quote
  #84  
Old 01-03-2002, 12:53 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by s.molinari
Hello all,

Has anyone had javascript errors when the vbcode/smilies are turned off? I had a user on our board who had a problem but up till now I haven't heard any more complaints. Can somebody who's installed this hack test it? It works fine here when I turn off vB code/smilies. And I can't seem to replicate the problem.

Scott
Wow, I just got home from work and got this message:
Quote:
When I try to post anything, it
says "an error occurred in the script" and it won't let me type anything in
the message box. The error is on line 256 and it says "object is expected."
I'm using AOL 7.O. Is there some incompatibility?
He had vB code turned off. I tried and had no problem. I turned it on for him and sent him an email and told him to try posting again. He's not a regular, so I don't know when I'll hear back.
Reply With Quote
  #85  
Old 01-03-2002, 11:07 AM
s.molinari's Avatar
s.molinari s.molinari is offline
 
Join Date: Nov 2001
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@FWC and Brain Cruz

Thanks for the info. I think I'll have to post a fix for this. The problem is, when the user doesn't wish to use the vB buttons or smilies we have calls to functions that don't exist. The actual vbcode.js isn't the problem but rather the calling of the functions.

Keep me posted if you here some more news and I'll try to see about adding the fix.

I was also thinking of trying to add the functionality that when a text string is highlighted and a button is pressed, then the code is added to both sides of the highlighted text. I think that would be even better, don't you?

Scott
Reply With Quote
  #86  
Old 01-03-2002, 03:21 PM
Brian Cruz's Avatar
Brian Cruz Brian Cruz is offline
 
Join Date: Nov 2001
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to say that the user I mentioned does indeed have vB code turned off.
Reply With Quote
  #87  
Old 01-03-2002, 04:42 PM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by s.molinari
I was also thinking of trying to add the functionality that when a text string is highlighted and a button is pressed, then the code is added to both sides of the highlighted text. I think that would be even better, don't you?

Scott
That does sound good.
Reply With Quote
  #88  
Old 01-05-2002, 01:17 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by s.molinari
@FWC and Brain Cruz

Thanks for the info. I think I'll have to post a fix for this. The problem is, when the user doesn't wish to use the vB buttons or smilies we have calls to functions that don't exist. The actual vbcode.js isn't the problem but rather the calling of the functions.

Keep me posted if you here some more news and I'll try to see about adding the fix.Scott
Scott, my user came back after I toggled his smilies and vBcodes back on and was able to post with no problem.
Reply With Quote
  #89  
Old 01-19-2002, 02:35 PM
Stretchr's Avatar
Stretchr Stretchr is offline
 
Join Date: Dec 2001
Location: Georgia, USA
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I click inside the text box I immediately get an Object Expected Line 290 of newreply.php etc, etc, etc. I've been through all the posts here twice and didn't see a solution. I believe I've done everything correctly, including using the txt file to edit vbcode.js. I'm sure I saw something about this but I can't find where. Any ideas? I really want this hack. Thanks!
BTW I'm using IE 6
Reply With Quote
  #90  
Old 01-19-2002, 02:45 PM
Stretchr's Avatar
Stretchr Stretchr is offline
 
Join Date: Dec 2001
Location: Georgia, USA
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I use the vbcode.js you provided it works but if I edit the one that comes with 2.2.1 it didn't. Is there any problem with using the file you provided with 2.2.1 or did I misunderstand the previous threads? Thanks for an EXCELLENT hack!
Reply With Quote
  #91  
Old 01-19-2002, 02:52 PM
LuBi LuBi is offline
 
Join Date: Oct 2001
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Stretchr
When I use the vbcode.js you provided it works but if I edit the one that comes with 2.2.1 it didn't. Is there any problem with using the file you provided with 2.2.1 or did I misunderstand the previous threads? Thanks for an EXCELLENT hack!
No it should work, I had some trouble setting it up myself but it works on 2.2.1 wonderfully leased:
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 10:21 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.05260 seconds
  • Memory Usage 2,315KB
  • Queries Executed 25 (?)
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
  • (5)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete