View Full Version : making a module for adsense
cyr0n_k0r
07-30-2004, 12:55 PM
how would I go about making a module that meets 2 requirements.
uses 2 templates IE
adv_portal_modulename
adv_portal_modulenamebits
and will allow me to easily use google adsnese code inside the module (easy)
what is needed.
TheNakedMan
07-30-2004, 01:16 PM
I would think you could use skyscrapper ad-sense and use it as a custom block? I would think it would be a permanet thing.
cyr0n_k0r
07-30-2004, 05:03 PM
but how do I do that. I have no idea how to begin the process of creating new modules. (yes, I want the ad to be within a module)
KW802
07-30-2004, 05:27 PM
For my adsense ad (see http://www.farpointstation.org, left column near bottom), I just created a simple template with the Adsense script inside of a cell. You should be able to just use the below and swap the <script.... ..../script> code with your own.
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat">
<span class="smallfont">
<strong>$vba_options[portal_blockbullet] $mods[title]<strong>
</span>
</td>
</tr>
<tr><td class="$getbgrow" width="100%">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-8302299911530853";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_channel ="6330441493";
google_color_border = "B4D0DC";
google_color_bg = "ECF8FF";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "6F6F6F";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</td></tr>
</table>
<br />
To implement it.....
(1) Create a new template (ACP --> Styles & Templates --> Style Manager --> (for your skin you want to modify) Add New Template).
(2) I called mine adv_portal_google_adsense but you can call yours anything you want after the "adv_portal_" part. Copy & past the above code into the template. Change the parts inside of the "script" tags to be your own code that the Google Adsense page generated for you. Save the template.
(3) Create a new module. (ACP --> vBa CMPS --> Add Modules)
(4) For the values on this page.....
Title = Whatever you want
Template to include = The name of the template you created but only the part after the "adv_portal_" prefix. In my example the value to enter would be "google_adsense".
Active = Yes
Column = Your choice, for mine I have it in the left.
Display Order = Whatever sequence you want it to be appear in within the left column going top to buttom.
(5) Save your module. It'll ask if you you want to update all pages, etcetra -- your choice. Until you get more familiar with everything just make your life easier and choose all pages.
All done! Should now be appearing. :)
jhon2005
07-08-2005, 11:19 AM
Hi i an new to vbulletin i am trying to put google adsense i am not getting what is
Acp so if u can please tell me from this step thanks
(3) Create a new module. (ACP --> vBa CMPS --> Add Modules)
(4) For the values on this page.....
Title = Whatever you want
Template to include = The name of the template you created but only the part after the "adv_portal_" prefix. In my example the value to enter would be "google_adsense".
Active = Yes
Column = Your choice, for mine I have it in the left.
Display Order = Whatever sequence you want it to be appear in within the left column going top to buttom.
(5) Save your module. It'll ask if you you want to update all pages, etcetra -- your choice. Until you get more familiar with everything just make your life easier and choose all pages.
All done! Should now be appearing.
tomshawk
07-08-2005, 12:40 PM
ACP = Admincp = Admin Control Panel
so
(Admincp --> vBa CMPS --> Add Modules)
After that the instructions are as he stated above ;)
wolf314
07-09-2005, 10:46 AM
Another option you may want to try is this (replace with your own AdSense javascript) code:
<td align = "center">
<script type="text/javascript"><!--
google_ad_client = "pub-1234567890";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "EEF2F6";
google_color_bg = "EEF2F6";
google_color_link = "19334A";
google_color_url = "003399";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
I had to omit and change some of the code suggested in the other post because it was causing my page formatting to get broken. Modules wouldn't collapse, etc.
virtualburn
07-30-2005, 04:56 PM
This will add google ads after the first post in all threads, you can specify the group id's that will have to endure this, so other groups will not see them. Add at the very bottom of your posbit or postbit_legacy template ID's in red.<if condition="$post[postcount] == 1">
<if condition="in_array($bbuserinfo[usergroupid], array(1,2,6))">
$spacer_open
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-4403342228823268";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "142C4D";
google_color_bg = "333E65";
google_color_link = "F7E91D";
google_color_url = "CFEC0B";
google_color_text = "A6A9B4";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
$spacer_close
</if></if>
I use this to make users subscribe or register
duskdawn
10-07-2005, 10:29 AM
nice! but I would delete<tr>
<td class="tcat">
<span class="smallfont">
<strong>$vba_options[portal_blockbullet] $mods[title]<strong>
</span>
</td>
</tr>
donjohnson
10-10-2005, 10:18 PM
virtualburn
when you add that to make the adsense ad show in the first post how do you regulate who see's it and who doesn't, register, unregister,ect.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.