Ad Rotator

Apr 01
2007 15:44 · Русский (26,533 views)

This widget is intended to display random HTML code from a given group of HTML-chunks on sidebar. Basically it shows different HTML every time you requesting page. Plugin implemented as widget for the WordPress Widgets (you should install it before using this widget and be sure that your theme supports widgets at all).

Installation

  • Download and unpack plugin files to wp-content/plugins/widgets/ directory.
  • Enable “Ad Rotator” plugin on your Plugins page in Site Admin.
  • Go to the Presentation/Sidebar Widgets page in Site Admin and move “Ad Rotator” widget to sidebar.
  • Click “Configure” button on the widget title and enter HTML chunks divided with <!--more-->:
    Ad Rotator screenshot
  • Have fun!

Requirements

Plugin works with Wordpress 1.5 and 2.0/2.1 as well. But I recommend you to update your Wordpress to version 2.1 because it has many nice features.

Download

The latest version of “Ad Rotator” is 1.0.1, and it can be downloaded here:

Download Ad Rotator v1.0.1

If you have any propositions, want to send feedback or found bugs, please post comments. It’s very important for me!

Changelog

  • v1.0.0 (May 1, 2006)
    • Initial plugin implementation.
  • v1.0.1 (Mar 31, 2007)
    • Plugin home page updated.

Other plugins

Full list of plugins I have implemented is available here.

54 Responses to this entry

Subscribe to comments with RSS or TrackBack to 'Ad Rotator'.

said on 2007-04-12 at 3.37 pm

my site admin in 2.1 does not have a presentation/sidebar widgets section, and this plugin pushes the sidebar out of alignment

said on 2007-04-12 at 5.01 pm

Looks like your theme does not supports widgets at all. In this case Ad Rotator is used and can’t break down your sidebar alignment.

Isaac @
said on 2007-04-13 at 12.08 am

Is there a way to force the change of ad on every refresh?

said on 2007-04-13 at 12.51 am

Random block is shown on each request. It’s possible that sometimes ad would be repeated, but usually random HTML would be displayed.

said on 2007-04-16 at 12.30 pm

Thanks for this. It works well aside from a small problem I’m having where sometimes I get a blank space where the ad should be.

I’m wondering if I’m doing something wrong or if it’s some kind of timing problem. Should the <!--more--> delimiter only appear after the code chunks?

Any ideas?

Thanks

Gary

said on 2007-04-16 at 1.41 pm

It should appear between code chunks. It is just divider and separates chunks between each other. Therefor if you would past it after all chunks, blank area would be displayed sometimes because Ad Rotator would think that another chunk exists after last one. Just for example:

1
2
3
<img src="ad1.jpg" />
<!--more-->
<img src="ad2.jpg" />

This is correct using of plugin. And here is another wrong one:

1
2
3
4
<img src="ad1.jpg" />
<!--more-->
<img src="ad2.jpg" />
<!--more-->

In the first case you have two chunks, in the second case there are three chunks exists, and one of them is blank.

JR
said on 2007-05-18 at 1.33 pm

Hi,
is this widget supporting <code> tags?

I am trying to steer it to my wordpress theme directory using <code></code>

Cheers

said on 2007-05-18 at 1.36 pm

Yes. It supports all HTML tags.

Casey V. @
said on 2007-05-28 at 7.52 am

I was wondering how to add additional Ad Rotator widgets to my sidebar?

Casey V. @
said on 2007-05-28 at 8.30 am

Wow never mind. Guess I should have scrolled down a bit :)

Murk @
said on 2007-06-08 at 9.59 pm

For some reason, this code:
<a href=”http://www.noliberties.com/” target=”_blank”><img src=”http://www.noliberties.com/img/banners/tl_skyscraper.jpg” alt=”Taking Liberties” width=”160″ height=”600″ border=”0″ /></a>

is being rendered as

<div class=”adrotatorwidget”><a href=”http://www.noliberties.com/”><!– –></a></div>
</li>

by both this and the text box plugin. It’s driving me crazy… and so am removing the widget for now.

Any idea? As it seems insane not to be able to easily display arbitrary html snippets!

Thanks.

lex @
said on 2007-06-15 at 8.19 pm

Dmytro,

AdRotator was working great for me until I “upgraded” to WP2.2 - now my (paid for) content isn’t showing up, even though the proper html is in AdRotator boxes.

Has anyone else mentioned this?

lex @
said on 2007-06-15 at 8.51 pm

It turns out that whatever html is in AdRotator Widget #1 is displayed on every other widget even if the html they contain are different…

Josh @
said on 2007-06-25 at 9.55 pm

I’ve used this fantastic widget/plugin for a few weeks and it works great.

