SinekSekiz
-
Total Posts
:
10
-
Reward points
:
320
- Joined: Jun 26 '08
-
Status: offline
|
How do I create a custom PGDCode?
Fri. Mar 12, '10 7:22 AM
( permalink)
Hi I know I shouldn't have post this here and I am sorry in advance but unfortunatly this is the only place that I am allowed to post. I am an administrator of a ASPPlayground forum and trying to create a custom PGDCode for some time now. All I want to accomplish is that to add a code lets say when I write [custom] Text here. [/custom] that the text would be in; <span style="background-color: #FFFF00">
and </span>
So the text I enter would be highlited. I do really appoligise but this was my last option. Thank you.
|
|
|
|
Samuel
-
Total Posts
:
11850
-
Reward points
:
180550
- Joined: May 23 '01
-
Status: offline
|
Re:How do I create a custom PGDCode?
Fri. Mar 12, '10 11:16 AM
( permalink)
take a look at the pic below. This is a similar code to yours and you just have to substitute your tag info for mine while keeping the pattern.
ASPPlayground.NET ~ see our Version 4 plans here
|
|
|
|
SinekSekiz
-
Total Posts
:
10
-
Reward points
:
320
- Joined: Jun 26 '08
-
Status: offline
|
Re:How do I create a custom PGDCode?
Sun. Mar 14, '10 10:57 PM
( permalink)
Thank you very much and once again I do apollogise.
|
|
|
|
SinekSekiz
-
Total Posts
:
10
-
Reward points
:
320
- Joined: Jun 26 '08
-
Status: offline
|
Re:How do I create a custom PGDCode?
Mon. Mar 15, '10 2:38 AM
( permalink)
Sorry to bump this topic but how can I make this like [custom textcolor=red glowcolor=blue] [/custom] so when I define a color that would change my span #FFFF00 to something and text color to something else? I would like to use it for the following code; <font style="color:white; text-shadow: 0 0 0.2em red"> And if I could make a suggestion could you open a room for guys like me. Not for the owner but admins of the forums? I really do feel disturb to use this room for support purposes. : ) Thank you.
<message edited by SinekSekiz on Mon. Mar 15, '10 2:47 AM>
|
|
|
|
Samuel
-
Total Posts
:
11850
-
Reward points
:
180550
- Joined: May 23 '01
-
Status: offline
|
Re:How do I create a custom PGDCode?
Mon. Mar 15, '10 6:26 AM
( permalink)
you will have to use more advanced Regular Expression for this purpose. Check the [link] code to see how we incorporate parameters. the basic idea is to do such transformation: [custom textcolor={input1} glowcolor={input2}]{text}[/custom] to <font style="color:{input1}; text-shadow:{input2}">{text}</font> And you will have to do a few experiments to get it the way you want it.
ASPPlayground.NET ~ see our Version 4 plans here
|
|
|
|
SinekSekiz
-
Total Posts
:
10
-
Reward points
:
320
- Joined: Jun 26 '08
-
Status: offline
|
Re:How do I create a custom PGDCode?
Mon. Mar 15, '10 8:56 AM
( permalink)
To be totally honest with you I am completly lost. : ) I am more of a php guy myself so ASP coding is all another league for me. And syntax looks like giberish. : P I really did not understand what does $1 $2 $3 etc. stands for or how would you define it trough PDGCode. Otherwise may be I could do something experimentally. Thank you.
|
|
|
|
FreddyD
-
Total Posts
:
835
-
Reward points
:
41220
- Joined: Mar 02 '02
- Location: Louis Lake
-
Status: offline
|
Re:How do I create a custom PGDCode?
Mon. Mar 15, '10 9:07 AM
( permalink)
|
|
|
|
SinekSekiz
-
Total Posts
:
10
-
Reward points
:
320
- Joined: Jun 26 '08
-
Status: offline
|
Re:How do I create a custom PGDCode?
Mon. Mar 15, '10 10:15 AM
( permalink)
I've tried something like bellow with no succes. Please let me know if I am on right track. Because this is confusing like hell. So simply it suppose to put white where it was $get($2) and red to $get($3). Thank you.
<message edited by SinekSekiz on Mon. Mar 15, '10 10:24 AM>
|
|
|
|
Samuel
-
Total Posts
:
11850
-
Reward points
:
180550
- Joined: May 23 '01
-
Status: offline
|
Re:How do I create a custom PGDCode?
Mon. Mar 15, '10 10:53 AM
( permalink)
it should be like \[(neon) c\=([^\]\s]+) g\=([^\]]+)\]([^\[]+)\[\/\1\] and $2 will be whatever entered for c, and $3 will be whatever entered for g, and $4 will be the text to be surrounded.
ASPPlayground.NET ~ see our Version 4 plans here
|
|
|
|
SinekSekiz
-
Total Posts
:
10
-
Reward points
:
320
- Joined: Jun 26 '08
-
Status: offline
|
Re:How do I create a custom PGDCode?
Tue. Mar 16, '10 7:38 AM
( permalink)
Samuel it should be like \[(neon) c\=([^\]\s]+) g\=([^\]]+)\]([^\[]+)\[\/\1\] and $2 will be whatever entered for c, and $3 will be whatever entered for g, and $4 will be the text to be surrounded. Thank you very much guys. It is working flawlessly. By the way this is the full neon code if anybody needs it. So far I tested it IN IE8, Chrome and Safari and it is working flawlessly. <!--[if !IE]>--> <font style="color:$2; text-shadow: 0 0 0.2em $3, 0 0 0.2em $3, 0 0 0.2em $3, 0 0 0.2em $3, 0 0 0.2em $3">$4</font> <!--<![endif]--> <!--[if IE]> <div style="font-size:12px;letter-spacing:normal;color:$2;filter:Glow(color=$3,strength=2);height:20px;">$4</div> <![endif]--> So you should be wrighting it as; To use it you need to enter [neon c=color-name-for-text g=color-name-for-shadow][/neon] For example [neon c=white g=red]Your text here.[/neon] Thanks again. PS: What does \[\/\1\] bit stands for at the and of the regex?
|
|
|
|
Samuel
-
Total Posts
:
11850
-
Reward points
:
180550
- Joined: May 23 '01
-
Status: offline
|
Re:How do I create a custom PGDCode?
Tue. Mar 16, '10 7:52 AM
( permalink)
When you surround a string pattern with parentheses, you can refer to it with $(n) in the "replace with" string. But what if I want to refer to a string pattern inside the entire pattern? I would use \(n) instead of dollar sign. In our example, since the first ( ) surrounded pattern in the entire pattern is (neon), when you use \1, it means you are expecting (neon) to happen at the specific spot. \[\/\1\] = \[\/(neon)\] in our case for the closing tag.
ASPPlayground.NET ~ see our Version 4 plans here
|
|
|
|
SinekSekiz
-
Total Posts
:
10
-
Reward points
:
320
- Joined: Jun 26 '08
-
Status: offline
|
Re:How do I create a custom PGDCode?
Tue. Mar 16, '10 11:29 AM
( permalink)
I wonder why this does not work with <font> tag in IE. It works when I do it with; <div style="color:$2;filter:Glow(color=$3,strength=2);">$4</div> but when I try with <font style="color:$2;filter:Glow(color=$3,strength=2);">$4</font> it does not work.
|
|
|
|