Log in

View Full Version : BB Code Enhancements - CSS Text Shadow BB Code


vijayninel
09-10-2010, 10:00 PM
https://vborg.vbsupport.ru/external/2010/09/4.gif

This BB code will give a CSS drop shadow to text inside it. You can use it to create better looking articles, posts, news etc. It works on all browsers except Internet Explorer.

In the vB ACP go to Custom BB Codes > BB Code Manager and click on Add new BB Code and fill in the following.

Title : Text shadow

BB Code Tag Name : shadow

Replacement : <span style="text-shadow: {option}px {option}px {option}px #a4a1a1;">{param}</span>Example : text shadow

Description : This bb code is used to give a shadow to text.

Use {option} : Yes

Button Image : https://vborg.vbsupport.ru/external/2010/09/20.png

Remove Tag If Empty : Yes

Disable BB Code Within This BB Code : No

Disable Smilies Within This BB Code : No

Disable Word Wrapping Within This BB Code : No

You can set the shadow distance by adjusting the value inside the first tag. For eg this [shadow=2] will give a shadow of 2 pixels.

To change the colour of the shadow replace the : #a4a1a1 with any colour that you want.

Please mark installed if used. :)

gosiah23
09-11-2010, 03:46 AM
Vijayninel, many thanks for making this. I have installed it according to your instructions but is not working on my website. I'm running VB 4.0.5

I have checked in Mozilla Firefox, Safari and IE. Any suggestions ?

vijayninel
09-11-2010, 04:30 AM
Hi! Just to clarify, are you specifying the shadow amount when using the code ? like are you giving [shadow=4] or any number ? just putting [shadow] wont work.

Also if your background is of a darker colour then you may have to change the colour of the shadow from #a4a1a1 to something that is more suitable and contrasting for your background.

chuckhodson
09-11-2010, 04:53 AM
Works great thanks man.

gosiah23
09-11-2010, 05:07 AM
I got it! It does work great. I got everything right except when the option box was coming up I was putting [shadow=4] instead of just 4.

Now, I have a question. If I don't want to use the "option" where in the coding would I put the shadow number?

Thanks,

Margaret

vijayninel
09-11-2010, 05:21 AM
If you dont want to use option, then just replace the {option} in the replacement with the size number of the shadow you want in pixels.

For example this code :

<span style="text-shadow: 4px 4px 4px #a4a1a1;">{param}</span>

used along with this BB code text will give you a fixed shadow of 4 pixels. You wont be able to change the shadow size according to the size of the text.

vijayninel
09-11-2010, 05:22 AM
Works great thanks man.


Welcome. Please click installed if used. :(

gosiah23
09-11-2010, 05:35 AM
Thanks again, this anwers my questions :)

Great work! :up:

Margaret

txipiron
09-11-2010, 08:02 AM
Installed in 4.0.1 and works perfectly

goxy63
09-11-2010, 04:28 PM
Well great but not working in IE, too bad.... how to install this when over 50%of my users use IE?

Just rated, thank you

vijayninel
09-11-2010, 05:01 PM
Well great but not working in IE, too bad.... how to install this when over 50%of my users use IE?

Just rated, thank you

What can we do if Microsoft cannot make a browser which supports CSS ? Anyway not all sites have users which primarily use IE. On my site 70% of the users use Firefox for instance.

Besides it wouldn't hurt to use this affect. At least the users of other CSS compliant browsers will have a better visual experience on your site.

COL NIL SATIS
09-12-2010, 04:47 PM
installed this the other day!!!!!!! its fantastic ..thanks Vijay

sebaxtian
10-26-2010, 07:31 PM
installed VB 4.0.8 and works perfectly.. thanks!!

YankForum
10-28-2010, 12:56 AM
awesome , tnx for sharing

Hawkgirl
11-05-2010, 11:41 PM
I dig this - thanks so much!!