phpBay and adsense

Status
Not open for further replies.

stack paper

Dopesmoking Newbtrasher
Dec 20, 2007
1,868
23
0
DTLA
Hey guys.. Setting up a phpBay page, and was curious if it's possible to insert adsense after every 5 auctions?
Thanks
 


*update*
tried calling phpbay with 5 auctions, placing adsense, placing another 5 item phpcode... but it just shows the same 5 auctions.. so thats out.

this is buggin me >:O
 
I believe phpBay only allows one call to display auctions on a page. You'd need to modify the phpBay script to insert the Adsense code every 5 auctions.
 
The following assumes you are using phpBay Pro 2.3:

Open ebay.php, go to line 258 and insert this after it:
PHP:
  if($count % 5 == 0)
  {
   $adsense = file_get_contents(ABSPATH . "wp-content/plugins/phpBay/adsensecode.html");
   $this->html .= $adsense;
  }

Create a file in the same folder called "adsensecode.html" and paste your adsense code in there.

Thats it.
 
So you're saying you call lets say... 100 auctions, and it'll throw adsense after every 5 auctions?

Yeah, just like you see it pictured at the link above except replace the posts with E-bay auctions. Although I just realized I have 3 different E-bay categories on my page. The template adds adsense on it's own after every post.
 
Status
Not open for further replies.