vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   [RELEASE vB2.0] Code Buttons and Clickable Smilies (major update) (https://vborg.vbsupport.ru/showthread.php?t=10830)

03-10-2001 06:11 PM

I pasted it in in after <?php

on the second line that is..

isn't that right ?

03-10-2001 06:14 PM

Guess a developer should pop in..

I will see what I can do about putting this into beta 4. Please let me know when it is considered in a finished state so I can modify it as needed to add CP options. This functionality was on our todo list but we didn't have a chance to get around to it so it is on the 2.1 list but this one looks very nice so we can go ahead and use it.

03-10-2001 06:25 PM

If this is going to be included in beta4 I will do some cleaning-up of the code and check some more browsers.

I will also alter the text-prompts system to use a template, for multi-language capabilities.

I'll post back soon.

03-10-2001 06:27 PM

Quote:

Originally posted by DeathLoad
I pasted it in in after <?php

on the second line that is..

isn't that right ?

Yes, that's right... what version of PHP are you using? As you can see, no one else (has reported) this error, so perhaps it's something wierd with your PHP version?

03-10-2001 06:28 PM

It needs to not break any browsers but it is acceptable if it doesn't work for everyone since it is javascript. I tested it with the webTV browser and had no major problems. I would have templateized it but if you want to go ahead :)

03-10-2001 06:36 PM

Okay, question:

When I am templatizing (new word of the day) the prompts, would you prefer to have one template which contains stuff like
Code:

bold_text = "prompt for bold text";
italic_text = prompt for italic text";
etc...

or to have lots of little templates for each prompt? The only problem I can forsee with having multiple templates is the fact that Javascript will freak if there are linebreaks in there.

I won't be adding the rest of the contents of vbcode.js to templates, as it seems like a huge waste of bandwidth to continually download the same static code for every posting. I'll be leaving that as an external javascript file.

03-10-2001 06:52 PM

We don't like lots of little templates unless it is something we really have to do.

Also I think I will add a user option to enable/disable using the Code Buttons and Clickable Smilies. I do forsee some power users being upset at being forced to view the options on their post entries.

03-10-2001 07:03 PM

Splendid.

In that case, I will templatize it like this:
  • vbcode_prompts
    will contain the javascript prompts that appear in the prompt textbox
  • vbcode_buttons
    will contain the main HTML for the buttons and menus
  • vbcode_fontbits
    will contain the <option> bits for the fonts select
  • vbcode_sizebits
    will contain the <option> bits for the font-size select
  • vbcode_colorbits
    will contain the <option> bits for the font-color select
  • vbcode_smilies
    will contain the table for the posting-page smilies
  • vbcode_smiliebits
    will contain the individial smilies for the posting page
  • vbcode_smilies_getmore
    will contain the button to launch the overflow smilies window
  • popup_smilies
    will contain the HTML for the smilies popup window
  • popup_smiliesbits
    will contain the individual smilies for the popup
Will that be acceptable?

03-10-2001 07:14 PM

That sounds fantastic!
I'm really looking forward to that!

03-10-2001 07:42 PM

Awsome hack!

Mines up @ http://forums.nzgn.net.nz/

03-10-2001 08:07 PM

I'm using php 3..

I fixed the problem now, must have been something with pasting, but now I have another problem...

I can't add smilies by clicking on them, when I click on b.. it keep adding b tags not /b tags, and that goes for every tag.

Could it be that I'm doing something wrong? or is it IE5.5?

03-10-2001 08:10 PM

Quote:

Originally posted by DeathLoad
I'm using php 3..

I fixed the problem now, must have been something with pasting, but now I have another problem...

I can't add smilies by clicking on them, when I click on b.. it keep adding b tags not /b tags, and that goes for every tag.

Could it be that I'm doing something wrong? or is it IE5.5?

To close a tag, click the 'close current tag' button, or switch to 'normal mode'

03-10-2001 08:21 PM

Love the hack.

Thoughts: How about an admin function to enable/disable this "ability"?

Also, is there any way to make it so that if you click the button again it checks to see if the previous tag is the same one you're clicking on and whether or not it's closed yet? And if it is closed it?

And *pants* is there any way to make it so that the button appears to be in a "down state" when enabled, so the above comes true..

Thus eliminating the ned for a "close all tags" button...

? :)


Thanks,

Maz

BTW, Awesome hack, loved it since day 1 -- and GREAT! Can't wait to see it in Beta4!!

Maz

03-10-2001 08:36 PM

Thoughts: How about an admin function to enable/disable this "ability"?

