![]() |
1 Attachment(s)
Latest version: 1.4 / 12th March 2001
http://kier.3dfrontier.com/vbhacks/vbcode.gif This major rewrite of my original vbcode buttons hack now supports two code-entering modes, allowing complex nesting of vBcode tags, a limited number of clickable smilies on the posting page and a smiley overflow popup window. Version 1.2 updates: New replacement functions for array.push() and array.pop(), which are unsupported in IE versions less than 5.5. Everything should work properly in IE4.0, IE5.0 now. Also added a simple inline help/prompt system. Version 1.4 updates: Enhanced mode no longer allows multiple open tags of the same type ({b}{b}{b}xxxxx) etc). Templateized the whole system for easier addition of more fonts/colours/sizes etc. Moved all text-prompts to a separate vbcode_language.js file for easy modification for non-english boards Updated documentation to fix spellchecker problems Various cosmetic changes, mainly to prevent Nutscrape from messing it up... Full documentation / installation / upgrade instructions are available here A basic demo can be seen here. The templates and code for the hack are attached to this post. Please post comments, suggestions and questions in this thread. |
Awsome, really really awsome hack. It just looks plain beautiful. The 404 thing i was talking about is nothing. It was just a bad server.
|
Aah, glad it works for you :)
|
wow, you did that smileys change already!!! you are a complete star. Thanks so much going to install this today.
|
p.s. before i go for this, are there any changes that result from the change to beta3 i just installed?
|
I'm just looking at the Beta3 code right now, but as far as I can see, there are no changes required to this hack for vB2.0b3 compatability :)
[edit]I've just finished upgrading, and the installation instructions for vb2.0beta2 require no modifications for beta3 installation.[/edit] |
Ok what happened to me:
i) i could only find one place to change the code inside the private template? ii) one of the template changes required you to add the name=vbcode as the form had apparently not been named. Perhaps add this to instructions iii) the "enhanced mode" just gives me a javascript error iv) when i tried to reply to a private message i just get "array". I don't know if this is because of the the vb beta 3 upgrade or because of the hack or beacuse i could not find the second place to edit the tempalte. Thanks for a great hack getting these few things fixed would be wicked :) |
i) i could only find one place to change the code inside the private template?
Sorry, that was an error in the documentation. It's calendar.php that requires the double replacement, not private.php ii) one of the template changes required you to add the name=vbcode as the form had apparently not been named. Perhaps add this to instructions Done iii) the "enhanced mode" just gives me a javascript error That's wierd... I can't reproduce that at all, and I've tested with IE5, IE5.5, NS4.6 and NS6.0... have you got a link to a page where I can see this happening? iv) when i tried to reply to a private message i just get "array". I don't know if this is because of the the vb beta 3 upgrade or because of the hack or beacuse i could not find the second place to edit the tempalte. Likewise, I can't reproduce that either. A link would help in the diagnosis. |
<a href="http://ascifi.com/forums/newreply.php?action=newreply&threadid=2987" target="_blank">http://ascifi.com/forums/newreply.ph...&threadid=2987</a>
is a place to try but you would have to register don't worry if you don't have time at the mo. The smileys are also not coming in with reply but i think this is probably me not installing it properly. I am not sure how i could have done the "array" thing or the javascript error though. |
Quote:
|
Chris, try out this dummy page and see if you still get javascript errors:
http://kier.3dfrontier.com/vbhacks/vbcode_example.htm Oh, and what browser are you using? |
javascript error is
"object does not support this propery or method" at line 87 and 90 |
yes, same error. IE 5.00
|
I've just tried it with another copy of IE5.0 and it would seem that IE5 doesn't support the <arrayname>.push(var) method...
I'm looking for a workaround. It works fine in IE5.5 and all versions of Nutscrape. |
i am using my non standard comp hence ie5 though i should upgrade it.. but i bet some of my users will use ie5.00 so a work round would be good.
cheers... any ideas on that array in pm? perhaps it is a vb beta 3 thing (has anyone upgraded?) |
also when i edit a post, the post appears blank. Is this perhaps because of changing the name for the form? will it make a difference?
|
Your PM array problem is easy to fix:
Just replace your message textarea with this: <TEXTAREA NAME="message" ROWS=20 COLS=60 WRAP="VIRTUAL">$message[message]</TEXTAREA> In fact, you seem to have lost quite a few of the correct variables for the contents of your textarea elements in your templates. Review the default templates and check that you have the correct variables inbetween the <textarea> and </textarea> tags. This will fix your editpost and priv_sendprivmsg problems. Finding a workaround for IE versions less than 5.5 having no array.push() method is going to be a little more tricky... |
thanks, just found the text area problem, silly me :)
Looking forward to the advanced fix although the "simple" version works brilliantly. |
Dig out a copy of Nutscrape or upgrade to IE5.5 and try out the 'enhanced' mode - now that kicks ass ;)
Hmm... workaround.... |
just tried nutscrape 4.6 a horrible browser... anyway had a few problems.
I did: italic with the promt, (I) and then some text and then closed it.. fine so got [*I]sdfsfsdfdf[*/I] then i used the buttons tounderline, italic and bold typed some text and then said close all. But i got: [*/U][*/I][*/I][*/U][*/U][*/I][*/I][*/I][*/I][*/I] for some reason. The other thing is that pressing "close" makes the cursor go to the start of the text box which is pretty annoying... |
ok, this is kinda off the topic but, i love your smilies, can you please post them here or tell me where i can get the,
thanks |
Gee Chris, you seem to have quite a collection of broken browsers ;)
just tried nutscrape 4.6 a horrible browser... indeed ;) italic with the promt, (I) and then some text and then closed it.. fine so got [*I]sdfsfsdfdf[*/I] I have to admit that for about 10 minutes there I was really confused as to why the script would be putting asterisks into your tags... then I worked out what you were saying :rolleyes: then i used the buttons tounderline, italic and bold typed some text and then said close all. But i got: [*/U][*/I][*/I][*/U][*/U][*/I][*/I][*/I][*/I][*/I] This sounds like another problem with the array.push() and array.pop methods, which are used to store and retrieve the tag history. I can't reproduce it on the version of NS4.6 I have here, but hopefully the workaround will fix this for you. The other thing is that pressing "close" makes the cursor go to the start of the text box which is pretty annoying... This always happens with NS4.6, I'm afraid there's no way to position the cursor at the end of the text in that browser. It does pop to the end using later browsers though. |
Quote:
|
Quote:
http://www.smilecwm.com/ |
that is the absolute nuts
that is amazing, and i want it ok 1st get vB2 then gt a book on PHP then add that hack ! (then come back here when i have broken my forum) ~Ben |
thanks a lot, i should have said i added the * to stop vbcode happening, sorry ;)
Perhaps i should start a collection of rubbish old browers hehe... really need to upgrade them all...! |
I've just updated this to version 1.2, including a fix for older versions of IE. Check the first post in the thread for more. :)
|
Looks very good! One thing though; The standard javascript-prompts are ugly as hell, it would be very nice if a next version contains self designed popups where you can fill in some parameters...
|
One question though: Why don't you use the vbulletin standard template mechanism in order to integrate it fully into it and make it easier to let it be included in a next version?
|
added this to b3 and when i enter the calendar and try to enter a pub event nothing shows up the template seems to be unchanged but if i goto the templates they are all there as require dthe custom ones and the changed calendar_enterevent ???
any ideas |
i love the hack, the only annoying thing is it means you can't use the tab button so easily when replying to get to the post box... to get that to work would require a major rehash of the templates (puting the text box on the left where Your Reply is now and the putting all the vb code and smileys on the right.) maybe in the future i might do this though.
|
Quote:
edit: that is in calendar.php i mean. |
This could be fixed with the 'tabindex' property:
Quote:
|
thanx mate spot on i forgot the second instance :) works like a charm now...kudos to kier on a job well done :)
|
Kier, i have most of them but i don't see the paddle pop one in the members area, maybe it was because i am half asleep
|
How to specify the max number of smilies to display on the posting page? in another word how to set value of $maxSmilies ?
|
Quote:
Quote:
Quote:
For a table with 3 columns and 10 smilies, use this: PHP Code:
|
Kier-
Just wanted to say thanks for the great hack.... I got it up and running in no time thanks to the great docs, and really love it. Thanks :) |
Parse error: parse error in ./global.php on line 78
After I uploaded admin/functions.php :( |
Quote:
|
All times are GMT. The time now is 01:35 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|