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:
Hi,
Anybody know how to remove the space that gets inserted after the tag is closed?
for example, if you highlight a word and then click the bold button, a space is inserted after the tag automatically. I'd like to get rid of the space.
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.
...snip....
Scott
Was there ever a fix for this? I installed in about 3 weeks ago and I'm starting to have users complain of javascript errors. If I re-enable the VBCode for them, the problem disappears just as has been posted earier.
Any fix?
(still a great hack... )
Thx,
Phil
Sorry, I had fixed this in the vB-Germany thread but forgot to update you guys. Shame on me.
Here is the fix. I never tested it but a couple of German users told me it works like a charm so give it a try. If you have probs. let me know. Please read the note below too!
NOTE!Of course this will only fix the js errors for a new thread. You'll have to fix the other templates and scripts too. (i.e. for new replies and private messages) If someone could post the other templates and scripts here I would be very greatfull.
The php code also needs to be changed as you wrote(exactly the same) in editpost.php and newreply.php.
Then the template changes should also be done (exactly the same as you wrote) in the editpost template and newreply template.
This fixes the javascript errors.
Regarding the private message phps (private.php and private2.php) the code is different and I didn't want to mess with it (i.e. break it :ermm: ). So, I just removed the