php forum
php mysql forum
php mysql smarty
 
Topic Options
#311187 - 08/10/06 09:07 PM [7.x] [Finished] Adsense Custom Block
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
For those wanting to add a Google Adsense block, copy the following (with your advertiser id) into a custom block:
Code:
/* PHP CODE HERE */

/* BODY HERE */
$body = <<<EOF
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-5168900358893374";
google_alternate_color = "000000";
google_alternate_ad_url = "http://banners.undergroundnews.com/CS.gif";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="3810782578";
google_ad_type = "text_image";
google_color_border = "000000";
google_color_bg = "081750";
google_color_link = "FFFFFF";
google_color_url = "CCCCCC";
google_color_text = "FFFFFF";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
EOF;


You can add this to your forum through the control panel (Control Panel -> Custom Islands -> Custom Island #1); to add the custom island to your forum you will need to edit the forum(s) that you wish it to be provided on and select the island from the "Custom Island Insert" dropdown on the "Custom Inserts" tab.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#311367 - 08/26/06 03:05 PM Re: Adsense Custom Block [Re: Gizmo]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25554
Loc: Texas
I missed this? Thanks gizzy thumbsup
_________________________
- Allen wavey
- What Drives You?

Top
#311442 - 09/05/06 04:53 PM Re: Adsense Custom Block [Re: AllenAyres]
usr bin geek Offline
Moderator / Kingpin

Registered: 02/11/01
Posts: 817
Loc: Burlington, VT
If you're using the Custom Island Insert (between the 1st/2nd post) you can increase your clicks by blending in the ad unit a bit.

Example:
http://www.bowlingcommunity.com/b/ubbthreads.php/ubb/showflat/Number/14424/page/1#Post14424

Replace your portal_box_1.tpl with:
Code:
{* Script Version 7.0.0b4 *}
{* $Id: portal_box_1.tpl 354 2006-08-22 21:30:12Z rick $ *}
<?php if(!defined('UBB_MAIN_PROGRAM')) exit; ?>
{$tbopen}
<tr>
<td class="subjecttable">
<span class="small" style="float: right;">
<span id="number33118">#33118</span> - <span class="date">Today at</span> <span class="time">12:01 AM</span> 
</span>
<img src="http://www.bowlingcommunity.com/b/images/icons/default/book.gif" alt="" border="0"></a>
<b>
<span id="subject1">{$name}</span></b> <span class="small">

[Re: <span style="color:#000099;text-decoration:underline">First Post</span>]</span>
</td>
</tr>
<tr>
<td class="{$style_side}alt-1">
{$body}
</td>
</tr>
{$tbclose}


Place the following into Content Island:
Code:
/* BODY HERE */

$body = <<<EOF
<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td class="alt-2" width="17%" valign="top">
<span style="display: none;" id="username33117">Sponsored Links</span>
<b><span id="menu_control_33117" style="color:#000099;text-decoration:underline">Sponsored Links</span></b><br />
<span class="small">
Member
<br />
<img src="/images/general/default/star.gif" title="" alt="*"><img src="/images/general/default/star.gif" title="" alt="*"><img src="/images/general/default/star.gif" title="" alt="*"><img src="/images/general/default/star.gif" title="" alt="*"><img src="/images/general/default/star.gif" title="" alt="*"><br />
<br />
Registered:  27/08/04
<br />
Posts: 10136
<br />
Loc:   Mountain View, CA
<br />
</span>
</td>
<td class="post-content" valign="top" width="83%">
<span id="body0">
<script type="text/javascript"><!--
google_ad_client = "pub-9696832784455006";
google_alternate_ad_url = "http://www.insidebowling.com/phpadsnew/alternative300250.php";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000099";
google_color_text = "000000";
google_color_url = "000099";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</span></td></tr>
<tr>
<td class="alt-2 small" valign="bottom">
<a href="#top">Top</a>
</td>
<td class="post-options" align="right" valign="bottom">
</td>
</tr></table>
EOF;

_________________________
Steve
ImetSteve.com

Sorry, I wont answer support questions by email, PM, or IM.

Top
#311443 - 09/05/06 05:30 PM Re: Adsense Custom Block [Re: usr bin geek]
Micky Offline
Member

Registered: 02/11/04
Posts: 184
Loc: Bern, Switzerland
Good idea. thumbsup
_________________________
Gruss Micky

Golf Diesel Forum

Top
#311444 - 09/05/06 06:27 PM Re: Adsense Custom Block [Re: Micky]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
I was contemplating doing something similar, I like it smile.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#311625 - 10/08/06 03:16 AM Re: Adsense Custom Block [Re: Gizmo]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
Hey Steve, i tried out your blending stuff and where I like it quite a bit it doesn't *exactly* match the styles, not sure what html is messed up but its all sorts of out of wack with the table (whereas the left portion of the block was indented slightly so you could see other colors, not to mention hardcoded colors don't allow for it to blend on "other" stylesheets); I'd love it if someone would publish a complete template mod of this in the templates forum if they had the chance wink...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312568 - 01/07/07 10:37 PM Re: Adsense Custom Block [Re: Gizmo]
Deejay23 Offline
Lurker

