The vB Geek

Go Back   The vB Geek > vB Geek Products > Geek Article and Review System

Geek Article and Review System GARS is the mega popular system for turning forums into articles, tutorials, or even reviews.

Advertisement
  Learn how to remove ads

Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2005, 10:19 PM
greg watson's Avatar
greg watson greg watson is offline
Member
 
Join Date: Aug 2005
Posts: 69
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder 
Default Google Module

Ok ... I've followed the Adsense Tutorial to create a Google module ...

The module works fine with the first article that is viewed.

However, if you browse to a second article, the following error message is generated:

"Unable to add cookies, header already sent.
File: /..../gars/mods/google.php
Line 11"

Here is my google.php file:

<?PHP
if ($stage == "display")
{
eval('$output.="' . fetch_template('GARS_google') . '";');
}
elseif($stage == "settings")
{
print_description_row("This module will display Google Adsense");
}
?>

Here is my GARS_google template (which is just plain adsense code):

<script type="text/javascript"><!--
google_ad_client = "pub-7481905953329668";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_type = "text";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Any suggestions?

Thanks,
Greg
Attached Images
File Type: jpg GARS_Google.jpg (21.7 KB, 38 views)
Reply With Quote
  #2  
Old 11-05-2005, 01:38 AM
James Goddard's Avatar
James Goddard James Goddard is offline
Junior Member
 
Join Date: Oct 2005
Posts: 26
Geek Article and Review System License Holder Geek Advertising Banner License Holder 
Default

Quote:
Originally Posted by greg watson
"Unable to add cookies, header already sent.
File: /..../gars/mods/google.php
Line 11"
I've never done a GARS module so I can't be of much help, however I can tell you what that error message means.

It's refering to the HTTP (not HTML) headers. What is happening is that somewhere your script is outputing data before another part of the script that is trying to modify the HTTP header.

James
Reply With Quote
  #3  
Old 11-05-2005, 08:30 AM
The Geek's Avatar
The Geek The Geek is offline
Senior Member
 
Join Date: Aug 2005
Posts: 6,717
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

huh, I cant see for the life of me how that php can output anything however I dont use Google ads so there may be something obvious im missing.

When you say first article is OK, what do you mean? ie Other articles dont work, multiple pages dont work, etc...

Does anything get output at all?
Reply With Quote
  #4  
Old 11-05-2005, 11:32 PM
greg watson's Avatar
greg watson greg watson is offline
Member
 
Join Date: Aug 2005
Posts: 69
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder 
Default

Quote:
Originally Posted by The Geek
huh, I cant see for the life of me how that php can output anything however I dont use Google ads so there may be something obvious im missing.

When you say first article is OK, what do you mean? ie Other articles dont work, multiple pages dont work, etc...

Does anything get output at all?
I add it back in on Monday and send you the links so you can check it out <grin>...

But what happens is that if you open up a browser and browse to an articles forum, whatever article you view first will always work ... any other articles you try to view will generate that error message (in the image above) and be totally unviewable ...

If you go to a different computer ... and browse to the same articles forum but look at a different article ... then this article will be viewable and again, any other articles will not be ...

So it sure appears that we have a variable somewhere that is getting corrupted ...

I'll turn it back on again on Monday so you can see <grin> ...

Greg
Reply With Quote
  #5  
Old 11-09-2005, 06:40 PM
greg watson's Avatar
greg watson greg watson is offline
Member
 
Join Date: Aug 2005
Posts: 69
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder 
Default

Whatever the bug was ... its fixed in the new RC1 version ... uploaded the new update and the google module works fine ...

Greg
Reply With Quote
  #6  
Old 11-09-2005, 06:41 PM
The Geek's Avatar
The Geek The Geek is offline
Senior Member
 
Join Date: Aug 2005
Posts: 6,717
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Whew. I was really scratching my head on that one!
Reply With Quote
  #7  
Old 11-09-2005, 09:37 PM
greg watson's Avatar
greg watson greg watson is offline
Member
 
Join Date: Aug 2005
Posts: 69
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder 
Default

Quote:
Originally Posted by The Geek
Whew. I was really scratching my head on that one!
I spoke too soon ...

I've got a test board up and running that you can log into the admin panel and play to your heart's content <grin> ...

http://www.IowaBeautiful.com

Google Adsense Module is working in ShowThread ... after I uploaded the new RC1 files. However, if you now try to add the module to the ForumDisplay, the same original error is generated ...

Go into GARS | Modules | Default Set | Forum Display |

Then at the bottom, select Google Adsense as a module to add

Choose Left or Right for a section and set an order if you like ... and then click SAVE ...

You will now get an error message if you try to browse any article forum ... with the exact same error message up above ...

I'll PM you the login details to the admin panel ... this is a test board, so other than my wife and I entering content prior to launching, you can't harm this board <Grin> ...

Greg
Reply With Quote
  #8  
Old 11-10-2005, 06:36 AM
The Geek's Avatar
The Geek The Geek is offline
Senior Member
 
Join Date: Aug 2005
Posts: 6,717
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Ill get to it tonight
Reply With Quote
  #9  
Old 01-04-2006, 09:06 AM
kall's Avatar
kall kall is offline
Member
 
Join Date: Sep 2005
Posts: 49
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Can you? I am getting this issue myself now.

here is a thread it happens on.. Logged in in Firefox it is ok, guest on IE gets the message.
Reply With Quote
  #10  
Old 01-04-2006, 04:20 PM
The Geek's Avatar
The Geek The Geek is offline
Senior Member
 
Join Date: Aug 2005
Posts: 6,717
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

I just dont get it. It doesnt even get flushed down to the browser until the page is rendered. As James mentioned, it looks like there is output getting sent before the headers. Furthermore I cant see why it would occur in forumdisplay but not showthread.

Ill see what more I can do to test . Its hard because I dont use adsense

Do you know if there is some test HTML that google can provide?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Google test Seeker GARS Link Directory 1 04-22-2009 03:36 AM
Google Maps Module Phrost Geek Article and Review System 3 05-18-2007 07:23 AM
Google Ads Module request for GARS ziG Geek Article and Review System 3 11-16-2006 08:54 AM
Google WAR GARS Link Directory 6 07-03-2006 03:01 PM
Google chet Geek Auto-Linker 1 01-29-2006 07:39 PM


All times are GMT. The time now is 12:24 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.