8 replies [Last post]
jsabarese
jsabarese's picture
Offline
Enthusiast
Positively 4th Street
Last seen: 10 years 17 weeks ago
Positively 4th Street
Timezone: GMT-4
Joined: 2005-02-05
Posts: 404
Points: 7

i'm trying to put the google adsense for search and adsense for content in the "header" of my phpbb2.

i tried by putting it in index.php, which did work, but i wasn't happy w/ the alignment. so, i investigated the issue at phpbb.com

phpbb.com's recommendation is to put the code into one of the board template files-- when i do as they suggest (unless i'm putting it in the wrong spot, which is quite possible), the entire board display is out of control, diminished.

so, i went back to putting it in index.php. i know this sounds crazy, but when i first did it, it looked fine in FF-- to the point that i had it tweaked perfectly-- then, of course, when i looked at IE, something was "off"- (turns out, i saw the "view posts since last visit" was missing in IE -- but because i wasn't logged in there! doh!) so, i spent the past few hours trying to get this to look right in both IE and firefox.

now, it seems as though IE isn't giving me any trouble, but i can't get FF back to the simple, nice display that i started with.

does anyone have experience with this-- and a suggestion for me?

thanks! the board is here: www.eastcoastbandnetwork.com/phpbb2/

i've left a little bit of the last few lines of php in there so you can see exactly where i stuck it, if you're a phpbb2 owner. right now, my code looks like this at the bottom of the /phpbb2/index.php

}// if ... total_categories
else
{
	message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

?>
<!-- CLOSED PHP TO INSERT HTML -->

<html>
<head>
<style type="text/css">
<!-- 
/* ***************** */
/* GOOGLE TABLES IDS */
/* ***************** */

#google {
	float:left;		
	}

#google2 {
	float:right;	
	margin-right: 20px;	
}

/* ************** */
/* END GOOGLE IDS */
/* ************** */
}
-->
</style>
</head>
<body>
 
<table id="google">
	<tr>
		<td>
			<!-- SiteSearch Google -->
			<form method="get" action="http://www.google.com/custom" target="_top">
			<table border="0" bgcolor="#ffffff">
			<tr><td nowrap="nowrap" valign="top" align="left" height="32">
			<a href="http://www.google.com/">
			<img src="http://www.google.com/logos/Logo_25wht.gif"
			border="0" alt="Google"></img></a>
			</td>
			<td nowrap="nowrap">
			<input type="hidden" name="domains" value="eastcoastbandnetwork.com"></input>
			<input type="text" name="q" size="31" maxlength="255" value=""></input>
			<input type="submit" name="sa" value="Search"></input>
			</td></tr>
			<tr>
			<td>&nbsp;</td>
			<td nowrap="nowrap">
			<table>
			<tr>
			<td>
			<input type="radio" name="sitesearch" value="" ></input>
			<font size="-1" color="#000000">Web</font>
			</td>
			<td>
			<input type="radio" name="sitesearch" value="eastcoastbandnetwork.com" checked="checked"></input>
			<font size="-1" color="#000000">eastcoastbandnetwork.com</font>
			</td>
			</tr>
			</table>
			<input type="hidden" name="client" value="pub-2612637898892107"></input>
			<input type="hidden" name="forid" value="1"></input>
			<input type="hidden" name="ie" value="ISO-8859-1"></input>
			<input type="hidden" name="oe" value="ISO-8859-1"></input>
			<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input>
			<input type="hidden" name="hl" value="en"></input>

			</td></tr></table>
			</form>
		</td>
		</tr>
		</table>

<!-- END GOOGLE ADSENSE FOR SEARCH -->

<!-- BEGIN GOOGLE ADSENSE FOR CONTENT -->

		<table id="google2">
		<tr>

		<td>
			<!-- SCRIPT START -->
			<script type="text/javascript"><!--
			google_ad_client = "pub-2612637898892107";
			google_ad_width = 468;
			google_ad_height = 60;
			google_ad_format = "468x60_as";
			google_ad_type = "text_image";
			google_ad_channel ="";
			google_color_border = "003366";
			google_color_bg = "003366";
			google_color_link = "FF6600";
			google_color_url = "99CCFF";
			google_color_text = "FFFFFF";
			//--></script>
			<script type="text/javascript"
			  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
			</script>
			<!-- SCRIPT END -->
		</td>
	</tr>
