Hello
I am trying to make a "Google Revenue Sharing" in my forum
I create a new field so users can add their Adsense ID
then I tried coding the if else statement but it's not working correctly
and I placed this code in the new AD system that VB 4.0.4 provides..
if the user entered his adsense id, it should show his adsense ad inside his thread.
if the user did not enter any adsense id (field is empty) it should show my adsense id.
here is my code:
HTML Code:
<vb:if condition="$show['field455']">
<div style="float:left;margin:4px">
<script type="text/javascript">
google_ad_client = "{vb:raw post.field455}";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "6600CC";
</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<vb:else />
<div style="float:left;margin:4px">
<script type="text/javascript">
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_channel = "XXXXXXXXXX";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "6600CC";
</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
</vb:if>
1. Am I doing something wrong with the code above ?
2. what is the preg_match so the user should enter the correct format of the Adsense ID.
pub-################
pud- followed by 16 digits
thank you
--------------- Added [DATE]1277495356[/DATE] at [TIME]1277495356[/TIME] ---------------
any idea folks ?