Author |
Message |
Doulos
Life Cycles Becoming CPU Cycles
![](modules/Forums/images/avatars/181553f049aa2a5924cda.jpg)
Joined: Jun 06, 2005
Posts: 732
|
Posted:
Mon Nov 23, 2009 6:41 am |
|
I am trying include googleads as a php file in header.php but this is really messing things up - but only in IE. Everything works fine in Firefox and Opera.
Ads display as intended, but one issue is this: user admin won't display the data. The page shows fine, but it doesn't display the data. I get the 'requesting content' message then the data field is blank (again, only in IE).
This is what I am using toward the beginning of header.php:
Code:if ($_REQUEST["name"] == "Your_Account"){
}else{
include_once INCLUDE_PATH . 'includes/jquery/googleads2.php';
}
|
If I remove this from header.php, the user admin data shows up fine in IE8. I thought I had this fixed, but I guess when I tested it I must have used Firefox.
I was doing it that way because the js was interfering with new user activation somehow. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Doulos
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Nov 23, 2009 7:02 am |
|
Got it working by using this:
Code:if (($_REQUEST["name"] == "Your_Account") or ($_REQUEST["op"] == "yaUsers")){
}else{
include_once INCLUDE_PATH . 'includes/jquery/googleads2.php';
}
|
I don't really want ads to show while in admin anyway so that is not a problem, but googleads are paying about 1/6 of our expenses so I would like to show them as many places as possible. I don't know diddly about php, or javascript, so if you know of a better way to display googleads at the top of each page without causing problems I would like to know.
Thanks. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Mon Nov 23, 2009 8:11 am |
|
Post the contents of the googleads2.php |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Doulos
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Nov 23, 2009 3:01 pm |
|
Code:<?php
<center><script type="text/javascript"><!--
google_ad_client = "pub-3138262883593061";
/* 728x90, created 9/21/08 */
google_ad_slot = "9683028076";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
?>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Nov 23, 2009 5:48 pm |
|
I assume you are talking about IE 8?
Do you allow users to use multiple themes? If you only use one what is it? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Doulos
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Nov 23, 2009 9:14 pm |
|
Yes, IE8, and yes, multiple themes - but the default theme right now is fisubice.
This is a fresh install, using 7 themes. Only one of which is released with RN2.4. All others have been converted and tested, so they work, but have not been validated to meet all the latest standards.
I do not use IE, so I did not even notice the problem when I was testing. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Nov 23, 2009 10:58 pm |
|
I know what the problem is. You are adding the code where it really isn't supposed to be. You are loding it first thing, but it needs to be after the body tag. For example you have it like this (I think)
Code:
googleads
<html>
<head>
</head>
<body>
|
It needs to be:
Code:
<html>
<head>
</head>
<body>
googleads
|
It late so I can't look at it anymore tonight, but you may be able to use a custom_header.php in mainfile. I will look at it tomorrow. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Tue Nov 24, 2009 9:01 am |
|
try adding your code at the top of themes/fisubice/header.html
something like
Code:<center><script type="text/javascript"><!--
google_ad_client = "pub-3138262883593061";
/* 728x90, created 9/21/08 */
google_ad_slot = "9683028076";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center> <br /><table class="bodyline" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" valign="top"></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60%" style="background-image: url(themes/fisubice/images/cellpic_bkg.jpg)" height="110"><a href="http://www.ravenphpscripts.com" title="PHP Web Host - Quality Web Hosting For All PHP Applications"><img src="themes/fisubice/images/logo.gif" alt="PHP Web Host - Quality Web Hosting For All PHP Applications" border="0" /></a></td>
<td width="40%" style="background-image: url(themes/fisubice/images/cellpic_bkg.jpg)" height="110">$showbanners</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellpadding="4" cellspacing="0" style="background-image: url(themes/fisubice/images/cellpic_nav.gif)">
<tr>
<td nowrap="nowrap"><font class="content">$theuser</font></td>
<td nowrap="nowrap"><div align="center">$navMenu</div></td>
<td nowrap="nowrap"><div align="center"><font class="content">
$datetime
</font></div></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td align="center">$public_msg</td>
</tr></table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td valign="top" width="1" style="background-image: url(themes/fisubice/images/7px.gif)">
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Doulos
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Nov 24, 2009 1:57 pm |
|
Ok, thanks. I tried adding it to theme.php, but not header.html |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Nov 24, 2009 3:51 pm |
|
Doulos, rename your googleads2.php to custom_header.php. Then move it to includes/custom_files/custom_header.php. This should make it so you don't have to edit each theme.
If you already have a file called custom_header.php you will have to add the code to it. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Doulos
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Nov 24, 2009 8:30 pm |
|
That worked. Thank you very much. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|