Freddie says he will be doing this for the integration in beta4. I was planning to add it for the next version, but as freddie volunteered... ;)

Also, is there any way to make it so that if you click the button again it checks to see if the previous tag is the same one you're clicking on and whether or not it's closed yet?

I will be adding this tonight. <quote>It was on the to do list, but didn't quite make it into the last release</quote> ;)

And if it is closed it?

Hmm... perhaps... it would be easy to do, I'm just not sure that I would want to... I'll mull it over.

And *pants* is there any way to make it so that the button appears to be in a "down state" when enabled, so the above comes true..

Using <input type=button> buttons, there is no way to specify a 'down' appearence for the buttons. They would need to be images for this, which I don't want to do.

Thus eliminating the ned for a "close all tags" button...

I don't actually understand why this would remove the need for the 'close all tags' button... my users actually requested this specifically, so that they could close a {quote}{b}{i}{u} tag set with a single click.

03-10-2001 08:57 PM

Good points.. My users are stupid .. and don't read this board.. That is stupid when it comes to technology.

The close all button is great to have. Saying to get rid of it didn't make sense after i asid it :)...

And it'd be easy enough for me to create the image states in replace of the button, so no worries.

I personally like where you're going with this -- great work!

Maz

**waits impishly for the next version** :)

03-10-2001 09:50 PM

That's fine .. Just let me know when it is "done".

03-11-2001 12:07 AM

Kier, I have to say this is one incredible hack. And now that it's going to be implemented in beta 4, even better! :) Congratulations on a job very well done!

03-11-2001 12:39 AM

I noticed after implementing the hack that when you send a PM the smilies on the left don't work. Is this normal?

Thanks,

Michael

03-11-2001 12:41 AM

I donno, this may be dumb. But my users LOVE adding glow text. Any way you can add a drop down bar with colors to make text glow?

Code:

<table border=0 style="filter:glow(color=red,strength=1)">
Just an idea?


mkilty - I get the same thing

03-11-2001 12:48 AM

What exactly is glow text? I keep hearing about it but I've never actually seen it I don't think...

03-11-2001 01:42 AM

1 Attachment(s)
glow text is simply a fat color behind the normal text. I took a screen shot (attached) to give an example.

03-11-2001 02:09 AM

So when's Kier going to join the development team? :)

This is an awesome hack.. Just had to say that again.

Maz

03-11-2001 02:47 AM

Quote:

Originally posted by freddie
I will see what I can do about putting this into beta 4.
That would be wonderful, thanks :)

03-11-2001 02:53 AM

I also have an error with the SpellChecker now. It says:
Line:297
Char:34
Error: Message not Null or not an object

JavaScript Error:
http://www.clublexus.com/vb/newthrea...ad&forumid=14,
line 321:

f has no properties.
JavaScript Error:
http://www.clublexus.com/vb/newthrea...ad&forumid=14,
line 321:

f has no properties.
==========================



Now can someone else duplicate this or did I somehow mess up on that php script.....

03-12-2001 09:04 AM

I got the same prob.. I give up :(
I'll overwrite my backup files again.

03-12-2001 09:53 AM

This is easy to fix.

In your editpost, newthread and newreply templates, find the onclick event for the Spell Check button, and you will see an assignment for a variable called 'f'.

This is the code from newreply:
Code:

<INPUT TYPE = "BUTTON" VALUE = "Spell Check" onclick="var f=document.forms['REPLIER']; doSpell( '$spellchecklang', f.message, '$bburl/spellcheck/sproxy.php', true);">
Note that it expects to find a form called REPLIER in this case. You will need to replace REPLIER with vbform, as we renamed the form in order to make the clickable smilies work:
Code:

<INPUT TYPE = "BUTTON" VALUE = "Spell Check" onclick="var f=document.forms['vbform']; doSpell( '$spellchecklang', f.message, '$bburl/spellcheck/sproxy.php', true);">
Okay?

03-12-2001 11:39 AM

This hack is now updated to version 1.4, which I believe will be the final update before its inclusion in vBulletin Beta4.

Note to freddie: the version attached to the first post of this thread is newer than the version I sent you at the weekend. Please use this version instead.

03-12-2001 11:42 AM

i dunno if this have been mentioned before, but in enhanced mode.. when i click a couple of tags.. like b, u and i.. and then delete those.. and then click on b, and then on close all tags.. then all tags i deleted are closed.. :)

03-12-2001 11:46 AM

Quote:

