PDA

View Full Version : Adsense Revenue sharing


Habboubih
06-05-2010, 04:35 PM
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 ?

Habboubih
06-07-2010, 08:02 AM
any idea ?

Habboubih
07-06-2010, 08:23 PM
Hello ??!!!!

merk_aus
07-07-2010, 10:52 AM
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

Habboubih
07-07-2010, 02:20 PM
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 1278516219 at 1278516219 ---------------

here is the code that i am trying to use in the new AD system;



<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.....