Version: , by s.molinari
Developer Last Online: Sep 2018
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:
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:
I still need help with this code. After I installed it when members would go to edit a post the body where their text was is blank. Can anyone help me out my members are bothered by it big time mad emails
Hey everyone. I just installed this at CCDV.com and love it, but it's missing something. when you highligh text in normal mode it correctly grabs the text and sticks in in the popup then inserts the vbcode around the text, but when in enhanced mode, the highlighted text gets lost. this is a problem
I wrote the original UBB Code buttons hack back in the day which was later used by the vb team to build these great vbcode buttons. (hey vb team, great job by the way. your code is damn pretty compared to my old messy code.) I was disappointed to see that the vbcode buttons were missing the cursor possition and highlighted text enhancements so it's great to see this addon hack.
real quick, I got a fix for this and wanted to share.
here are 2 new functions. replace the ones in this hack with these new functions and it will work.
code removed due to some error. I reposted it on the next page as an txt attachment and that code works fine.
now when in enhance mode, if you highlight some text and hit any of the top row vbcode buttons or dropdowns and the text will get surrounded by the begining and ending vbcode tags. the bottom row buttons will still open prompts.
I hope it isn't a problem for me posting this code. if this is some copyright violation or something, feel free to delete.
I tried your replacements, Mutt, and what happens to me now is that in enhanced mode, if I select some text and hit a button, the text is replaced by the opening tag, not surrounded by the opening and closing tags.