Advertisements between posts

Download plugins, language packs and stuff.

Advertisements between posts

Postby FI-DD » Thu Sep 13, 2007 6:24 pm

This plugin allows you to show ads between your posts. You can define the frequency and the maximum amount of ads per page.

Installation:
1. Upload the plugin to the plugins folder and activate it.

2. Open plugins/advertisements.php and replace the example advertising code with your own advertising code.

3. Put something like this in your template: {advertisement:3:2} This will show an ad every 3 posts but only 2 times. If you set the second number to 0 it will show as much ads as possible.
Attachments
advertisements.zip
(867 Bytes) Downloaded 398 times
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby scottdallas » Fri Sep 14, 2007 5:32 am

Man if I knew you knew how to do this I would have said something ages ago. That's so a;lsjd nicely done.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby kirby145 » Sat Sep 15, 2007 4:59 am

Nice plugin FI-DD! It's kind of like ads between every few forum posts you see on forums sometimes.
User avatar
kirby145
 
Posts: 36
Joined: Sat Sep 08, 2007 8:27 pm
Location: look behind you

Postby hetes » Sat Sep 15, 2007 10:50 am

Thx this great plugin, FI-DD :D

cutenews.ru has not limits 8)
Last edited by hetes on Sun Sep 16, 2007 12:48 pm, edited 1 time in total.
User avatar
hetes
 
Posts: 36
Joined: Tue Apr 17, 2007 4:33 pm
Location: Hungary

Postby scottdallas » Sat Sep 15, 2007 4:09 pm

cutenews.ru have not limits


Not with fiddy around
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby D72 » Sat Oct 06, 2007 1:18 am

way to cool, thanks a bunge Fidd.
Man, if you were hit by a truck or something, cutenews is from that point limited!
So my advise to you... be carefull outside and when you walk downstairs :)
User avatar
D72
 
Posts: 336
Joined: Thu Feb 22, 2007 12:05 am
Location: NL

Postby scottdallas » Sat Oct 06, 2007 3:18 am

So my advise to you... be carefull outside and when you walk downstairs


lmao :lol: :lol: Oh, how true.. Sorry we aren't as smart as you FI-DD :oops:
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby alfred_rade » Tue Dec 11, 2007 4:01 am

1- How can I load an image or an swf instead a google ad?

2- How can I load a diferent second ad, and a different thirth, and etc.?


Thank you so much!
alfred_rade
 
Posts: 24
Joined: Sat Dec 01, 2007 12:28 am
Location: Buenos Aires

Postby Partyism » Tue Dec 11, 2007 9:21 am

1- With a little help of dreamweaver? Created my own flash banner (newb style) for Trance Energy 2008 :D
Code: Select all
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="569" height="139" id="banner" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="banner.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="../../../flash/trance-energy.swf" quality="high" bgcolor="#ffffff" width="569" height="139" name="banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>


2- That would be a cool option
Partyism
 
Posts: 399
Joined: Tue Sep 25, 2007 6:24 pm

Postby alfred_rade » Wed Dec 12, 2007 6:53 am

Thanks, its works!!!

Now left my issue number 2. DIFFERENT ADS INSTEAD THE SAME AD REPEATING???
alfred_rade
 
Posts: 24
Joined: Sat Dec 01, 2007 12:28 am
Location: Buenos Aires

Postby Syrion » Wed Dec 12, 2007 4:46 pm

That should be done by the provider of the ads. Google (the biggest advertising company) randomises it. I don't think it's in the scope of Cutenews.ru to do this.
Image Mini-me
User avatar
Syrion
 
Posts: 185
Joined: Wed Aug 02, 2006 2:03 pm

Postby alfred_rade » Wed Dec 12, 2007 4:50 pm

Im pretty sure that FI-DD has the answer, I don't want to add a Google ad, I wanna put my own ads. It's possible, I know, but I don't know how.
alfred_rade
 
Posts: 24
Joined: Sat Dec 01, 2007 12:28 am
Location: Buenos Aires

Postby FI-DD » Fri Dec 14, 2007 3:39 pm

In plugins/advertisements.php change this:
Code: Select all
function show_ad(){

   ////////////////////////
   //Add your advertisement here
   ////////////////////////
   
   $advertisement = '
   
   <script type="text/javascript"><!--
   google_ad_client = "pub-xxxxxxxxxxxxxx";
   google_ad_width = 728;
   google_ad_height = 90;
   google_ad_format = "728x90_as";
   google_ad_type = "text";
   google_ad_channel = "6041175688";
   google_color_border = "d7dde4";
   google_color_bg = "d7dde4";
   google_color_link = "315173";
   google_color_text = "000000";
   google_color_url = "315173";
   //--></script>
   <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
   
   ';
   
   return $advertisement;

}


to this:
Code: Select all
function show_ad($number){

   ////////////////////////
   //Add your advertisement here
   ////////////////////////
   
   $advertisement[1] = "Advertisement 1.";
   $advertisement[2] = "Advertisement 2.";
   $advertisement[3] = "Advertisement 3.";
   
   return $advertisement[$number];

}


and this:
Code: Select all
function show_ads($every, $bg, $max){

   $bg = $bg + 1;
   if($max == 0){
      if(($bg%$every == 0)){
         return show_ad();
      }
   }
   else{
      if(($bg%$every == 0) and ($max*$every >= $bg)){
         return show_ad();
      }
   }
   
}


to this:
Code: Select all
function show_ads($every, $bg, $max){

   $bg = $bg + 1;
   
   $i = round($bg/$every);

   if($max == 0){
      if(($bg%$every == 0)){
         return show_ad($i);
      }
   }
   else{
      if(($bg%$every == 0) and ($max*$every >= $bg)){
         return show_ad($i);
      }
   }
   
}
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Partyism » Fri Dec 14, 2007 4:53 pm

Good Job FI-DD
Partyism
 
Posts: 399
Joined: Tue Sep 25, 2007 6:24 pm

Postby cybaGS » Tue Jan 29, 2008 2:21 pm

well that code didn't work for me...

i want to add e.g. 5 different ad-codes to the script and it should rotate on every reload...

:(
cybaGS
 
Posts: 37
Joined: Wed Jun 27, 2007 7:10 pm

Next

Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests

cron