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

Wizard

Registered: 01/10/00
Posts: 5176
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 Owner

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: 25516
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
#!/usr/bin/geek � | WyldRyde IRC Network

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 Online   shocked

Wizard

Registered: 01/10/00
Posts: 5176
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 Owner

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

Wizard

Registered: 01/10/00
Posts: 5176
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 Owner

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 Online   shocked

Wizard

Registered: 01/10/00
Posts: 5176
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 Owner

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 Online   shocked

Wizard

Registered: 01/10/00
Posts: 5176
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 Owner

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 Online   shocked

Wizard

Registered: 01/10/00
Posts: 5176
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 Owner

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
1 registered (StanCA), 22 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
[7.x] UBB Sitemaps
by Gizmo
06/30/09 03:38 PM
Forced User Group Image tags
by Ruben Rocha
06/15/09 03:41 PM
Ads Between Forums/Categories
by bradmagic
06/10/09 12:31 PM
[7.2.2] DokuWiki authenticating against UBB.t
by Myke
06/08/09 08:57 AM
Possible _topics.TOPIC_STATUS codes?
by tpro
06/04/09 10:25 AM
promoting
by DLWebmaestro
06/02/09 05:36 PM
New Mods
[7.2.2] DokuWiki authenticating against UBB.t
by Myke
09/13/07 05:47 AM
[7.x] UBB Sitemaps
by
02/10/07 11:38 PM
Newest Members
Abe Froman, fefalas, BlOoDRaIn, Aboud, F3ithl3sS
13427 Registered Users
Top Posters
AllenAyres 25516
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438
(Views)Popular Topics
Known public proxy servers 756555
Finished-[6.5.2] Games Arcade Deluxe v1.9 223157
Integrated Index Page (IIP) 5.3.1 182623
TLD Bv2.1 Released - Threads Links Directory 181967
Integrated Index Page (IIP) 5.1.1 178986
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 142265
[6.0x] Who's Online 4.0.0 [Finished] 135991
FlashChat & UBB.threads 134220
[6.3.x] [beta] Hit Hack 2.0 120092
[7.x] Gizmo's Embedding BBCode (Pre UBB.T7.3) 100068
Forum Stats
13427 Members
59 Forums
37053 Topics
289887 Posts

Max Online: 686 @ 06/28/07 07:04 AM
Featured Member
Registered: 07/01/07
Posts: 5

 

 

 
fusionbb message board php hacks