cnp_studio (cnp studio) - An interactive division of Clark/Nikdel/Powell

A unique mix of technology, creativity and human interaction makes cnp_studio a Web development firm focused on connecting people. Creating simple, useful Web sites is what we do. Learn more about us.

WordPress Plugins

WordPress Plugins

Image-Rotator Plugin ver. 1.5

About

Download .zip fileWe originally developed the Image-Rotator plugin solely for use on Sony Computer Entertainment America’s (SCEA) PlayStation.Blog to randomly feature a collection of image-based panels on their home page. Thanks to SCEA’s desire to contribute back to the WordPress community, we are able to offer this plugin for public consumption.

The Image-Rotator plug-in adds the ability to insert an image rotation panel into a WordPress blog. The plug-in features a management page which allows any users with upload privileges to easily manage the images used by the plug-in.

Change Log

  • ver. 1.5.1
    • Removed extra slash on front end URLS with links.
  • ver. 1.5
    • Improved stripping of forward slashes in url to keep paths from getting double slashes.
    • Fixed issue with false error reporting after uploading new image with the same name while editing an image.
    • Reformatted code as class to cleanup global space
  • ver. 1.4
    • Fixed divide by zero error
    • Added short code handling. To implement short code add the following to your post/page: [ir_image_rotator group=goupname]
  • ver. 1.3
    • Modified admin references to go through tools.php instead of edit.php
    • In order for the latest version to work with WP < 2.7, replace all references of 'tools.php' with 'edit.php'
  • ver. 1.2
    • Added Groups
    • Modified widget integration to allow for multiple instances
  • ver. 1.11
    • Changed imgLink field to varchar(255) to make table compatible with older version of mysql
  • ver. 1.1
    • Click counter added
    • Corrected database issues during install in WP 2.5
    • Added Widget Handling

Installation

  1. Note: The Image-Rotator Plugin requires WordPress 2.7 or greater
  2. Upload the Image-Rotator to your plug-ins directory, usually wp-content/plugins to create a wp-content/plugins/image-rotator/ directory.
  3. Activate the plug-in through the Plug-ins admin screen.
  4. Go to the Options->Image-Rotator page to set the directory where uploaded images should be saved. The default is the currently set upload directory.

Adding to a Theme

The image rotator plugin now has a widget option which allow it to be added to the sidebar of widget enabled themes. Alternatively, you can add the plugin directly to theme as described below:

  1. Open the theme file containing the content where the rotating image should be inserted, usually wp-content/themes/ /index.php or wp-content/themes/ /single.php
  2. Add this code wherever you would like the image rotation to appear (note- the space between < and ?php should not be there, our WP install keeps adding it and we haven't had a chance to fix it):
    < ?php if(function_exists('print_rotating_image')){
    print_rotating_image();
    }?>

Adding Images

After activating the Image-Rotator plug-in, the images can be managed via the Manage -> Image-Rotator Page. Each image added has the following options:

  • Title: alt text for the image.
  • Link/URL: (optional) will add a hyperlink to the image.
  • Active: when active the image is included in the random selection.
  • Image: the image file. Feel free to upload gifs, jpgs or pngs.
  • Group: the group name the image which the image belongs.

Manage Images Screenshot

89 comments »

  • Junior on February 6th, 2008 at 5:34 pm said:

    hello i must says hats of to you folks for creating such a plugin for wordpress, i will surely give it a try.

  • Excelryu on February 9th, 2008 at 9:54 pm said:

    As a fellow user of wordpress I must say I am glad that you have released this plugin to the community. I will use them with great joy.

  • fadango on February 21st, 2008 at 4:57 am said:

    how do you remove the border around the image when it is a link. I don’t care if it is all gone together

  • nick on February 21st, 2008 at 9:23 am said:

    @fadango - You’ll want to control that through your style sheet. That border is inherited from the browser’s style sheet, so you’d just need to overwrite that with your own style for the linked image to have no border (border-style: none;)

  • Ymir on March 3rd, 2008 at 2:00 am said:

    is the call out code correct? i added it to my theme but it only displays the call out code itself.

  • mike on March 3rd, 2008 at 9:01 am said:

    Ymir,

    If you copied the code directly from this page, you may need to remove the space in the opening PHP tag. WordPress keeps adding a space between < and ?php.

  • Ymir on March 3rd, 2008 at 10:51 pm said:

    thanks mike. got it working now.

  • Valdecir Carvalho on March 7th, 2008 at 12:40 am said:

    Hi there! I’m triying to use your plugin but i’m getting this error on the MANAGE –> Image Rotator menu:

    prefix . $image_rotator_base_tbl_name; if(isset($_REQUEST['ir_update_image']) && $_REQUEST["submit"] == “Submit”) { $imgID = (int) $_REQUEST['ir_update_image']; $Title = $_REQUEST["Title"]; $URL = $_REQUEST['URL']; $Active = (int)$_REQUEST['Active']; $FileName = ”; if(isset($_FILES['FileName']) && $_FILES['FileName']['name'] != ”) { $FileName = $_FILES['FileName']['name']; if(!move_uploaded_file($_FILES['FileName']['tmp_name'], ABSPATH . get_option(”image_rotator_dir”) .$FileName)) { wp_die(__(’Unable to save file to \” . get_option(”image_rotator_dir”) .$FileName .’\”)); } } if(0 == $imgID) { $strSQL = $wpdb->prepare(”INSERT INTO $table_name (imgTitle, imgFileName, imgIsActive, “. “imgLink) VALUES (%s, %s, %s, %s)”, $Title, $FileName, $Active, $URL); } else { if($FileName != ”) { $strSQL = $wpdb->prepare(”UPDATE $table_name SET imgTitle = %s, imgIsActive = %s, “. “imgLink = %s, imgFileName = %s WHERE imgID = %d”, $Title, $Active, $URL, $FileName, $imgID); } else { $strSQL = $wpdb->prepare(”UPDATE $table_name SET imgTitle = %s, imgIsActive = %s, “. “imgLink = %s WHERE imgID = %d”, $Title, $Active, $URL, $imgID); } } if($wpdb->query($strSQL) get_results($strSQL); $numrows = count($objRs); if (!($numrows==0)) { ?>

    Looks like I don’t have this rotator_images table. Do you have the script to create it?
    Thanks a lot
    Valdecir

  • Marc on March 16th, 2008 at 3:28 pm said:

    I’m getting an error when I try to upload the images. After I click ‘Submit’ I get an error that says, “Error while updating/inserting image.” Do you know what the cause of this may be and how I’d fix it?

  • mike on March 18th, 2008 at 2:50 pm said:

    @Marc,

    It sounds like a database problem. Check the database and see if the wp_rotator_images (’wp_’ is the default table prefix, this may be different for you) table was created. If it wasn’t, something must have gone wrong during the plug-in activation. Try deactivating/reactivating the plug-in again. Make sure you’re using WordPress 2.3 or higher.

  • Pete on March 23rd, 2008 at 4:22 am said:

    I am aslo getting the above error. However, when i check my uploads dir., the files were actually uploaded?
    No pictures show up though.

  • cuzzy on March 25th, 2008 at 8:16 am said:

    how do you add this to a sidebar? I want it to go in a text widget.

    is that possible?

  • Dan on March 26th, 2008 at 8:41 pm said:

    I also want to place this inside a text widget in a Word Press Self Hosted Site.

    Appreciate understanding how to do that. Simply adding the code above does not work.

    Thank you.

  • mike on March 27th, 2008 at 4:00 pm said:

    @Pete & @Marc,
    Are you receiving a fatal error message when activating the plugin? If so, if you could post the error message from the error log, that would help.

    @cuzzy & @Dan,
    Since we weren’t using widgets on the Playstation.Blog when we original created this plugin, I never added widget handling to it. It also won’t work in a text widget since the text within the widget doesn’t actually execute. The only option is to add the code directly to your sidebar.php if you have the ability to edit it.

  • iRonnie on March 30th, 2008 at 11:24 am said:

    i tried using this plugin in wordpress 2.5 and gets this message when i upload the image:

    Error while updating/inserting image.

    i checked the dbase and saw that there were no adrotator dbase created. i tried reactivating but still the same. what to do next?

  • mike on March 31st, 2008 at 8:19 am said:

    We haven’t had a chance to make the plugin 2.5 compatible. This version of WordPress moved some required functions around, but we should hopefully have one up within the next couple weeks though.

  • mike on April 2nd, 2008 at 7:38 am said:

    We’ve released a new version of the Image Rotator plugin. This one should fix some of the database issues some users were having and allow you to add the plugin via a widget. If you already have the an earlier version installed, make sure to reactivate the plugin to update the database.

  • Jared on April 5th, 2008 at 10:21 am said:

    Hi,

    I’m getting the following error in 2.3:

    WordPress database error: [Table 'essencei_wrdp1.wp_rotator_images' doesn't exist]
    SELECT * FROM wp_rotator_images ORDER BY imgIsActive Desc, imgTitle

    Any ideas why? I’ve activated and deactivated a few times. What are the details fo the wp_rotator_images table? I can create it myself if necessary.

    Thanks!

  • iRonnie on April 5th, 2008 at 12:44 pm said:

    thank you very much for releasing a 2.5 compatible plugin. however, it is not displaying the uploaded images. i noticed that when i go to manage > image rotator and do a mouse over on the manage images picture column, the image address displayed is http://(image directory path) without the domain name.tld. i thought that this could be the problem but i do not know how to fix it.

  • mike on April 7th, 2008 at 9:27 am said:

    Jared,

    I’m sorry about the issues you’re having. It seems some servers with a low PHP memory setting have issues installing the database table. I’m still looking into why this is happening. In the mean time, if you have access you can add the table yourself with the following command.

    CREATE TABLE `wp_rotator_images` (
    `imgID` mediumint(9) NOT NULL auto_increment,
    `imgTitle` varchar(100) NOT NULL,
    `imgFileName` varchar(50) NOT NULL,
    `imgIsActive` enum(’0′,’1′) NOT NULL default ‘1′,
    `imgLink` varchar(500) NOT NULL default '',
    `imgClicks` int(11) unsigned NOT NULL default ‘0′,
    PRIMARY KEY (`imgID`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8

  • mike on April 7th, 2008 at 9:47 am said:

    iRonnie,

    The image-rotator plugin doesn’t insert ‘http://’ into any of the image source paths. It only uses the same domain absolute path to the image, ie: src=”/wp-content/uploads/foobar.jpg”. So, I’m not sure what may be causing this for you. Was the file uploaded correctly?

  • iRonnie on April 7th, 2008 at 10:18 am said:

    i go it working now. i removed the / at the beginning of the path in the plugin setting. thank you very much! :D

  • Barry on April 7th, 2008 at 5:45 pm said:

    I manually created the database tables in a Wordpress MU install and it works. Needed to change the ImgLink varchar(500) to (250) as it gave an error.

  • mike on April 8th, 2008 at 7:33 am said:

    Barry,

    Thank you for the feedback. I’ve been working in SQL Server so much lately, I had forgotten about the varchar size limit in older verisions of MySql. I’ve released an update with this fix.

  • Thomas on April 11th, 2008 at 2:24 pm said:

    I would like to add the image in my header. What should i do? The only way seems to be to add the header in the sidebar with the widget option? Thanks for your anwser!

  • mike on April 14th, 2008 at 9:08 am said:

    @Thomas,

    Just follow the instructions in the ‘Adding to a Theme’ section of this page, but instead of adding it to the index.php or single.php, add the code to header.php in your theme. Make sure you remove the space in the opening PHP tag (<?php). I still haven’t figured out why thats getting changed in this page post.

  • Rachel on April 15th, 2008 at 7:11 pm said:

    What a great plug-in, exactly what we were looking for.

    I’m running WP 2.5. I upload and activated the rotator, but when I added the widget to my sidebar and clicked edit, it’s says there are “no options available for this widget” so I couldn’t confirm the directory…so I uploaded the images into the default directory.

    However when it’s viewed on my page, all you see is a box with a red X….

    Also, is there a way to add a title to the Widget? We’d like to clarify for folks what the images are of…

    Thoughts?

    Thanks so much for this, it’s great!

    http://www.arottalove.org/blog

  • Reno on May 2nd, 2008 at 3:17 pm said:

    Nice plugin.

    How often do the images change though?

  • brajesh on May 19th, 2008 at 5:49 pm said:

    hi,i just installed the plugin.i am sorry to say that you have used a mix of short and long php starting tags.so if the server does not supports short tag image-rotator.
    anyway,by replacing < ? with < ?php,it showed me the admin panel(the boxes to upload).

    Everything worked fine,i was able to upload the files, but when i tried to show it on my front page, the text were displayed but no images.Can you tell me the reason.
    Further ,please update the plugin and remove the short tags with the longer tag< ?php,that will make it better and working on all the servers.
    i have an updated copy with longer tags,so if you wish,i can mail you that.

    Any way,thanks for sharing this great plugin.
    regards
    brajesh

  • mike on June 5th, 2008 at 7:41 am said:

    Sorry for the delayed responses guys. Its been busy around here to say the least.

    @Rachel, the settinsg for the image directory are under Settings -> Image-Rotator within the admin. There are no widget specific settings.

    @Reno, the image displayed is random each time the code is run. So if you’re not using any caching, then every time a user comes to the page, else, everytime the cache renews.

    @brajesh, if you’re getting the text of the image, but not the image, then the image may not have been uploaded to the correct directory or image path is incorrect. See what the src is for the image its trying to display and see what is wrong with the path. Then adjust the default upload directory accordingly under the Image Rotator Settings

  • james on June 22nd, 2008 at 1:34 pm said:

    hi,
    im trying to get this up and running as a widget in wordpress 2.5.1
    everything seems fine, except all that i see on my front end is a small box with the name of the image in it, i dont actually see the image
    could you help me solve this please?

  • Rendra on June 25th, 2008 at 6:42 am said:

    Got it!! Just search tag. and replace / with ../ if it show in plugin’s backend, remove / if it show in plugin’s frontend.

  • Connie on July 18th, 2008 at 1:01 am said:

    The download link isn’t working.

  • mike on July 18th, 2008 at 10:37 am said:

    Hi Connie, this has been fixed. Looks like we accidently removed the downloads during the upgrade to 2.6. Thank you for the feedback.

  • Denise on July 20th, 2008 at 10:33 am said:

    Thanks for this plugin, which I seem to have working as intended. It is better than the first image rotator I tried, in the ability to link and to easily turn images on and off. One problem. I’m able to link to external page fine. But i can’t seem to link to the larger size version of the image which I’ve separately saved in my ..uploads/random-image folder. Is there some trick to how one writes the link. Can it not be done. Your help is appreciated.
    Note for future development. It would be fabulous if this plug-in could automatically create a thumbnail to saved specs and there were options for display as there are in image manager plugin. Any way to combine the 2?
    Thanks

  • mike on July 21st, 2008 at 6:57 am said:

    @Denise,
    You’ll want to use the full URL to your image, not just the relative path to it since the relative path will change based on the post being viewed. If the file/page you want to link to is in /wp-content/uploads/random-image-folder/random-image.jpg then set the link as http://mysite.com/wp-content/uploads/random-image-folder/random-image.jpg.

  • Denise on July 21st, 2008 at 9:12 am said:

    Thanks for your quick reply. I had tried what you said first. So I tried it again with three different images and I’ve triple checked the paths. Each has a thumb and and large version. The thumb comes up fine in the random image, but clicking on it there just seems to reload the page. More info if it helps: The thumb is 7000 mb. The large version is 147,000. Both are jpgs. Both have been optimized for web. The original is from another website. I uploaded them first through http://ftp. If you go to site you can see the paths. Should the large and small versions be saved in different files? i can’t figure it out. Meanwhile linking to external site works just fine. For now that’s what I’ll do, but if you have any other thoughts please let me know.

  • mike on July 21st, 2008 at 9:28 am said:

    @Denise,
    I looked at your site, and it looks like the image urls are put in incorrectly. One image has a link starting with ‘http:/’ instead of ‘http://’ and another link ended with a ‘.’.

    You may want to check your blog URL in your admin settings as well. Your post links are pointing to ‘http://www.ofness.com/http:/www.ofness.com’.

  • Denise on July 21st, 2008 at 6:34 pm said:

    Thanks. After some effort I got everything working.
    Now just a couple of general questions:

    1. What are the “rules for the rotation: frequency, on reload, other? I can’t seem to figure it out, and i can’t read PHP.

    2. It doesn’t seem like it is possible to add images to folder via FTP and then have them show up in the IR page. Is that right? Or is there some way to do this?

    3. Are you interested in suggestions for the future, or are we on our own for modifications?

    In any event this is very nice and I really appreciate your quick responses.

    D

  • andrew on July 23rd, 2008 at 7:19 am said:

    hey — great plugin and would like to use on several different pages, not just the one page…. would duplicating the entire plugin directory and changing the function so that the PHP doesnt throw an error be the best way to do this?

    I have already spent about a half hour trying that and cant get the new duplicated plugin to write a new table to the database, and although the images upload to my wp-content folder they dont get stored in the database… just wondering if there’s a more sensible way to move forward….

    cheers

    -ai

  • mike on July 23rd, 2008 at 8:48 am said:

    @Denise: 1. The image is selected randomly each time the code is run. So normally each time you reload the page a random image is chosen. If you’re using caching like mem-cached, a new image will only be selected after a request when the cache clears. 2. The only way to add images to the plugin is through the plugin interface. The plugin was originally designed for Sony’s Playstation Blog to feature certain content in the header of the home page. 3. We’re always interested in suggestions for future releases, but it doesn’t mean we’ll implement all of them.

    @andrew, you shouldn’t have to copy the plugin to add the image rotator to multiple pages. You’ll just need to call the print_rotating_image() function on any theme page you want to display an image. If you’re using the sidebar widget feature, you may need to wait for a future release. I hadn’t worked with widgets much since most of our clients don’t use them and just realized the other day that the way I have the image rotator setup will only allow one instance across all sidebars. I’ll try to get a fix out for this soon.

  • Jeff on July 24th, 2008 at 12:06 am said:

    I would love to try your plugin, but the download link appears to be dead again. Can you help?

    Thanks,
    Jeff

  • nick on July 24th, 2008 at 6:29 am said:

    Hi Jeff,

    Thanks for the heads up on the link. It’s all fixed now and you should be able to download the file now. I apologize for the problems with that.

  • andrew on July 24th, 2008 at 11:31 am said:

    hey mike — thanks for the reply, let me clarify what i mean…. I know that PHP function displays the image group… and that works fine for me if i want to display the same group on various pages.

    What I’m trying to accomplish is seperate installs of the plugin that add 2, 3, 4 tabs to the menu bar — all controlling different image sets so that certain pages only display groups of specific images, to which they load randomly. To do that, I figured duplicating the plugin and making some updates to the PHP and MySQL functions would work — I think it will with some more elbow grease but for now I was wondering if there is an easier way to do what I’m trying to do, in your opinion. Because I thought I made all the necessary edits but the MySQL install is not firing for the duplicate plugin… although the upload form works correctly — but ultimately it ends in an error because nothing gets stored in the database.

    I guess in the future, if there was a value list in the admin panel that could “tag” images to display on certain pages only if the function called the tag in question….. like print_rotating_image( “Home” ) vs print_rotating_image( “Contact” ) — it would really expand the plugin to act like more of a sophisticated header management plugin for more visual sites, know what i mean?

    -ai

  • Bernadeth on July 26th, 2008 at 10:44 pm said:

    it won’t work. there are errors everytime I click submit

  • Ryan on July 28th, 2008 at 9:16 am said:

    Hi nice plugin

    Is there anyway the random image url can open in a new window once clicked on? (target=”_blank”)
    I’m using the widget to implement it on my wordpress blog

  • mike on July 28th, 2008 at 10:30 am said:

    @Ryan, there’s no way to get the link to open in a new window without modifying the code. You’ll just need to add the target=”_blank” within the anchor tag on line 52 of the image-rotator.php within the function print_rotating_image().

  • Friso de Jong on July 29th, 2008 at 8:56 am said:

    Dear Mike,

    -> The zip file is corrupted <-

    This is exactly what we were looking for these past few days (..). Especially because I think that this is the only plugin (widgetized) that rotates and has the ability to click on each seperate image.

    As the zipfile is corrupted, could you upload a new zipfile? Or send the PHP file to me?

    Cheers,

    Friso de Jong
    Chair Platform ELFA

  • mike on July 29th, 2008 at 4:01 pm said:

    Friso, I’ve tried on a couple different computers and haven’t been able to reproduce the issue you’re having with the zip file. Try saving it to your computer before opening it.

  • Aaron Maldonado on July 31st, 2008 at 4:10 pm said:

    Hi there, I have the same problem as Valdecir.

    The plugin is not creating the table although I’ve created it manually but still appearing the same code on the MANAGE screen. Why is this happening?

    prefix . ‘rotator_images’; if(isset($_REQUEST['ir_update_image']) && $_REQUEST["submit"] == “Submit”) { $imgID = (int) $_REQUEST['ir_update_image']; $Title = $_REQUEST["Title"]; $URL = $_REQUEST['URL']; $Active = (int)$_REQUEST['Active']; $FileName = ”; if(isset($_FILES['FileName']) && $_FILES['FileName']['name'] != ”) { $FileName = $_FILES['FileName']['name']; if(!move_uploaded_file($_FILES['FileName']['tmp_name'], ABSPATH . get_option(”image_rotator_dir”) .$FileName)) { wp_die(__(’Unable to save file to \” . get_option(”image_rotator_dir”) .$FileName .’\”)); } $new_file = ABSPATH . get_option(”image_rotator_dir”) .$FileName; $stat = stat(dirname($new_file)); $perms = $stat['mode'] & 0000666; @ chmod($new_file, $perms); } if(0 == $imgID) { $strSQL = $wpdb->prepare(”INSERT INTO $table_name (imgTitle, imgFileName, imgIsActive, “. “imgLink) VALUES (%s, %s, %s, %s)”, $Title, $FileName, $Active, $URL); } else { if($FileName != ”) { $strSQL = $wpdb->prepare(”UPDATE $table_name SET imgTitle = %s, imgIsActive = %s, “. “imgLink = %s, imgFileName = %s WHERE imgID = %d”, $Title, $Active, $URL, $FileName, $imgID); } else { $strSQL = $wpdb->prepare(”UPDATE $table_name SET imgTitle = %s, imgIsActive = %s, “. “imgLink = %s WHERE imgID = %d”, $Title, $Active, $URL, $imgID); } } if($wpdb->query($strSQL) get_results($strSQL); $numrows = count($objRs); if (!($numrows==0)) { ?>

  • Aouni on August 9th, 2008 at 9:55 pm said:

    Hello Mike,

    The above error which appears to be happening with Valdecir and the other guys is caused by the <? opening code in php files. I think with the latest versions of php, this opening sign is no more supported. So it should be <?php.

    Hope that helps, though am not a programmer at all, but it happened that I read it once on the php.net site. I also got this error on my localhost while testing the plugin, but I edited all the php instances and it worked!

    I would like to suggest a feature for a future release which would be valuable. Is there a way to add a right / left arrows on the pictures so that a visitor can manually rotate the photos?

    Thanks.

  • Friso on August 18th, 2008 at 9:01 am said:

    Hello Mike,

    The download from the zipfile worked perfectly now. Now idea what my system was complaining about.

    The plugin works flawlessly. I have a few questions though:
    1. Wat string would I need for a timed interval between images of lets say ten seconds?
    2. Is an image chosen at random every time I open the website?

    Looking forward to your respons.

    Cheers,

    Friso.

  • Robert T. on August 23rd, 2008 at 12:47 pm said:

    After I’ve downloaded the file, when i try to unzip it, it gives me the “corrupted file” error!
    Could you pls fix this!
    Thanks

  • Christina on September 5th, 2008 at 10:02 pm said:

    I too would like there to be a timed interval. If at all possible. Or I need to switch plug-ins (Flash Fader).

    Best,
    Christina

  • rick on October 2nd, 2008 at 7:11 pm said:

    Love the plugin. After I dealt with the extra space in the opening php statement, all was well…My question..Can you create multiple instances of the image rotator, so that you could have more than one group of images. I wanted to be able to manage different groups of images, but it looks like I am limited to only one. Am I correct?

  • Marta on October 15th, 2008 at 8:21 pm said:

    I am wanting to add this to my header but cannot cannot get them to display. I have the plugin set up and the images set up in the wp-content/upload folder but still no go.

    The call out code where exactly in the header.php file do I need to place it?

    Do I need to change the css settings?

    I am redesigning the blog header from the Kubrick header if that helps.

    Thanks!
    Marta

  • mike on October 16th, 2008 at 10:25 am said:

    @rick: I’ve had a couple of requests to add groups to the plugin and it’s on my to do list. We’ve been extremely busy lately, which is great, but also means that its hard for me to keep up with the plugins.

    @Marta: the call out code should go wherever the image should be displayed within the template. Make sure you remove the extra space within the

  • Rob on November 7th, 2008 at 2:54 am said:

    I really like this plugin. It works great.

    I have a feature request … I would like it to be able to display different sets of images. First (say) 600×100px in one location on the page. Second (say) 300×300px at another location. Third etc…

  • Christian on November 18th, 2008 at 7:17 pm said:

    Is it possible to add this feature into the content of a WordPress page - so the image rotator only lives on one page on my site? i’ve tried adding the php snippet via HTML editor in the Manage/ Page area… not working. Any advice would be appreciated.

  • Michael on November 19th, 2008 at 3:02 am said:

    I have installed Image-Rotator however when I set up the image directory I get the following message when the update button is clicked:

    The image directory has been updated.
    Warning! /home/mrtosd/public_html/wp-content/uploads/ is not writeable.

    If have checked the directory of course and the permissions are set to 777. And it doesn’t matter what directory I point it to.

    Any assistance would be appreciated. This appears to be an excellent plugin.

  • mike on November 20th, 2008 at 5:53 pm said:

    Well…I’ve finally gotten around to updating the image-rotator plugin. The newest version, 1.2, adds grouping and the ability to add multiple instances of the widget.

  • mike on November 21st, 2008 at 6:04 pm said:

    @Michael - this should be fixed in version 1.2. WP recently changed the handling of the upload directory to be the absolute path instead of the relative path. So the message your seeing is actually looking for /home/mrtosd/public_html/home/mrtosd/public_html/wp-content/uploads/ which I assume doesn’t exist. You can change the upload image-rotator upload directory to just /wp-content/uploads/ or try installing the latest version.

  • MVM on December 11th, 2008 at 11:56 pm said:

    I have the same question as Christian/November 18th.
    I just need a simple, clickable image rotator that will live on my static WordPress home page. Is it possible to assign this Image-Rotator to a single WP Page? How?

  • mike on December 16th, 2008 at 9:36 am said:

    @MVM, @Christian - sorry, the current version doesn’t support short codes. Though, if you are familiar with PHP/Wordpress integration, it wouldn’t be hard to add. This may be something I look into for future updates.

  • MVM on December 16th, 2008 at 5:52 pm said:

    Thanks for the reply.
    Do you know how I can learn how to add image rotator to the content area of my static home page using PHP/WordPress integration?
    Please do add this option to a future version of the plug-in if possible.

  • mike on December 16th, 2008 at 6:02 pm said:

    Checkout http://codex.wordpress.org/Shortcode_API.

    Its as simple as adding the following to the plugin (I did this in 30 secs, so there could be some issues):

    function ir_shortcode($atts) {
    extract(shortcode_atts(array(
    ‘group’ => ‘default’
    ), $atts));

    return print_rotating_image($group, false);
    }
    add_shortcode(’ir_rotating_image’, ‘ir_shortcode’);

    The one other thing you will have to do is modify the print_rotating_image function to optionally return the HTML instead of printing it.

  • David on January 2nd, 2009 at 5:32 pm said:

    Trying to get this plugin working but running into some problems. You can see the error message “Warning: Division by zero in /home/ispisp/public_html/wp-content/plugins/image-rotator/image-rotator.php on line 439
    }?>” at teh website.

    Also I’ve looked in tools and setting and see ways to upload an image and specify the directory. When I upload an image nothing seems to happen. I also don’t see any interface to manage pictures. I’m on WP 2.7. Thanks for your help.

  • mike on January 7th, 2009 at 2:42 pm said:

    @David, WP2.7 changed the reference page for handling posts within plugins. I’m going to have to make some alterations to the plugin to get it to work with 2.7.

  • mike on January 7th, 2009 at 3:41 pm said:

    @David, the latest version should work fine in 2.7. The page reference has been updated.

  • MVM on January 8th, 2009 at 7:10 pm said:

    Appreciate the reply of Dec. 16 on how to add image rotator to the content area of my static WP home page.
    However, as I am not a programmer, it is not comprehensible to me. Any chance you could explain where to put this code? How to specify the images I want to be rotated, and their dimensions? Anything else I need to make an image rotator appear within the content area of my home page?

  • Chris on January 12th, 2009 at 8:43 pm said:

    I’m with David! Same thing that he described is happening to me.. with the failed uploaded files, and the “Divided by Zero” error in WP 2.7. Though, I’m noticing that this plugin doesn’t support static pages? That’s how I’m trying to integrate it, so could that be the problem?

    I left my email, any kind of help would be amazing. I’ve been trying to find an image rotator for 2 days now, and this seems like the best option but I can’t get it to work.

    Thanks so much!

  • Gail on January 13th, 2009 at 6:41 pm said:

    Hi,
    I just downloaded and installed the plugin today and I too get the “Division by Zero” error. I’m also using WP 2.7. My error message says the problem is on line 436 of image-rotator.php

  • Sandra on January 20th, 2009 at 2:19 pm said:

    Hello
    i have the same problem of David. I see an error message: Warning: Division by zero in /home/.julia/sandra/materia.sandra.cl/wp-content/plugins/image-rotator/image-rotator.php on line 436, ¿can you help me?
    thanks a lot from Chile.

  • Ami on January 22nd, 2009 at 9:44 pm said:

    Hi there, great plugin except my image path when I upload the pictures ends up correct on my FTP server but on the image rotator shows

    site:/wp-content/uploads//beauty175.jpg

    Can you help me to find where to remove the extra / in the address?

    thanks!

  • mike on January 29th, 2009 at 10:20 am said:

    A new version has been released. This should fix the divide by zero error along with adding shortcode handling.

  • Reliance Insider on February 3rd, 2009 at 12:06 pm said:

    I downloaded the plugin today. However when I try to activate the plugin, I get the following error.

    Fatal error: Call to undefined function plugins_url() in
    /wp-content/plugins/image-rotator/image-rotator.php on line 463

    Any help is highly appreciated!

    Thanks

  • mike on February 3rd, 2009 at 2:58 pm said:

    @Reliance Insider - you may need to upgrade your installation of WordPress. I changed a lot of absolute paths to use the new plugins_url() function which was recently added to WP.

  • Reliance Insider on February 3rd, 2009 at 5:29 pm said:

    oh! I am using WP 2.6. I am not very well versed with WP so kind a hesitant to upgrade. Also currently my site is pretty stable and no major reason to upgrade.

    Thanks a lot. Its a great plugin and I will love to use it when I upgrade to latest version of WP in future.

    Thanks.

  • JMP on February 4th, 2009 at 6:05 pm said:

    It looks like blog.us.Playstation uses text withing their images. Any chance you will implement a text overlay feature?

  • Scott Bernadot on February 11th, 2009 at 4:53 pm said:

    Hi Guys,

    Thanks for offering this plugin, however it is not displaying any images for me in WP 2.7. Just downloaded the latest copy.

    I also noticed that when “editing” an entry that I’ve already created, just to change text, that I receive this error upon saving:

    Error while updating/inserting image:

    Thanks again for your plugin and great support. - Scott

  • Glenn on February 23rd, 2009 at 6:24 pm said:

    I’ve activated the plugin and am also getting the same error as Amy -

    http://…/wp-content/uploads//boy.png

    I’m also trying to find where to remove the extra ‘/’ in the address. Thanks for the plugin!

  • thomas on February 28th, 2009 at 11:54 am said:

    I can’t seem to download the zipped file. It appears to have the wrong contents or is corrupt. Any ideas? It downloads the image-rotate.zip file but when you open it there’s another image-rotate file with only 7k…Help…thanks!

  • mike on March 12th, 2009 at 8:37 am said:

    @JMP - blog.us.playstation.com adds the text to the images themselves. I thought about integrating text overlay, but it would be too limiting in style. It’s more flexible to just have the blog owner add their own text via an image editor.

    @Scott Bernadot - Version 1.5 should contain the fix for this. I was accidentally checking the number of rows updated instead of the error result from the query, which would still be zero if the file you uploaded had the same name.

    @Glenn - I’ve added more path handling in 1.5 that will hopefully clean this up.

    @Thomas - We’ve had a lot of people say this, but haven’t been able to reproduce it ourselves. I’m going to try to get the plugin hosted on WordPress.org soon so that should fix the problem people are getting with our server.

  • Fearhsonic on April 7th, 2009 at 3:50 am said:

    Hi there,

    I have insalled the plugin successfully however when i set directory to

    wp-content/uploads/

    it translates to:

    http://blog.chrisfearon.com/http://blog.chrisfearon.com/wp-content/uploads/01.jpg

    as a result the text appears only, however the image has successfully been upladed as it exists at:

    http://blog.chrisfearon.com/wp-content/uploads/01.jpg

    How do i edit settings to accomodate link properly.

    Thanks in advance

  • mike on April 10th, 2009 at 8:11 am said:

    @Fearhsonic - I made a fix. Try downloading again. There was an extra slash in the image url for images with links that was probably causing the double domain to come up in some browsers.

  • Anji on April 15th, 2009 at 4:02 pm said:

    I have downloaded the program and installed it (no problems) but when I try to add an image and hit the submit button, nothing happens at all….

  • Ben on May 8th, 2009 at 7:36 am said:

    Hi,

    Great plugin - works like a dream.

    Only issue I’ve found is that when you edit an image the preview of the image is broken. Though everything else works so its not a big deal.

    Keep up the good work and thanks!

  • Jenny on May 15th, 2009 at 1:25 am said:

    Can I place the widget in side bar ?
    I want to display the rotating image in side bar.
    Thanks.

  • Taeke on May 27th, 2009 at 7:22 am said:

    @JMP: you can easily make a small modification to the way the plugin outputs the image and title (alt text).
    I abuse the alt text to display an semi transparent overlay with some text in there. Send me an email through my website if you need help with the modification

Leave a Reply

Latest Comments

Winter Haven Chamber of Commerce:
A super-sized congratulations to the entire team and cnp-studio/Voce Connect from t...

mike:
@Bernd, the SCEE blog is using the new version that should released soon. Though, ...

Bernd:
Hey mike, great news and thanks for your work. Is the SCEE blog now using the same...

mike:
Hey guys, I should have a new version of this plugin coming out later this month o...

AlvienRizki:
hello, i need your help for my blog. When i put this code on my blog theme,...

Categories Archives