</table>

</body>
</html>

<!-- END GOOGLE EDITS -->

<!-- RESTART PHP CODE -->
<?php
//
// Generate the page
//
$template->pparse('body');

Tags:
Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 9 years 47 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

Using Google AdSense on a phpbb2.... ugh!

/moved to off-topic

jsabarese
jsabarese's picture
Offline
Enthusiast
Positively 4th Street
Last seen: 10 years 17 weeks ago
Positively 4th Street
Timezone: GMT-4
Joined: 2005-02-05
Posts: 404
Points: 7

Using Google AdSense on a phpbb2.... ugh!

why move this to "off-topic"? how can you, rather forcibly, suggest that this is not a layout question?

i don't get your viewpoint here.

Anonymous
Anonymous's picture
Guru

Using Google AdSense on a phpbb2.... ugh!

jsabarese wrote:
why move this to "off-topic"? how can you, rather forcibly, suggest that this is not a layout question?

i don't get your viewpoint here.This is a phpBB/google question. Off topic. Smile

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 21 hours 14 min ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Using Google AdSense on a phpbb2.... ugh!

Hi jsabarese,
It looks fine to me in Firefox.
Have you sorted it out?

jsabarese
jsabarese's picture
Offline
Enthusiast
Positively 4th Street
Last seen: 10 years 17 weeks ago
Positively 4th Street
Timezone: GMT-4
Joined: 2005-02-05
Posts: 404
Points: 7

Using Google AdSense on a phpbb2.... ugh!

yup. good enough for what i wanted, at least.

regarding the "off topic" issue. it wouldn't have mattered whether the content were clowns and jugglers, complex mathematical operations, or nudie pics-- i'm still asking for help about a layout. sure, it happens to be a layout inside of a template in a phpbb2-- but the question; the problem i was having when i posted, was purely CSS related. in case you haven't picked up on it, in my opinion, your desicision to move the thread was wrong. i wonder if any other members here have had a similar problem w/ their own phpbb's. i'd like to hear their opinion: CSS inquiry, or phpbb inquiry.

make no mistake-- i do of course respect your authority to make that decision, and i respect the decision of whomever granted you the authority-- i hope no one would think otherwise; would be nearsighted to think that is what's at issue here. i simply felt the need to exercise my freedom to tell you what i thought about it.
Wink

Anonymous
Anonymous's picture
Guru

Using Google AdSense on a phpbb2.... ugh!

jsabarese wrote:
i simply felt the need to exercise my freedom ...
What freedom?

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 21 hours 14 min ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Using Google AdSense on a phpbb2.... ugh!

Hi jsabarese,
Sometimes it's hard to clearly see where a post should go.
The moderators here do a fantastic job for free, trying to keep posts in the correct forum etc.
Your initial post seemed to point to the problem being in the templating system of PHPBB.
The main thing is that you have found an acceptable solution.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 32 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Using Google AdSense on a phpbb2.... ugh!

Jeff I'm sorry to say that I consider Chris's decision to move the topic correct in the circumstances; you did not really make any effort to explain how this was related to a CSS matter but rather just left us with a page of PHPBB code to try and figure out

Regardless of whether the problem would be solved by tweaking the CSS this was a problem relating to a very specific layout and wasn't really clear.

I wouldn't have worried too much that a moderator decided to move a post that's their prerogative to a certain degree and does not mean that the topic is inappropriate per se, just that it seems to sit better in a particular sub-forum, yes you can draw issue with that decision but to what point?

Freedom is a very conditional word isn't it? what freedoms do we really have, we are bound by a set of mores on the forum we have freedom to an extent; but of course you are allowed to question decisions or actions, that is one of those freedoms I guess.

Interestingly -and this is a bit of a slapped wrist time for you- if maybe you had posted a new topic to the PHPBB forum rather than hijacking a thread you may have got a response to your post and an answer to your problem from people who are more clued up on PHPBB.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me