However, Fantastico recommended that I upgrade my Wordpress install from 2.1.3 to 2.2, and when I did the Ad Rotator instances that I have running in my sidebar turned into duplicates. So, instead of running Ad Rotator Widgets 1, 2, and 3. It just displays the content for Ad Rotator Widget 1 three different times.

Anyone else run into this?

Thanks!
Josh

lex @
said on 2007-06-29 at 1.23 pm

It was a known problem with the widgets.php apparently. You can download and replace the file here

Josh @
said on 2007-06-29 at 7.41 pm

Thanks Lex! That worked!

said on 2007-07-20 at 2.08 am

I am working with a fresh install of Wordpress 2.2 (about a week old) and I just installed Adrotator. It installed fine and I put the widget in the sidebar but the title is the only thing that appears. In Firefox, I get nothing at all and in IE I get a broken link symbol. I tried downloading that new widgets.php file, but it didn’t change anything. Any other suggestions?

James @
said on 2007-08-03 at 2.23 am

Hello,

I want to confirm that all code chunks as described below go in the function widget_adrotator_control($number) section.

Following that, the next step is to insert the code add_action(’plugins_loaded’, ‘widget_adrotator_init’);
to the sidebar and then paste the adrotator code to the correct section of the sidebar.

I hope this makes some sense.

Neil @
said on 2007-09-16 at 7.59 am

Can anyone tell me why the limit is 9 ad rotator widgets?

Any way of upping that limit?

Neil @
said on 2007-09-27 at 2.06 am

Hi.

Is this plugin still being supported and updated?

In version 2.3 of Wordpress the plugin has a small issue. You can no longer grab and drag the mouse across to select the code when editing an instance of the rotator.

Try editing your code in the box, you’ll see what I mean.

This is my favourite plugin and is so versatile I’m hoping for an upgrade…

cheers!

said on 2007-09-27 at 7.41 am

Hi Neil, I have planned update to the end of this week.

lisa @
said on 2007-10-01 at 12.59 am

Hi. I’m a first time user and a total novice. I cannot save the new ads to my widget. I open the code pop up, delete my old code, add the new code and then close the window. That should be it right? When I do this the new ads don’t save. I’ve cleared my cache and cookies and still nothing. Please can you help?!

said on 2007-10-13 at 9.55 am

Lisa… once you’ve closed the window you have to do a save updates….

Andy @
said on 2007-11-07 at 6.27 am

Great and easy to use widget - but, just a question, how do I add another instance of the Widget? I tried renaming and uploading another file but it isn’t showing in the list. Probably obvious ot seasoned WP users but it’s got me stumped!

Andy @
said on 2007-11-07 at 6.33 am

Oops figured it out! Forgot to activate the new AdRotator in the Plugins… duh (well I’m over 50 gimme a break)

Andy @
said on 2007-11-07 at 6.36 am

Oops agin, no it doesn’t work in 2.3 - plugin generated a fatal error… is this what will be fixed in the new release maybe? But still happy that it works so well!

Bert Degenaar
said on 2007-11-17 at 11.05 am

This pluggin is working great. No difficulties getting it up and running. Great job. Thx alot.

Brian @
said on 2007-11-20 at 10.26 pm

Hello, the adrotator is working fine but the ad address link would also show on a widget that is underneath it, for example if a have a text widget underneath the ad rotator the text would show underline and if you click on it will take you to the ad website that is showing on top.

Please let me know how can I fix this.

Thank you.

said on 2007-12-18 at 10.04 pm

Hello –

I have installed the adrotater plugin in the plugin directory along with the other plugins, but it doesn’t show up in my Wordpress plugin admin panel like the other ones. Any thoughts? I’m using 2.3.1.

Thanks, David

said on 2007-12-18 at 10.07 pm

