vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Adsense Revenue sharing (https://vborg.vbsupport.ru/showthread.php?t=244001)

Habboubih 06-05-2010 04:35 PM

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 ?

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


All times are GMT. The time now is 11:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01024 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete