*

Recent

Author Topic: Advertisement In the Background?  (Read 22572 times)

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Advertisement In the Background?
« Reply #15 on: December 03, 2011, 07:01:58 PM »
Only do that for the admin panel though.
Sections where you will use html but only editable by admins. You don't want users posting html content.

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: Advertisement In the Background?
« Reply #16 on: December 03, 2011, 07:26:50 PM »
yes i knew that as well.

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #17 on: December 04, 2011, 05:38:50 AM »
Code: [Select]
$rrr2 = "SELECT * FROM dd_comments WHERE gameid='$ID' AND approved='1' ORDER BY date DESC LIMIT 3";
            $sqltitle = "gamecomments0-".$ID ;


            if ($rrr1 = sqlcache($sqltitle, $cachelife, $rrr2)) {
foreach ($rrr1 as $row ){
In my Play.php I have this code ^^^
And not the code you have recommended, shall i change it to yours?

I copied and pasted the play file from testing to my main site, it still shows the same error. However I posted a comment in my main site on another game and it showed perfectly fine. So i guess the problem is just with that game Tank Trouble.

How can I clear my cache?

With the ads I am having trouble in my regular and testing site. I changed the code to this:

Code: [Select]
$ads1 = mysql_real_escape_string($_POST['ads1']);
$ads2 = mysql_real_escape_string($_POST['ads2']);
$ads3 = mysql_real_escape_string($_POST['ads3']);

I tried this ad code in my testing site and the ads didn't show at all. And my ads in my main site have been up for the whole night and it hasn't disappeared.

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: Advertisement In the Background?
« Reply #18 on: December 04, 2011, 09:47:57 AM »
That looks right you may also want to do that with banners and the ads like above games, below games, header, footer

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Advertisement In the Background?
« Reply #19 on: December 04, 2011, 10:20:13 AM »
Huh.. Can you show me a dump of just that row in the comments table?
or could you show me the contents of your cache file for the game comments for Tank Trouble?

Check inside your /cache/ directory and look for the "gamecomments0-{id}" file.

Hmm try one last time to submit the ads in the admin panel. Once done, open up phpmyadmin and check inside your settings.. tell me what you see there. Paste the ad code that displays if any. Also paste the original ad code.
Try pasting the ad code in replace of the ad variable, just to check to make sure its not the ad code you're having issues with.

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Advertisement In the Background?
« Reply #20 on: December 07, 2011, 07:06:29 PM »
As far as I'm concerned, a link in the link section is fine. I'm not too picky about it, and won't lose any sleep over it. I doubt seriously that Robbie would have a problem with it either. If he does, he is free to say so, he's just a bit busy. Its a link, and it does help the PR some.

If the script/site were to change hands for some reason, the new owner might demand it get put back in place, you'd have to take that up with them.

It would be appreciated though if it did mention what the link was for, in some fashion.

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #21 on: December 08, 2011, 12:55:25 PM »
Adam - The ad code in phpmyadmin is
Code: [Select]
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7662727282723239";
/* Banner Right */
google_ad_slot = "0650533672";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

The ad code in my website is:

Code: [Select]
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7662727282723239";
/* Banner Right */
google_ad_slot = "0650533672";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

After changing everything to
Code: [Select]
$ads1 = mysql_real_escape_string($_POST['ads1']); the ads have been fine so I guess that problem is resolved.

Currently my ads overlap the website content in some pages e.g. http://www.loosegame.com/index.php?action=play&ID=8004 in this page ads are covering the side links etc. Is there anyway I can adjust the page size so it doesn't clash with my ads positioning? Also I checked my website on another computer where it showed the advertisement is over the links in my home page. Do you know why is that? As on my laptop it shows the homepage is well structured and ads are not covering the side links.

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: Advertisement In the Background?
« Reply #22 on: December 08, 2011, 01:45:57 PM »
After changing everything to
Code: [Select]
$ads1 = mysql_real_escape_string($_POST['ads1']); the ads have been fine so I guess that problem is resolved.

Yay, i did something right!

Currently my ads overlap the website content in some pages e.g. http://www.loosegame.com/index.php?action=play&ID=8004 in this page ads are covering the side links etc. Is there anyway I can adjust the page size so it doesn't clash with my ads positioning? Also I checked my website on another computer where it showed the advertisement is over the links in my home page. Do you know why is that? As on my laptop it shows the homepage is well structured and ads are not covering the side links.


Im not entirely positive on this but id have to say the reason for this is because of your screen size/resolution. The smaller the screen the more of a chance it has of overlapping the page. One solution, though im not sure how to do it, would be to expand the page only up to the ads and put the ads in a div tag that is like a definite size so that there is no overlapping.

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #23 on: December 09, 2011, 10:54:37 AM »
Thanks spage but I am not sure what to do with the Div tags  :-\

Huh.. Can you show me a dump of just that row in the comments table?
or could you show me the contents of your cache file for the game comments for Tank Trouble?

Check inside your /cache/ directory and look for the "gamecomments0-{id}" file.
I have got the file downloaded I am not sure what i am supose to do with it. Shall i open it in notepad and copy and paste here, whats in it?

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Advertisement In the Background?
« Reply #24 on: December 09, 2011, 12:09:39 PM »
Yeah just paste the contents of the cache file here for me to read.

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #25 on: December 09, 2011, 01:35:35 PM »
Code: [Select]
a:1:{i:0;a:12:{i:0;s:1:"2";s:2:"ID";s:1:"2";i:1;s:4:"8004";s:6:"gameid";s:4:"8004";i:2;s:2:"23";s:9:"commenter";s:2:"23";i:3;s:29:"Destroyed my brother at this ";s:7:"comment";s:29:"Destroyed my brother at this ";i:4;s:10:"1318777818";s:4:"date";s:10:"1318777818";i:5;s:1:"1";s:8:"approved";s:1:"1";}}

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Advertisement In the Background?
« Reply #26 on: December 09, 2011, 04:16:36 PM »
well that looks fine.. you sure you you have all the cache files set to 777?

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #27 on: December 09, 2011, 04:53:18 PM »
well that looks fine.. you sure you you have all the cache files set to 777?

The cache folder was set to 0755 but now I have changed it to 0777 but the error still shows

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Advertisement In the Background?
« Reply #28 on: December 09, 2011, 07:13:59 PM »


How can I clear my cache?

With the ads I am having trouble in my regular and testing site. I changed the code to this:

Code: [Select]
$ads1 = mysql_real_escape_string($_POST['ads1']);
$ads2 = mysql_real_escape_string($_POST['ads2']);
$ads3 = mysql_real_escape_string($_POST['ads3']);

I tried this ad code in my testing site and the ads didn't show at all. And my ads in my main site have been up for the whole night and it hasn't disappeared.


You can clear the cache by setting the cache life to "1" during testing and it clears real fast, or deleting everything in the cache folder EXCEPT index.htm

I don't get what you're trying to do with the ads. Are you storing them through that page, or displaying them through that page. They are being set to what's posted in that code, not what's stored in a database.

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Advertisement In the Background?
« Reply #29 on: December 11, 2011, 06:19:06 AM »
Cache is cleared.

And with the ads - They kept to disappearing and the code kept on disappearing from the Admin - Manage ads area. Now after changing the ad code to
Code: [Select]
$ads1 = mysql_real_escape_string($_POST['ads1']);
$ads2 = mysql_real_escape_string($_POST['ads2']);
$ads3 = mysql_real_escape_string($_POST['ads3']);


Its working fine.

My ads are fixed on the page and they overlap at some pages, Do you know how I can prevent my ads overlapping the page?