Registered: 10/11/06
Posts: 7
Is, or could there maybe be someone who would be interested in making a mod where this second post google adsence would NOT be shown to people in a certain group or groups? So maybe contributing or donating users wouldnt see this in the forums? Anyone up for this? (I will sponsor this mod if need be.)

Top
#312569 - 01/08/07 01:52 AM Re: Adsense Custom Block [Re: Deejay23]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
It should be possible, and not too difficult imo; You'd have to look at including the groups that a user has access to in the showflat and showthreaded files and work accordingly...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#312921 - 01/26/07 11:38 AM Re: Adsense Custom Block [Re: Gizmo]
Deejay23 Offline
Lurker

Registered: 10/11/06
Posts: 7
I'm not a programmer though and want to be sure not to mess up my forums. Maybe i should post this request in another space here? As i said, i would pitch in for this mod if someone could whip it up?

Thanks guys...

Top
#313658 - 03/20/07 07:26 PM Re: [7.x] [Finished] Adsense Custom Block [Re: Gizmo]
Hanse The Insane Offline
Lurker

Registered: 03/20/07
Posts: 2
I dont know if anyone here can help, but I noticed the ads only show when viewing by IE, not foxfire. Is there a way to make them show at all with foxfire?

Top
#313659 - 03/20/07 07:59 PM Re: [7.x] [Finished] Adsense Custom Block [Re: Hanse The Insane]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
They should show if there is data to show... If google doesn't want to serve ads it will show a blank area and can be rather selective.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#313660 - 03/20/07 08:20 PM Re: [7.x] [Finished] Adsense Custom Block [Re: Gizmo]
Hanse The Insane Offline
Lurker

Registered: 03/20/07
Posts: 2
I can see them in IE but not when I use firefox, im at a loss as why. I searched the net, but no real answer there. any suggestions?

Top
#313661 - 03/20/07 08:25 PM Re: [7.x] [Finished] Adsense Custom Block [Re: Hanse The Insane]
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5287
Loc: Portland, OR, USA
Unless you have a firefox extention that blocks ads, I have no idea... I run FireFox 2 and I can display google adsense just as well as i can in IE7.
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#313667 - 03/21/07 12:22 PM Re: [7.x] [Finished] Adsense Custom Block [Re: Gizmo]
jgeoff Offline
Power User

Registered: 04/05/01
Posts: 95
Loc: NJ

I see them with Firefox as well.

As Gizzy said, make sure you're not blocking them with Adblock or some other extension...
_________________________
GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0

Top
#315284 - 08/19/07 02:48 AM Re: Adsense Custom Block [Re: usr bin geek]
Jest Offline
Lurker

Registered: 02/23/05
Posts: 7
Originally Posted By: usr bin geek
If you're using the Custom Island Insert (between the 1st/2nd post) you can increase your clicks by blending in the ad unit a bit.


How can i display the island after the 5th post or after each 5th post in a thread?
_________________________
br
Thomas
www.mobile.si

Top


Moderator:  sirdude 
Who's Online
0 registered (), 30 Guests and 22 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Ubb - Buy It!
best forum software
Latest Posts
I want to create a Self Search mod [Question]
by lightningrod
03/10/10 09:04 PM
If I create a new script, can I just upload it?
by lightningrod
03/10/10 05:35 PM
Notepad Creates Errors when working with PHP
by lightningrod
03/10/10 05:01 PM
Question on Adding a New Script ?
by lightningrod
03/10/10 06:39 AM
Disable Watch List option
by Mike_Tabat
03/09/10 01:27 PM
[7.x] [Pre-7.3] [Final] pJIRC Addon v0.5
by Gizmo
02/27/10 05:07 PM
How to Be a Great Host
by pinku
02/19/10 02:47 AM
New Mods
Disable Watch List option
by Mike_Tabat
02/18/10 09:14 AM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
[7.x] [Pre-7.3] [Final] pJIRC Addon v0.5
by
07/30/06 10:42 PM
Newest Members
joshuasm02, Chosen, Vick, Bartman, Infinity Master
13496 Registered Users
Top Posters
AllenAyres 25554
JoshPet 11330
Rick 8373
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438
(Views)Popular Topics
Known public proxy servers 1028046
Finished-[6.5.2] Games Arcade Deluxe v1.9 327222
Integrated Index Page (IIP) 5.3.1 279924
Integrated Index Page (IIP) 5.1.1 279403
TLD Bv2.1 Released - Threads Links Directory 270427
[6.0x] Who's Online 4.0.0 [Finished] 230365
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 217518
[6.3.x] [beta] Hit Hack 2.0 179339
FlashChat & UBB.threads 161010
[7.x] Gizmo's Embedding BBCode (Pre UBB.T7.3) 154650
Forum Stats
13496 Members
59 Forums
37114 Topics
290378 Posts

Max Online: 686 @ 06/28/07 07:04 AM
Featured Member
Registered: 04/19/09
Posts: 4

 

 

 
fusionbb message board php hacks