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: Unknown Rating:
Released: 07-21-2001 Last Update: Never Installs: 1
 
No support by the author.

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

Show Your Support

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

Comments
  #42  
Old 07-23-2001, 07:38 PM
Delhaze Delhaze is offline
 
Join Date: Oct 2001
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by s.molinari

I didn't give it to him, honest!
Scott
I manged to find it for myself

I think there may be a minor bug with it, as far as inserting Smilies with netscape 4.

I have "bodged" a fix, but maybe you can have a look and see if there is a better solution.
Reply With Quote
  #43  
Old 07-23-2001, 08:12 PM
s.molinari's Avatar
s.molinari s.molinari is offline
 
Join Date: Nov 2001
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately in my euphoria, I forgot to test it with nutscrape.

And of course it doesn't work.

Scott
Reply With Quote
  #44  
Old 07-25-2001, 03:40 PM
s.molinari's Avatar
s.molinari s.molinari is offline
 
Join Date: Nov 2001
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can somebody tell me why I'm busting my a.. uh... brains training to get the script to work half ways on Nutscrape?

It's like pulling teeth. But I got it working or rather I got the bugs out.

Anyhow, for those interested, it now works with Nutscrape 4.X, albeit, as it always did. That means when you use Nutscrape the vBcode or smilies will always be appended to the end of any text already written.

If your using IE, then the script appends the smilies and vBcode wherever the cursor is. It is really nice because you can go back and easily go crazy reformatting your text or add smilies anywhere you'd like.

Again, Kier has the script and is giving it a look over. With any luck it will be released in vB2.0.2.


Scott
Reply With Quote
  #45  
Old 07-26-2001, 05:49 AM
VirtueTech VirtueTech is offline
 
Join Date: Oct 2001
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not just post your enhancements to the code?

This way we can hack it in

Thanks for this.

anyways....question: What happens if a user hits the more smilies option? Will it still place their smilie from the pop-up window in the place where the cursor was last?
Reply With Quote
  #46  
Old 07-26-2001, 04:38 PM
phumphries's Avatar
phumphries phumphries is offline
 
Join Date: Nov 2001
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will echo that sentiment. With the amount of ink spent on this so far, the hack up instructions could have been written several times over.

Has anyone tried the new .js file with NS6? Of course those functions will not work with NS4; it does not implement the same methods and properties for text areas as does IE5. When the vBcode hacks first came out, I found an excellent comparison of the two that explained just this point, but I cannot locate it, now.

As far as I know, that is the only difference between the two browsers, though. (Just kidding, guys!)
Reply With Quote
  #47  
Old 07-26-2001, 04:48 PM
First-Man
Guest
 
Posts: n/a
Default

Where is the File?
Reply With Quote
  #48  
Old 07-26-2001, 06:12 PM
Mentor Mentor is offline
 
Join Date: Oct 2001
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

freddie: js code is not secure. In fact, anyone can get it from your website here, http://vbulletin.com/forum/vscript.js Anyone know knows ANYTHING about web programming knows this. I also belive that kier has releaed this hack, before it was in the official vb code.
Reply With Quote
  #49  
Old 07-26-2001, 06:18 PM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mentor thanks for telling me what I already know. Feel free to grab the .js but remember that you cannot post the .php files and this sort of thread will give that idea to some people hence my actions.
Reply With Quote
  #50  
Old 07-26-2001, 07:41 PM
Mentor Mentor is offline
 
Join Date: Oct 2001
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then instead of remove the file, simple post in bold leters on the very top of the thread, stating that you may not post the php files anywhere, but the js is an exception.
Reply With Quote
  #51  
Old 07-27-2001, 03:33 PM
s.molinari's Avatar
s.molinari s.molinari is offline
 
Join Date: Nov 2001
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by freddie
Mentor thanks for telling me what I already know. Feel free to grab the .js but remember that you cannot post the .php files and this sort of thread will give that idea to some people hence my actions.
Hello Freddie,

Does what you said mean I have permission to post the script?

Scott
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 12:27 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.04333 seconds
  • Memory Usage 2,308KB
  • 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
  • (1)bbcode_code
  • (2)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)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