Never mind; I just had to log out and log back in; now it’s there. (I had previously also updated the widget.php module, as mentioned above in #15.)

– David

said on 2007-12-18 at 10.26 pm

Actually, now if I have the plugin activated, I lose access to my widgets admin screen until I turn the plugin off. Again, any thoughts would be appreciated.

– David

-- cobalt @
said on 2007-12-28 at 7.55 am

If I have my own directory of jpg images that I want to rotate through, what “text” / “code” could I use to randomly go through the ads?

stilfx
said on 2008-01-02 at 6.00 am

Is there any way to not use widgets with this and do inline ads?

Chris @
said on 2008-01-03 at 6.19 pm

I unwittingly put some javacode in my ad rotator box. Unfortunately, it crashed and i cannot simply go back in and change what is in the box. I even deleted and re-installed adrotator and it still doesn’t work. I just don’t understand and now my whole blog is damaged. any thoughts?

Ninjadoll
said on 2008-01-10 at 8.53 am

Chris, you may wish to use your phpmyadmin and see whether the crashing code is still in your database. If it is, flush it. You should then be able to reinstall the widget without it repeating the process. Look for whatever entry has “Ad-Rotator” (or similar) and browse it to find the offending entry.

Ninjadoll
said on 2008-01-10 at 9.01 am

I don’t want to use this plugin as a sidebar widget, I want to call it from elswhere on the site. Is there a way to make it work independently so I can stick it in a post?

said on 2008-02-07 at 6.16 am

I have adsense in my blog. Now I want to install ad rotator for amazon. I am afraid there will be some problems. Is is OK ? Please advice.
Thank you.
Bambang Udoyono

Andy @
said on 2008-02-17 at 2.30 pm

Has this plugin been updated lately - ie to work in later/latest WP versions?

john @
said on 2008-03-04 at 2.37 am

I am using wordpress 2.33 WITH K2
I am not a programmer.
I’ve enabled Ad Rotator 1.0.1

What is the code that I would use to get the plugin to appear in the K2 Sidebar Manager.

I would love it if this was a “module” for K2.

said on 2008-03-19 at 4.21 pm

У меня ничего не получается :( Хотя делаю по инструкции, но виджет в СайдБар Виджетс не появляется :( Менять тему? Обновлять ВП (у меня 2.1.3)?

said on 2008-03-19 at 6.58 pm

Хм, разобрались :)
А вот еще вопрос: только 9?…

said on 2008-05-08 at 5.17 pm

[...] Ad Rotator [...]

sagbee @
said on 2008-05-29 at 3.44 pm

Awesome wordpress plugin, which can do alot of things :) , i really like it!!! however doest it work with wordpress 2.5.1 ? It wasn’t working when i was using ?

let me know please, whats going on..

said on 2008-06-22 at 7.41 am

[...] Ad Rotator - If you plan to run different affiliate links or your own direct ads, then this might be a good [...]

said on 2008-06-22 at 9.06 am

[...] Untuk dapatkan Plugin ini pergi ke website Dmytro Shteflyuk’s Home - http://kpumuk.info/projects/wordpress-plugins/ad-rotator/ [...]

said on 2008-06-28 at 1.33 pm

Thanks for sharing about what looks to be a good plugin. Getting it now to try it out on my blog. Much appreciated.

said on 2008-07-04 at 5.46 pm

[...] two or more block of ads (or any code) with ease. If all you need a direct and easy to use tool, Ad Rotator is definitely worth a [...]

said on 2008-07-11 at 3.46 pm

Hi. I just installed this plugin on the newest version of Wordpress. It seems that it is not rotating the images, but displaying both of them at the same time. You can see the widget at the bottom of the left sidebar on my blog, http://www.highcountrymomsquad.com

said on 2008-09-03 at 2.41 pm

[...] the AdRotator Plugin to rotate ads, this way you can show more ads in the same spot and have a clean looking [...]

English& Proud
said on 2008-09-07 at 4.53 am

Erm… The UNION FLAG should be used for English (top right corner of your website) NOT the American flag, they didn’t invent the language and STILL can’t speak it properly.

Please amend this as it is offensive to REAL English people.

Tami @
said on 2008-09-12 at 7.08 am

Please excuse my naivete, but I have installed the widget but I have a question.

I understand that I am supposed to take the “html code” and add it to the widget. My question is where do I get the code from? Do I need to sign up somewhere? When I unzipped the file, there was only a widget.php file. Is there something I missed? I’m using Wordpress 2.5.1.

Any ideas?

Thanks in advance for the help!

Tami

Kris
said on 2008-10-14 at 11.19 pm

Just wondering why the code would pull a random Google ad from elsewhere in the page, even though the code is not listed in the ad rotator widget.

said on 2008-10-24 at 9.09 am

[...] an adrotator for wordpress.  I wanted something simple. I did some searching and found “Ad Rotator” by Dmtro Shteflyuk. « Free SEO [...]

James
said on 2008-12-30 at 5.34 pm

Hi!

Sorry the link doesn’t exist, well i can’t download, i trying but i can’t, somebody can see, what happened please.

Post a comment

You can use simple HTML-formatting tags (like <a>, <ul> and others). To format your code sample use <code lang="php">$a = "hello";</code> (allowed languages are ruby, php, yaml, html, csharp, javascript). Also you could use <code>$a = "hello";</code> and its syntax would not be highlighted. If you are not using <code> tag, replace < sign with &lt;.

Submit Comment

 
Copyright © 2005 - 2008, Dmytro Shteflyuk