Originally posted by X-PhoeniX
i dunno if this have been mentioned before, but in enhanced mode.. when i click a couple of tags.. like b, u and i.. and then delete those.. and then click on b, and then on close all tags.. then all tags i deleted are closed.. :)
Nothing I can do about that I'm afraid.

03-12-2001 01:19 PM

Quote:

Originally posted by Kier
Nothing I can do about that I'm afraid.
I kn?w.. It's just that the close tags system isn't such a good idea afterall?

But otherwise, this hack roels :)

03-12-2001 01:33 PM

Quote:

Originally posted by X-PhoeniX
I kn?w.. It's just that the close tags system isn't such a good idea afterall?
Why is that? If you use the code buttons for all your markup, the close tags system works perfectly. If you don't want the close tags functionality, then use normal mode or type your tags in the old, long-hand fashion.

The only way I could account for users deleting tags they entered with the code buttons would be to write some very nasty regular expressions to parse the message textarea, which would not be pleasant to write in Javascript, and is not something I plan to do right now.

03-12-2001 03:11 PM

thank you so much for this terrific hack !
question : i got a javascript error concerning spell check :

i get an "Object Expected"

<INPUT TYPE = "BUTTON" VALUE = "Spell Check" onclick="var f=document.forms['vbform']; doSpell( 'en', f.message, 'http://delightboard.cjb.net/spellcheck/sproxy.php', true);">

here :VALUE = "Spell Check"

what can be it ?

THANK YOU

03-12-2001 03:14 PM

He just got finished explaining it. Look up in the thread a few posts...

03-12-2001 03:18 PM

The main documentation page has full instructions on how to prevent/cure the main error with Spellchecking. However, your error doesn't look like it's caused by the codebuttons hack... are you sure that you have included the reference to the spellchecker javascript file properly?

03-12-2001 05:07 PM

Awesome work Kier!

Thanks for making it easy for us neophites to add hacks :D

03-12-2001 07:39 PM

Is there any way to convert the buttons to images? I used type="image" and src="imagelocation" but it immediately submits the form after pressing the image.

It would be appreciated if the option of using images were included in the version to be implemented into beta 4. I greatly dislike the current buttons. Thanks.

03-12-2001 07:41 PM

Invalid attachment specified. If you followed a valid link, please notify the webmaster

-- on the latest version

03-12-2001 07:56 PM

yes everything is ok ...
i still have this error i did not change any reference, but could u just remind us what should i check ?

damn ur forum looks nice :) how much time do you spend to make sutomization and hacks ?

thanks again


Quote:

Originally posted by Kier
The main documentation page has full instructions on how to prevent/cure the main error with Spellchecking. However, your error doesn't look like it's caused by the codebuttons hack... are you sure that you have included the reference to the spellchecker javascript file properly?

03-12-2001 08:01 PM

Quote:

Originally posted by leadZERO
Invalid attachment specified. If you followed a valid link, please notify the webmaster

-- on the latest version

Seems to work for the other 14 people who have downloaded the attachment since I uploaded the new version earlier today... http://www.vbulletin.com/forum/images/icons/icon5.gif

Quote:

Originally posted by Ryan Little
Is there any way to convert the buttons to images? I used type="image" and src="imagelocation" but it immediately submits the form after pressing the image.
<input type=image> acts the same as <input type=submit>

Quote:

It would be appreciated if the option of using images were included in the version to be implemented into beta 4. I greatly dislike the current buttons. Thanks.
How about using wluke's codebuttons then? His version uses images rather than form elements. If you want to modify my version, you will need to alter the function calls made on the onclick="" events for each of the buttons, as clicking an image does not expose this.form to javascript.

Quote:

Originally posted by TheDude
yes everything is ok ...
i still have this error i did not change any reference, but could u just remind us what should i check ?

Check for the presence of this code in your templates.
Code:

<script type="text/javascript" language="javascript" src="$bburl/spellcheck/spch.js"></script>
The spellchecker module really isn't my turf, so I would suggest you direct your questions to the support forum, as you appear to have done everything correctly in installing this hack.

Quote:

Originally posted by TheDude
damn ur forum looks nice :) how much time do you spend to make sutomization and hacks ?
Thanks. My forum currently has 257 customised templates, and just about every php page is hacked to pieces... I assume you have seen the image I posted here?

03-12-2001 08:59 PM

They must have been doing something with the database, because at the time I reported that error it showed it had been downloaded 0 times.


All times are GMT. The time now is 09:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01302 seconds
  • Memory Usage 1,832KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete