View Full Version : vBcode and smilie user interface improvement
s.molinari
07-21-2001, 10:00 PM
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):
<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
s.molinari
07-22-2001, 02:32 PM
oops.......pressed the wrong botton. Here is the file.
Scott
eva2000
07-22-2001, 02:32 PM
huh is the change in vb_code.js and the newthread and newreply as well?
s.molinari
07-22-2001, 02:47 PM
Originally posted by eva2000
huh is the change in vb_code.js and the newthread and newreply as well?
You must change the newthread and newreply templates in order to get the changes in the vbcode.js script to work.
Make more sense now?
Scott
eva2000
07-22-2001, 02:50 PM
Originally posted by s.molinari
You must change the newthread and newreply templates in order to get the changes in the vbcode.js script to work.
Make more sense now?
Scott yup i posted before you did the attachment post that's why hehe
Freddie Bingham
07-22-2001, 02:51 PM
Please remember to not post vBulletin source code *which* includes the javascript files.
ToraTora!
07-22-2001, 02:57 PM
could you give a better area for description in the new reply and new thread area? Is this a hack for 2.01, because i am not finding these statements for 2.0.
Proximate line locations, or something along those lines?
ztsky
07-22-2001, 02:59 PM
Works well,thank you.
ToraTora!
07-22-2001, 03:00 PM
i must be blind, or this is for 2.01....
ToraTora!
07-22-2001, 03:05 PM
nevermind. Blind is the answer we are looking for here. :)
ok now what can we do without the the file :confused:
ToraTora!
07-22-2001, 03:27 PM
my thoughts exactly. here i searched for this crap, and finely found it, only to discover the main ingrediant is missing.
I think in these such cases, delete the whole thread, so people arent adding this and than finding out there is something missing.
(like i did)
yeah your right Tora Tora because we cant force the hack writter to write the instructions because I think sometimes it takes along time to do so
anyway I hope Scott with have the time to rewrite the instructions :( because it is a hack I would love to have
ztsky
07-22-2001, 03:57 PM
Originally posted by dxb
yeah your right Tora Tora because we cant force the hack writter to write the instructions because I think sometimes it takes along time to do so
anyway I hope Scott with have the time to rewrite the instructions :( because it is a hack I would love to have
How do you think about *.js ?
ToraTora!
07-22-2001, 03:59 PM
it wasnt the instructions that caused the problems though. It was the file that was attached that did.
That is why i said, if the hack is presented, and a good portion of it is taken away, than axe the whole works, because hes not going to be able to post the java script again. :)
ztsky
07-22-2001, 04:04 PM
Originally posted by ToraTora!
it wasnt the instructions that caused the problems though. It was the file that was attached that did.
That is why i said, if the hack is presented, and a good portion of it is taken away, than axe the whole works, because hes not going to be able to post the java script again. :)
I see.
Freddie Bingham
07-22-2001, 04:35 PM
ztsky since you think it is ok to post the source code why don't you also put your *valid* vb license information in your profile.
s.molinari
07-22-2001, 05:43 PM
Originally posted by freddie
Please remember to not post vBulletin source code *which* includes the javascript files.
Sorry, I wasn't aware of that rule. It makes since though. How stupid of me. I'm sure, however, many users would be happy with the improvement. Maybe you could include it in the next version.
Everyone, this "hack" was not in it's own right a hack but rather an improvement in the vbcode.js script. I unfortunately didn't know about posting vB source code so my attaching the script went against the rules. Therefore the script has been removed.
Scott
s.molinari
07-22-2001, 06:00 PM
vB Dev Team,
Just a note. If you do decide to use the vbcode.js script could you please let me know. Either per email or PM or even a post, doesn't matter.
Scott
Delhaze
07-22-2001, 07:03 PM
Why haven't the VB develpoers created an area on the webserver that is protected for valid license holders, like the members area, where files like this can be downloaded.
If it doesn't happen I can see customers moving to FREE open source alternatives as soon as they become as powerfull, and with hacks easily available.
kchii
07-22-2001, 07:03 PM
Sounds like a great hack. I have a valid license (info entered in profile), so if someone could verify this and send me the updated js file? I'm not sure if this is possible, but and help would be much appreciated. Thanks! :)
s.molinari
07-22-2001, 07:35 PM
Originally posted by Delhaze
Why haven't the VB develpoers created an area on the webserver that is protected for valid license holders, like the members area, where files like this can be downloaded.
If it doesn't happen I can see customers moving to FREE open source alternatives as soon as they become as powerfull, and with hacks easily available.
Your point is a good one but situations like mine are an exception. I don't think there are too many code improvements to warrant such extra effort as you explained. What I did isn't exactly a bug fix and not really a hack, that's why I say it is an exception. We will just have to wait and see if the new vbcode.js file will be implemented in the next version.
Scott
Freddie Bingham
07-22-2001, 08:02 PM
Scott send your improvements to Kier and if they are kosher than he can make the needed changes in time for 2.0.2
s.molinari
07-22-2001, 08:15 PM
Originally posted by freddie
Scott send your improvements to Kier and if they are kosher than he can make the needed changes in time for 2.0.2
Willdo - havedone :)
Scott
samtha25
07-22-2001, 08:48 PM
Originally posted by s.molinari
Your point is a good one but situations like mine are an exception.
Not sure how exceptional as this is the second case I've come across just now of something being removed for license violation in just the last few minutes while searching for something else.
The point about competition from open source is a good one, as this is one area where open source may well produce an excellent contender. One of the tricks of competing against open source is to capture as much of the flavor of it as possible without giving away the store. So, I think the idea of having a download area for hacks/improvements from the members only area or perhaps a licensees' only forum for such exchanges is a very good one.
TDawson
07-22-2001, 09:38 PM
We need a "Members Only" forum!!!!!!
tubedogg
07-22-2001, 11:20 PM
Originally posted by samtha25
Not sure how exceptional as this is the second case I've come across just now of something being removed for license violation in just the last few minutes while searching for something else.That was kind of a fluke. I think the last time this happened was in March or April.
The point about competition from open source is a good one, as this is one area where open source may well produce an excellent contender. One of the tricks of competing against open source is to capture as much of the flavor of it as possible without giving away the store. So, I think the idea of having a download area for hacks/improvements from the members only area or perhaps a licensees' only forum for such exchanges is a very good one.I would tend to agree. However I think the way it is now is a good system too. It allows it be out in the open without compromising vBulletin's source.
Delhaze
07-22-2001, 11:36 PM
I think in this case it's a bit pointless imposing any restriction.
This is after all a .js file.
The original can be download from ANY vb site.
Can somebody who manged to install the new file give me a link to their vb site.
I won't download it honest, although if I happen to find it in my cache ...........
tubedogg
07-22-2001, 11:56 PM
The general discussion is about vB source as a whole, not just .js files. Yes, .js files can be downloaded as you say, however PHP files cannot. We cannot pick and choose what parts of the license we enforce, or when we enforce them.
Delhaze
07-23-2001, 12:17 AM
I think you'll find that you actually can, but you choose not to.
Anyway, thanks for the hack Scott, it is working brilliantly. :D
tubedogg
07-23-2001, 12:38 AM
Let's put it this way: it's bad business to only enforce certain portions of a license. If we weren't going to enforce something, why would we put it in the license?
And in this case, allowing people to post full vB files would be completely against the point of running the business and selling vBulletin. And please don't start the argument of "then why isn't it free".
Delhaze
07-23-2001, 01:42 AM
For those of you who want to install it, and have managed to aquire the new .js file, I have found the following templates need to be changed:
Calendar Templates
calendar_enterevent
editpost
New Posting Templates
newreply
newthread
Private Messaging Templates
priv_forwardmultiple
priv_sendprivmsg
priv_sendtobuddies
Any one know if there are any more?
This hack is a absolute must have, I've only had it installed for an hour or so, and already writing this message without it is tedious. :mad:
Please VB People, tell us it will be included in the next update. ;)
ToraTora!
07-23-2001, 03:02 AM
i was here when this all went down, and two people got it. I was to busy searching for things in the wrong places, and as such, missed the boat. I knew it would be taken down, and rightfully so. I think we can all agree on that. If its going to be added to the next release, than I can wait. Im not going to add a bunch of things, only to repeat it again, or not have to due in part its already included, which it sounds like it will.
However, there is another valid point made amongst this. I would also like to see what is on the slate for release, and what the release date time period is looking like.
Kind of a planning situation for me on what, if any, mods I could add to our board, without having to worry about having everything wiped out again.
That is why we are currently with 2.0, because we knew the other one would be rite around the corner (3 months..or so.)
:D
Freddie Bingham
07-23-2001, 01:55 PM
On slate for release? Just bug fixes. When? Don't know.
Originally posted by freddie
ztsky since you think it is ok to post the source code why don't you also put your *valid* vb license information in your profile. ZING!
oh, could someone take a shot of it for me, I wanna see (or atlest know) what improvments it makes?
s.molinari
07-23-2001, 05:14 PM
Originally posted by Delhaze
I think you'll find that you actually can, but you choose not to.
Anyway, thanks for the hack Scott, it is working brilliantly. :D
I didn't give it to him, honest! :)
Scott
ToraTora!
07-23-2001, 05:40 PM
Originally posted by snyx
ZING!
oh, could someone take a shot of it for me, I wanna see (or atlest know) what improvments it makes?
Instead of the VB code, or smilies always showing up at the end of your paragraph, they could now be inserted where ever you wanted them.
ooooooooh! I like that!
can ya add it to the dev. forum?
s.molinari
07-23-2001, 06:03 PM
For those who are interested:
I sent the new vbcode.js file to Kier and he is looking it over. When he gives it the go ahead, I'm sure it will be added to the new release.
Scott
s.molinari
07-23-2001, 06:05 PM
Originally posted by Delhaze
For those of you who want to install it, and have managed to aquire the new .js file, I have found the following templates need to be changed:
Calendar Templates
calendar_enterevent
editpost
New Posting Templates
newreply
newthread
Private Messaging Templates
priv_forwardmultiple
priv_sendprivmsg
priv_sendtobuddies
Any one know if there are any more?
This hack is a absolute must have, I've only had it installed for an hour or so, and already writing this message without it is tedious. :mad:
Please VB People, tell us it will be included in the next update. ;)
Thanx for the update. I wasn't sure if I had all the templates where vbcode.js was used. Obviously I missed afew. ;)
Scott
Delhaze
07-23-2001, 07:38 PM
Originally posted by s.molinari
I didn't give it to him, honest! :)
Scott
I manged to find it for myself :D
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.
s.molinari
07-23-2001, 08:12 PM
Unfortunately in my euphoria, I forgot to test it with nutscrape.
And of course it doesn't work.
Scott
s.molinari
07-25-2001, 03:40 PM
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. :D
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. :D
Again, Kier has the script and is giving it a look over. With any luck it will be released in vB2.0.2.
Scott
VirtueTech
07-26-2001, 05:49 AM
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?
phumphries
07-26-2001, 04:38 PM
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. :D (Just kidding, guys!)
First-Man
07-26-2001, 04:48 PM
Where is the File?:confused: :confused:
Mentor
07-26-2001, 06:12 PM
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.
Freddie Bingham
07-26-2001, 06:18 PM
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.
Mentor
07-26-2001, 07:41 PM
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.
s.molinari
07-27-2001, 03:33 PM
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
ThomasP
07-28-2001, 08:00 AM
Hi there,
I'm eager to use this hack, sounds fantastic, my users already complained about that.
Come on, please find a way to let us implement the hack.
Don't let us paying customers down...
thx,
-Tom
Dark_Wizard
07-28-2001, 05:23 PM
Originally posted by s.molinari
Hello Freddie,
Does what you said mean I have permission to post the script?
Scott
I don't see any problem with posting it. This is just justifying the fact that we need a "members only hack download" area! I've expressed in the past that I would be willing to provide the space for this if needed!
ToraTora!
07-28-2001, 06:06 PM
Please go here:http://www.vbulletin.com/forum/showthread.php?s=&threadid=23466 to voice your opinons on the subject of a members only area. :)
phumphries
07-30-2001, 03:53 AM
I think that what this really speaks to is the desire for a simple file compare utility for people who do not want to write up instructions. If my foggy memory serves correctly, the vB folk do recommend Beyond Compare from Scooter Software (http://www.scootersoftware.com/). Has anyone used it?
s.molinari
07-30-2001, 07:35 PM
Hello,
For those of you interested in this script, I have now gotten permission to post it. You can find it.here (http://www.vbulletin.com/forum/showthread.php?s=&threadid=24033).
Scott
amykhar
11-05-2001, 10:13 PM
The link for this attachment is pointing to the old forums. Can it be migrated over here please?
Amy
Baratator
11-05-2001, 10:37 PM
Originally posted by s.molinari
Hello,
For those of you interested in this script, I have now gotten permission to post it. You can find it.here (http://www.vbulletin.com/forum/showthread.php?s=&threadid=24033).
Scott
Hum I cannot access this page it says i don't have the permissions to... but i've got a valid liscence but don't know where to put the number :/
pls i neeeeeeeeeeeeeeeed this hack :/
Why wasnt this put in the update?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.