revenue_sharing_by_role_help.inc in Google AdSense integration 5.2
File
contrib/revenue_sharing_by_role/revenue_sharing_by_role_help.inc
View source
<?php
function revenue_sharing_by_role_help_text() {
global $user;
$uid = $user->uid;
$headers = array(
t('Ad type'),
t('Dimensions'),
);
$rows = array();
foreach (adsense_ad_formats() as $format => $data) {
$rows[] = array(
$data['desc'],
$format,
);
}
$ad_formats_text = theme('table', $headers, $rows);
$referral_link = 'http://baheyeldin.com/click/476/1';
$output = <<<EOF
<H2>Overview</H2>
<P>This module provides web site admins the factility to share revenue from Google AdSense ads with
those writing the content on the site, according to certain percentages.</P>
<H2>Prerequisites</H2>
<P>You must have a Google AdSense account before using this module. If you do not have an account,
then please consider using <A HREF="{<span class="php-variable">$referral_link</span>}">the modules author's referral link</A>, which
provides us with a referral fee from Google at absolutely no cost to you. This page also contains
various useful links and resources on AdSense, and how to optimize your site for it.</P>
<H2>Revenue sharing</H2>
<P>For revenue sharing, each author gets a predefined share of ad revenue from clicks occuring on
nodes they authored.</P>
<P>In order for the user to be credited they must have a Google AdSense account. As a site admin,
please advertise <A HREF="{<span class="php-variable">$referral_link</span>}">the module author's referral link</A>, which provides us
with a referral fee from Google, at absolutely no cost to you. This page also contains various useful
links and resources on AdSense and how to optimize your site for it.</P>
<P>Each user must enter their Google AdSense client ID in the profile field you defined above.</P>
<H2>Configuration</H2>
<P>To use this module, you need to do the following first:</P>
<UL>
\t<LI>
<P>Go to <A HREF="/admin/user/profile">Administer -> User management -> Profiles</A> and
create a new profile field of type "single-line textfield". Name this field something like
"Google AdSense client ID", and form name "profile_google_adsense_client_id". This
is a required configuration parameter. At a minimum you should enter this field for user 1.
\t </P>
\t <P>Note that the new profile field must be setup as: "Private field, content only available to privileged
users". All other values are either insecure (others can see the Google Adsense ID of the user), or will
not work, so do not use any of them.</P>
\t <P>If you want to force users to enter a value when they sign up, then use the following settings:</P>
\t <UL>
\t\t <LI>The user must enter a value (checked).
\t\t <LI>Visible in user registration form (checked).
\t </UL>
\t <P>You should enter a descriptive explanation for the Google AdSense client ID, so users know what to
enter in this field.</P>
\t<LI>Go to <A HREF="/user/{<span class="php-variable">$uid</span>}/edit">My account -> Edit</A>, then click on the category that you defined
for the Google AdSense client ID and enter your Google ID, which is something like "pub-9999999999999",
and click Submit.
</UL>
EOF;
return $output;
}