Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Advertisements between posts
Goto page 1, 2  Next
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
Advertisements between posts
Author Message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Advertisements between posts Reply with quote
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.



advertisements.zip
 Description:

Download
 Filename:  advertisements.zip
 Filesize:  867 Bytes
 Downloaded:  155 Time(s)

Thu Sep 13, 2007 6:24 pm View user's profile Send private message
Guest








Please login to hide the ads.

scottdallas



Joined: 04 May 2006
Posts: 1802
Location: US

Post Reply with quote
Man if I knew you knew how to do this I would have said something ages ago. That's so a;lsjd nicely done.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Fri Sep 14, 2007 5:32 am View user's profile Send private message Visit poster's website AIM Address
kirby145



Joined: 08 Sep 2007
Posts: 36
Location: look behind you

Post Reply with quote
Nice plugin FI-DD! It's kind of like ads between every few forum posts you see on forums sometimes.
Sat Sep 15, 2007 4:59 am View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
hetes



Joined: 17 Apr 2007
Posts: 36
Location: Hungary

Post Reply with quote
Thx this great plugin, FI-DD Very Happy

cutenews.ru has not limits Cool


Last edited by hetes on Sun Sep 16, 2007 12:48 pm; edited 1 time in total
Sat Sep 15, 2007 10:50 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1802
Location: US

Post Reply with quote
Quote:
cutenews.ru have not limits


Not with fiddy around

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Sat Sep 15, 2007 4:09 pm View user's profile Send private message Visit poster's website AIM Address
D72



Joined: 22 Feb 2007
Posts: 217
Location: NL

Post Reply with quote
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 Smile
Sat Oct 06, 2007 1:18 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1802
Location: US

Post Reply with quote
Quote:
So my advise to you... be carefull outside and when you walk downstairs


lmao Laughing Laughing Oh, how true.. Sorry we aren't as smart as you FI-DD Embarassed

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Sat Oct 06, 2007 3:18 am View user's profile Send private message Visit poster's website AIM Address
alfred_rade



Joined: 01 Dec 2007
Posts: 24
Location: Buenos Aires

Post Reply with quote
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!
Tue Dec 11, 2007 4:01 am View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Partyism



Joined: 25 Sep 2007
Posts: 156

Post Reply with quote
1- With a little help of dreamweaver? Created my own flash banner (newb style) for Trance Energy 2008 Very Happy
Code:

<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
Tue Dec 11, 2007 9:21 am View user's profile Send private message
alfred_rade



Joined: 01 Dec 2007
Posts: 24
Location: Buenos Aires

Post Reply with quote
Thanks, its works!!!

Now left my issue number 2. DIFFERENT ADS INSTEAD THE SAME AD REPEATING???
Wed Dec 12, 2007 6:53 am View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Syrion



Joined: 02 Aug 2006
Posts: 172

Post Reply with quote
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.

_________________
Mini-me
Wed Dec 12, 2007 4:46 pm View user's profile Send private message
alfred_rade



Joined: 01 Dec 2007
Posts: 24
Location: Buenos Aires

Post Reply with quote
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.
Wed Dec 12, 2007 4:50 pm View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
In plugins/advertisements.php change this:
Code:
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:
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:
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:
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);
      }
   }
   
}

Fri Dec 14, 2007 3:39 pm View user's profile Send private message
Partyism



Joined: 25 Sep 2007
Posts: 156

Post Reply with quote
Good Job FI-DD
Fri Dec 14, 2007 4:53 pm View user's profile Send private message
cybaGS



Joined: 27 Jun 2007
Posts: 37

Post Reply with quote
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...

Sad
Tue Jan 29, 2008 2:21 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to: 
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 cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.