Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 732

PostPosted: Mon Nov 23, 2009 6:41 am Reply with quote

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. Sad

I was doing it that way because the js was interfering with new user activation somehow.
 
View user's profile Send private message
Doulos







PostPosted: Mon Nov 23, 2009 7:02 am Reply with quote

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.
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Nov 23, 2009 8:11 am Reply with quote

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. 
View user's profile Send private message
Doulos







PostPosted: Mon Nov 23, 2009 3:01 pm Reply with quote

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>

?>
 
Palbin







PostPosted: Mon Nov 23, 2009 5:48 pm Reply with quote

I assume you are talking about IE 8?

Do you allow users to use multiple themes? If you only use one what is it?
 
Doulos







PostPosted: Mon Nov 23, 2009 9:14 pm Reply with quote

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.
 
Palbin







PostPosted: Mon Nov 23, 2009 10:58 pm Reply with quote

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.
 
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Tue Nov 24, 2009 9:01 am Reply with quote

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)">
 
View user's profile Send private message Visit poster's website
Doulos







PostPosted: Tue Nov 24, 2009 1:57 pm Reply with quote

Ok, thanks. I tried adding it to theme.php, but not header.html
 
Palbin







PostPosted: Tue Nov 24, 2009 3:51 pm Reply with quote

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.
 
Doulos







PostPosted: Tue Nov 24, 2009 8:30 pm Reply with quote

That worked. Thank you very much.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©