MegaShadowChao™
CG:R Administrator
##CEREAL KILLER##~~ CHZ Forums ~~ ~~ TEH 1337 CODER OMG ~~
Do not test me with a lightsaber, you will die. (Da straw are mah saber ^.^)
Posts: 160
|
Post by MegaShadowChao™ on Dec 28, 2006 16:39:54 GMT -5
The CG, thanks to my awesome knowledge of CoffeeScript™ ( ;D ), now has tags that allow you to test whether or not the viewer is using IE or not, and display text based on that. These tags are fairly complex in usage, so read this whole post before continuing.
They are formed with the following sytax: [browsertest]<text here>[else]<text here>[/browsertest] All three of those blocks must be present or the tag will not work. The text on the left of the [else] tag is what to display if you're using IE, and the text on the right is what to display if you're not.
Here's an example: INPUT: [browsertest]Hello IE user![else]Hello non-IE user![/browsertest] OUTPUT: [browser]Hello IE user![browser]Hello non-IE user![/browser]
If you view that in IE, you will see that it does indeed say "Hello IE user!" and if you view it in anything else, you will see that it says "Hello non-IE user!". Try it! I have tested this code on both IE and FF, so it should by all means work.
Also, note that the code works with multiple lines of text. Observe: INPUT: [browsertest]IE line 1 IE line 2[else]Non-IE line 1 Non-IE line 2[/browsertest] OUTPUT: [browser]IE line 1 IE line 2[browser]Non-IE line 1 Non-IE line 2[/browser]
Comments, questions, tests, etc. go here.
|
|
|
Post by Occorru on Dec 28, 2006 19:25:34 GMT -5
Wow, it does work....
|
|
MegaShadowChao™
CG:R Administrator
##CEREAL KILLER##~~ CHZ Forums ~~ ~~ TEH 1337 CODER OMG ~~
Do not test me with a lightsaber, you will die. (Da straw are mah saber ^.^)
Posts: 160
|
Post by MegaShadowChao™ on Dec 28, 2006 19:35:56 GMT -5
Yep, they sure do. ;D Do it wrong though, and it looks really messed up. XD
[browser]IE[browser]non-IE[browser] ^ Like that; forgetting to put the "/" in "[/browsertest]". =P
|
|
|
Post by ♠Ace Element♠ on Dec 29, 2006 13:14:27 GMT -5
[browsertest]Hello Friend![else]Hello Asshat![/browsertest]
[browser]Hello Friend![browser]Hello Asshat![/browser]
|
|
MegaShadowChao™
CG:R Administrator
##CEREAL KILLER##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;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
Yep, just like that. =)[browser]Tsk tsk tsk. Open up this page in IE or you won't be able to see my post. Anyway, it goes just like that, AE. ;D[/browser]
|
|
vail
Chao Egg
[M:0][A:0]
Posts: 0
|
Post by vail on Jan 27, 2007 14:13:30 GMT -5
What does it do?
|
|
MegaShadowChao™
CG:R Administrator
##CEREAL KILLER##~~ CHZ Forums ~~ ~~ TEH 1337 CODER OMG ~~
Do not test me with a lightsaber, you will die. (Da straw are mah saber ^.^)
Posts: 160
|
Post by MegaShadowChao™ on Jan 27, 2007 14:43:07 GMT -5
It checks wether or not the user is using IE, and displays text based on that.
Observe: [browser]You're using IE![browser]You're not using IE![/browser]
|
|
vail
Chao Egg
[M:0][A:0]
Posts: 0
|
Post by vail on Jan 27, 2007 14:44:45 GMT -5
What is IE! ??
|
|
MegaShadowChao™
CG:R Administrator
##CEREAL KILLER##~~ CHZ Forums ~~ ~~ TEH 1337 CODER OMG ~~
Do not test me with a lightsaber, you will die. (Da straw are mah saber ^.^)
Posts: 160
|
Post by MegaShadowChao™ on Jan 27, 2007 14:49:00 GMT -5
Internet Explorer, the default Windows browser. =P
|
|
vail
Chao Egg
[M:0][A:0]
Posts: 0
|
Post by vail on Jan 27, 2007 14:50:32 GMT -5
Oh. And did you get my PM?
|
|