The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adsense Revenue sharing
hello folks,
I am trying to implement a Adsense Revenue sharing system. here what I've done and what I need 1. I created a custom user field so the user can add his Adsense ID what is the preg_match so the user should enter the correct format of the Adsense ID. 2. Now I should create a new AD inside the first post (suppose the adsense field name is: field22) 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 (field22 is empty) it should show my adsense id. what is the code ? |
#2
|
|||
|
|||
any idea ?
|
#3
|
|||
|
|||
Hello ??!!!!
|
#4
|
|||
|
|||
I am no coder but I would expect it would be something like this:
<vb:if condition="$show['userid']"> Shows to the user number <vb:else /> $show['field22'] </vb:if> As I said hopefully someone with coding experience will reply and correct me. But I thought I would try to help |
#5
|
|||
|
|||
That would work if I modified postbit template
But using it in the new vb 4.0.4 AD system will not work ,,, Thank you so much ,, any other ideas ? --------------- Added [DATE]1278516219[/DATE] at [TIME]1278516219[/TIME] --------------- here is the code that i am trying to use in the new AD system; HTML Code:
<vb:if condition="$post['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-3xxxxxxxxxxxxxxx"; google_ad_channel = "6xxxxxxxxxxxx"; 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> in all cases, it is always showing the second condition..... |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|