<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>

    <title>A List Apart: Comments on: A Better Image Rotator</title>
    <link>{url_title_path=articles/}</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:rights>Copyright 2012</dc:rights>
    <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />




    <item>
      <title>Posted by: pointman</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#1</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#1</guid>         
	  
      <description><![CDATA[Why go to all the trouble when you can use nicely formatted xml.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: nick</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#2</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#2</guid>         
	  
      <description><![CDATA[great explanation!  I really like this, but I've got a question.

I'd like it to rotate & display more than one image - how would I do that?  
basically, if I've got 3 images listed in the .ini file, I'd like each one listed in some random order.
is that possible with some minimal tweaks?

thanks!!!
]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Narrator</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#3</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#3</guid>         
	  
      <description><![CDATA[Nick: If I understand what you're asking - the order the images are listed in the INI file doesn't matter, the image being displayed is always selected from the list at random.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Christopher</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#4</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#4</guid>         
	  
      <description><![CDATA[Pointman:

What is your point...man?

Use XML for what? Are you suggesting he use xml for the config file? How would that be easier? The *.ini file seems nicely formatted to me and easy to use.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: justin</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#5</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#5</guid>         
	  
      <description><![CDATA[As with the other interesting and handy articles published here, I'd like to see a version of this for ASP.NET. I see an XML file, dynamic XML and an XSLT. The demand for ASP.NET equivelents became obvious to me after I created this .NET version of a previous ALA article: http://www.enjoybeingsoftware.com/dev/gen_heading/

What I don't see is a great need for random image rotation where the image would be of variable sizing, how could one work that in to a CSS layout without breaking the design?

Is there a practical example of this technique in usage? The example posted is hardly "real-world".]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Mathijs Dumon</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#6</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#6</guid>         
	  
      <description><![CDATA[You might be right about the fact that XML is 'the way to go' but it isn't an esay thing to pick up... 
INI-files are so much easier and as I remeber ASP.NET can just as easy handle INI files with some built-in functions. (-&gt; justin)

Anyway, rotators isn't really a dificult topic anyway, you just make it incomplicated

Mathijsken

]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: guyPaulo</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#7</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#7</guid>         
	  
      <description><![CDATA[Here's a dumb question:

Did I read the article correctly to understand that all my pages which use this will now be "###.php" and not "###.html"?

I'm already managing a fairly big site and I don't want to go back through and change all my links. Is there a way to keep my .html extensions?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Brant LeClercq</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#8</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#8</guid>         
	  
      <description><![CDATA[There is an AdRotator control that comes with .Net. If you need something special from it just inherit and extend it.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: justin</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#9</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#9</guid>         
	  
      <description><![CDATA[guyPaulo, you might want to look into using the older technique for rotating images, which can be found here: http://www.alistapart.com/articles/randomizer/

That way your pages can continue being .html or whatever. You could also get even more abstract by using the background-image property of CSS to call the random image generator...

.random_image
&#123;
background-image:url(../s/random_image.php);
...
&#125;

You can also go into the server configuration settings and map the PHP engine to parse HTML files, but that would add a lot of processing overhead and require administrative access to your server.

As a side note, you have an entire site that is static? All HTML pages with no backend processing? You must like editing HTML pages and FTPing them a lot! :)]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Narrator</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/#10</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#10</guid>         
	  
      <description><![CDATA[guyPaulo: not a dumb question at all.  Depending on your web host, there are a couple of ways to handle this.  The easiest way would be to tell the server to treat (and parse) *all* html files as if they were PHP files.  The performance hit to the server is small, but it's something to take note of if you have many plain html pages which would be parsed unnecessarily.

You can place the following code in a .htaccess file at the root of your web folder to enable this:

     AddType application/x-httpd-php .htm .html

This should handle the switch for you - but again, remember there's a slight performance hit for html pages that don't contain PHP as they'll now be parsed as if they were PHP files.

]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Rob Cameron</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P10/#11</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#11</guid>         
	  
      <description><![CDATA[I did mine in Flash. :)

And Stanley Kubrick looks like kind of a psycho ...]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: nick</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P10/#12</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#12</guid>         
	  
      <description><![CDATA[Narrator:
what I meant is, if I've got 4 images listed in my ini file, I'd like to have all 4 displayed on my page at the same time - but have the script randomize the order each time the page loads.

does that make more sense?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: justin</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P10/#13</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#13</guid>         
	  
      <description><![CDATA[Only kinda? He looks major psycho! I guess that's what happens when you're the greatest director of our time.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Ryan Cannon</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P10/#14</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#14</guid>         
	  
      <description><![CDATA[I agree that changing the .ini file to an xml file would be ideal, especially if it uses some more semantic markup so as not to scare-off anyone who inherits the updating job. Also, a slick programmer could manage the rotation in a database with an added 'image_group' field, removing the need for multiple config files and allowing the creating of a front-end application that could manage the files. Altogether I like like the improvements.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: gulliver</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P10/#15</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#15</guid>         
	  
      <description><![CDATA[Excellent.
A great script and huge improvement.
Thanks.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: john</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P10/#16</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#16</guid>         
	  
      <description><![CDATA[Very good article, thank you for sharing.  I have an image rotator on my site that uses almost exactly the same idea you have here with just a few differences.

For one, I don't use an .ini file.  The ini file parser doesn't like two double-quotation marks in the middle of a value (e.g. James "007" bond) or ampersands (php 4.3.8).  This prevents you from linking to CGI generated web pages, for instance.

Instead I use this for my configuration file:

$src = array();
$href = array();
$alt = array();

$src[] = '/img/image-one';
$href[] = 'url-one';
$alt[] = 'alt-for-image-one';

$src[] = '/img/image-two';
$href[] = 'url-two?cgi=value&another=cgi-value';
$alt[] = 'alt-for-image-two';

Second, I wrap all usage of those values in the script in an htmlentities() call.  That escapes characters that might break the anchor or img tags generated by the script.

Like this:

echo 'alt="'.htmlentities($alt[$index]).'"';
]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Imre</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P10/#17</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#17</guid>         
	  
      <description><![CDATA[Why only images? Why .ini-files?
 
We could as well just include a random (x)html-fragment from a directory (similar to the first roationscript), and with a single script we get image-rotation, or flash-rotation or article-rotation or .....

The advantage of a configuration file &#40;may it be .ini, xml or database driven&#41; is, that we get some sort of simple documentation in one file for free. But it wouldn't be complicated to put the html-fragments into one config-file.


]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Steve Barrett</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P10/#18</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#18</guid>         
	  
      <description><![CDATA[nice work, thumbs up!]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Joachim Guanzon</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P10/#19</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#19</guid>         
	  
      <description><![CDATA[I did a little tweak on the php file as well as the include part... I added $_SERVER["DOCUMENT_ROOT"]."/path/to/rotate.php"  same thing with the ini src one the rotate.php itself... but all in all, it really works great and loads fast.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: EdB</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#20</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#20</guid>         
	  
      <description><![CDATA[Just an FYI to any of your readers who try this and are having troubles with it: http://bugs.php.net/bug.php?id=28029 is what I learned of when I tried a hack on my blog app that used getimagesize() to (duh) get the image's size.  According to the posts in the blog app's forum there are different types of buggyness available.  I got a long delay before no values were returned, others had a fixed set of values returned, and some had problems with only certain image types or images of rather large byte or pixel sizes.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Tina</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#21</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#21</guid>         
	  
      <description><![CDATA[On the examples in Mozilla and Firefox I see the nasty default border showing in the examples. Did someone just forget or do you not have control over that?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Amit</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#22</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#22</guid>         
	  
      <description><![CDATA[Just in the nick of time. !!
I was breaking by head in writing an Image Rotator for my website - http://www.rolex-replica.net
Wanted to rotate all rolex watch images and stuff.......

Gr8 work, thanks :-)]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Observer</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#23</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#23</guid>         
	  
      <description><![CDATA[I wonder why you promote this solution with a plain .ini file since PHP ships with a pretty powerful XML toolkit. Why having such a handwritten parser? I support 'XML is the way to go'.

Even more I would recommend to implement this script with a database driven system if you want to rotate a larger number of images: As you say most of webhosters support PHP these days they also offer some kind of database like MySQL, PostgreSQL, MSSQL...]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Jake Liddell</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#24</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#24</guid>         
	  
      <description><![CDATA[I did actually post an update to your original article a year ago, allowing random html rather than random images.  This solved the problems of not having alt tags - you could essentially put in any random markup you wanted.  I can't really see why you'd want or need anything more complicated?

Rgds,
Jake.



]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Adam</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#25</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#25</guid>         
	  
      <description><![CDATA[True Brant but not only would you have to know about OO but you'd also have to run .NET which would be a shame]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Adam</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#26</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#26</guid>         
	  
      <description><![CDATA[That was a reponse to first page post, oops (In forget ALA can get that many posts in 24hrs)]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Peter Goddard</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#27</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#27</guid>         
	  
      <description><![CDATA[It strikes me that with a bit of manipulation of DHTML and PHP the design opportunities for this are endless. There is no reason why XML or MySQL (or any other database for that matter)couldn't be used as alternatives to the .ini file method. If the site uses a database, use that. The chances are that in a dynamic server side scripted site that uses database connections, these will be open on most if not all pages. If so, the extra load on the server will be negligible when compared to the advantages of building rotator inputs to a content management system so that additional images/content/pullquotes etc, can be added by non-technical users.

Personally, I will be wrapping up the functionality here in a couple of generic classes that can be added to my PHP development library and called upon when needed. When I have, I'll drop a post here if Mr Z has no objection.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Michelle</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#28</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#28</guid>         
	  
      <description><![CDATA[Hi there,

In the older version I was ablr to call the script via CSS. Can this be done with this version?

Thanks]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Dreas</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P20/#29</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#29</guid>         
	  
      <description><![CDATA[Well... just take a look at this:

http://www.kolumnen.de/]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: christian</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#30</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#30</guid>         
	  
      <description><![CDATA[Hmm..

When I refresh the pages with the images, only the same images keep showing up again and again and again..

http://www.bergen-malingfabrikk.no/rotatortest.php]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: christian</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#31</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#31</guid>         
	  
      <description><![CDATA[..even the same images show up in all the browsers I tested?!]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: chris ward</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#32</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#32</guid>         
	  
      <description><![CDATA[... save bandwidth and user a javascript rotator.

Attaching images server-side to pages means that the whole document has to be resent when only the slightest bit of html is changed!
Use embedded javascript instead, where the html doesnt change at all.
I'd only go for this option on a page that weighs alot, otherwise the php solution is good to go :)]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Paul Roe</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#33</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#33</guid>         
	  
      <description><![CDATA[Great idea, but I'd have to say XML would be the way to go for this kind of thing.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: ross</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#34</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#34</guid>         
	  
      <description><![CDATA[I take it this method also allows the client to cache the images? 

I think the previous version returns the file using a Mime type as opposed to passing through an actual URL to the source image. This is in itself a great bonus for us dailup users out there ;)

Great work though]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Sorvoja</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#35</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#35</guid>         
	  
      <description><![CDATA[If you have a large number of images it would be so much easier to store it all in the database together with the rest of the website content. 
]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: phil</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#36</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#36</guid>         
	  
      <description><![CDATA[thanx for the article, it's good and handy ;)
i have a problem with the image rotator. It seems to work well, when i open the page where i wanted the image rotator to be, it is there. Though the image itself is not shown only a red cross and the name of the picture. If you click on the cross you activate the link and you get to see the picture. 
What could cauze this problem i am having?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Larry Israel</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#37</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#37</guid>         
	  
      <description><![CDATA[Chris (above) wrote:
Attaching images server-side to pages means that the whole document has to be resent when only the slightest bit of html is changed!

Not so. The code gets changed on the server before the web page is sent to the client (browser). The document is sent only one time. This is how all server-side scripting works.

No bandwidth is saved by using JavaScript instead. JavaScript code must be sent from the server to the client, and therefore most likely adds bytes that are sent over the wire (increase the file size of the web page).]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Alan K</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#38</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#38</guid>         
	  
      <description><![CDATA[How could the code be changed to alter images by day and not every refresh?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Marcel</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P30/#39</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#39</guid>         
	  
      <description><![CDATA["Next week: your own guestbook!"

Come on guys these tutorials are of the "beginner" rating. Any programmer with more than a month of experience can figure out how to produce basic materials such as described in this item.

Can we please get back to the interesting articles about fancy solutions to daily problems?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: chris ward</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#40</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#40</guid>         
	  
      <description><![CDATA[Larry,

So you're saying that even when the html is changed, the page is not sent again?

You'll notice a delay in the page rendering if you opt for this method.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Rob</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#41</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#41</guid>         
	  
      <description><![CDATA[   
&lt;?php
srand((double)microtime()*1000000); 
 $num = rand(1,8);// second number is number of total files to randomize 
 include ('path/to/file/'.$num.'.php'); 
 ?&gt;]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Jack</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#42</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#42</guid>         
	  
      <description><![CDATA[Yes, that's also what i need!
How to do it?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Dustin</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#43</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#43</guid>         
	  
      <description><![CDATA[Cool.
To make this a total geeky thing, you could probably write a config panel (as easy as the config file was).
But then there goes the simplity :)
Very cool script.
Dustin]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Ry Rivard</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#44</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#44</guid>         
	  
      <description><![CDATA[I'll just point that if you have a good cruft-free content manager -- Movabletype, for instance -- you can have it spurt out the .ini file with either custom fields or just set-up another blog. This would be helpful only if you need to manage a whole lot of random images (rotating nameplates for instance, ala' typographi.com)]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: AG</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#45</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#45</guid>         
	  
      <description><![CDATA[Is there any way to store and display caption data with each picture?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: efa</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#46</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#46</guid>         
	  
      <description><![CDATA[first off, i love all of you. in each of your lives - keep up the amazing work.

ok.

trying a lot of things.
but im only getting the second image in the ini to load.
even when switching up the order in the list.
its always number two that wins.
all images will load, if i put them second in the ini.

*beats dead horse*

im starting to think that no.2 = kaka

xox
efa

]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: pr10n</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#47</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#47</guid>         
	  
      <description><![CDATA[The major advantage to using XML over an .ini file is XML allows you to have multiple elements with the same name. And now that PHP supports SimpleXML its easier than ever.

I've written an article on my blog discussing how to do just that. Mind you it is specialized to my needs and it is my first attempt at writing such an article, so go easy on me.

http://pr10n.lowriderdog.com/blog/rotateimage

Sorry about the plug, delete if desired. Although I think the bandwidth hit I'll get will be punishment in itself.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Marin Institute</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#48</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#48</guid>         
	  
      <description><![CDATA[Great little script. Really appreciate the support for CSS!]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: John</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P40/#49</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#49</guid>         
	  
      <description><![CDATA[A simple question I cpuld not get to the example "right here" the url didn't work]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Michael Romero</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#50</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#50</guid>         
	  
      <description><![CDATA[I think this is a pretty nifty tool. The requirment that all of your pages that use the tool must end in php can be a bit annoying, but I imagine you would be mostly using this tool in a dymanic site where you are already using a fair bit of php code. Besides, it seems like it is pretty easy to fix anyway.

As for the configuration file, while XML might be pretty and new, I like the ini method which is easy to understand and add to. This technique is about making an interesting design method useful and powerful, not code zealotry.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: CL</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#51</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#51</guid>         
	  
      <description><![CDATA[the script seems to be having problems being random, it calls the second image every time.

This seems to be the same problem as efa was having.

Any suggestions?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Jeremy Flint</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#52</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#52</guid>         
	  
      <description><![CDATA[Has anyone ever experienced a delay with this rotator method? The old version in particular, I would see the entire page download, then the image finally come in. I was using it to write a background image. Would that be related to the size of the image, where it was in the CSS file, how I included the CSS file &#40;@import vs. link&#41;?

Just wondering.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Shakey</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#53</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#53</guid>         
	  
      <description><![CDATA["Come on guys these tutorials are of the "beginner" rating"

Yes granted, but not all ALA readers are advanced coders.

There is more than enough space on ALA to suit everybody's tastes. I do get tired of readers knocking the articles just because they didn't find it useful or it was "obvious" to them.

This is not YOUR webzine. If you don't like an article then don't read it, or at the very least keep such comments to yourself.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Kristoffer</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#54</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#54</guid>         
	  
      <description><![CDATA[For a non php-shark this is great! It works like a charm and took only a few minutes to implement. Thanks!]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Chris</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#55</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#55</guid>         
	  
      <description><![CDATA[Thanks so much for this great and easy to use script! While I made something like this in JavaScript the other day, your solution is much more elegant! :)]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Andrew Jones</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#56</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#56</guid>         
	  
      <description><![CDATA[Liked the rotator, downloaded and trialled it locally on my machine, worked fine, uploaded files onto webserver, with structure intact and keep getting the following error message.

Fatal error: Call to undefined function: showimage() in /home/ridiikn/public_html/index.php on line 18]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Oscar</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#57</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#57</guid>         
	  
      <description><![CDATA[The rotator shows only one image every time..]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Brad Grier</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#58</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#58</guid>         
	  
      <description><![CDATA[Yeah, something was funky on my ISP's server. The script worked fine on my local dev server as is...but once I uploaded to their environment - random was not random.

Manually seeding before the array call seems to work:

    # pick a random image from the parsed config file
    srand();
    $img = array_rand($images);



]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: David Streever</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P50/#59</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#59</guid>         
	  
      <description><![CDATA[Looks great, seems perfect--but won't work for me! all broken images like the other poster.

I e-mailed my host--I bet it's on their side, as this works so beautifully on so many other sites.

Thanks a lot.

David]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Richard Greaves</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#60</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#60</guid>         
	  
      <description><![CDATA[Using a simple text .ini cought my eye because it was easy for me to implement.

I too would like an example of adding a caption line. That way I could write something simple in the .ini file and the variable would display my caption. I am all alone and have to teach myself, so any example is like gold.

I didn't get much help from all the comments about how XML would be better or how it would be easier to use MySQL. I would love to study an example of that code.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: David Streever</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#61</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#61</guid>         
	  
      <description><![CDATA[Yes, those comments didn't help me either :)

If you have a "better way" you really probably should just write your own article, or privately e-mail the authour.

Richard, as an up and coming PHP student, what did you think about my problem?

If anyone wants to see it in person:

http://www.davidstreever.com/index.php

Make sure you use that FULL ADDRESS, as I have another "index.html" there. I did try this without that--and got the same errors.

If I make the php file point to /images.ini, it tells me it "can't read the ini file". If I tell it to go to "images.ini", then it displays the broken image link.

Either of those two links, however, should work--which is what has me baffled!]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: IZ (NL)</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#62</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#62</guid>         
	  
      <description><![CDATA[Hello,

Thanks for the great script. I got it to work, but one question remains: how do I get rid of the border? Normally I use "Border=0" in an img tag, how do I get the same result using this script?

Thanks in advance.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Brad Grier</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#63</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#63</guid>         
	  
      <description><![CDATA[Hey all,

I needed to incorporate a few things in the script, including border. You can see the results here: http://www.unitedthisistheway.com and the script is here: http://www.unitedthisistheway.com/rotator.php

This is a PHP hack, something I did to get it working...probably not the best code example...you've been warned :-)]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Brad Grier</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#64</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#64</guid>         
	  
      <description><![CDATA[http://www.unitedthisistheway.com/rotator.txt
]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Zachary</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#65</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#65</guid>         
	  
      <description><![CDATA[Everytime I reload the page I get one of the first three images in the .ini file. I have five total, and if I move the two ones that never load to the top, they load but the last two don't. 

I have a random text script also, but it is actually random, so it might not be a server problem.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Zudoomon</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#66</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#66</guid>         
	  
      <description><![CDATA[There was something that you never answer in the other image rotator that I wanted to address to you. You said you can link to the img via &lt;img src="http://website.com/rotate.php"]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Mike</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#67</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#67</guid>         
	  
      <description><![CDATA[Why php, .net or xml when you can achieve the same result in javascript using less amount of code..? Just create an array containing the desired info and randomly display it through a javascriptfile that you call from the html-page..]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: David Streever</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#68</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#68</guid>         
	  
      <description><![CDATA[Mike, I'd bet because Javascript is client side, and PHP isn't...

I'd personally rather stay AWAY from javascript when possible.

As for the "no borders" questions--

remember guys, this is CSS!!!! How do you get rid of borders?

In your css file, you have a line like this:

"a img &#123;
 border: none;
&#125;" (minus the ")]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Brian Smith</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P60/#69</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#69</guid>         
	  
      <description><![CDATA[This image rotator is great!  

Is it possible to have a group of pictures shown in sequential order for a particular computer?  Maybe with a cookie and some javascript?

Brian Smith
Albany, NY]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: lavalamp</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#70</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#70</guid>         
	  
      <description><![CDATA[Even though I had a capable GD configuration this wasn't working for me, but I found the problem was using an absolute path like in the ini file like "/images/myimage.jpg" but if I used a relative path "../images/myimage.jpg" all was well in the world.

Maybe this will help other newbies like me who this script suits just jim-dandy.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: lavalamp</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#71</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#71</guid>         
	  
      <description><![CDATA[I had a similiar problem with the last images not showing up, and also parts of URL's being cut off (those with query strings). The problem was having a character that parse_ini_file couldn't deal with like an "=" in the url or a "!" in the alt line.

The fix is to enclose it in double-quotes like this:

alt = "XML! Why would I want to parse XML for 3 images?"
url = "path/to/file?with=querystring"

Wish that tip would have been in the article, I'm just a newbie and that would have saved me a bunch of time and hair.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Alan Apperson</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#72</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#72</guid>         
	  
      <description><![CDATA[Another idea would to make a table in phpMyAdmin with pic- date on- date off- link fields . Have the php script check the server date and show the image (with appropriate link) on the page .A form could then be used to enter the information so the webmaster would have only to set up the images(maybe with the images showing and radio buttons to choosethe image) and someone administering the website could make the changes.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Barry</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#73</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#73</guid>         
	  
      <description><![CDATA[Ok this works for small images, but, what if the images i want to display need to be broken into four sections can the code be modified or is there a better solution?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Joruus</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#74</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#74</guid>         
	  
      <description><![CDATA[why do you need a old fashined .INI file while you can store the same information in the pictures?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: dude</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#75</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#75</guid>         
	  
      <description><![CDATA[I used the basic rotator without the *ini file. I called the image from using the &lt;img &gt; but my page would not validate. I did not realise you could call .php from in a css background selector. Awesome work. Thanks a lot dude.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: noel</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#76</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#76</guid>         
	  
      <description><![CDATA[Having a bit of trouble getting it to work. It looks way simplier than the 'javascript' rotator I have been using. The code to placed at the top  , is that top of the body or in the head or at the top of the file?
Thanks]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Yves</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#77</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#77</guid>         
	  
      <description><![CDATA[Hello,

due to the lack of dynamic pages (I let Movable Type generate .html files where ever possible) I still use the old image rotator. If you have a look at our website, e.g.

http://www.adandbreakfast.com/a/k/Mission.html

where the large picture at the top is delivered by the image rotator php script. If you click through the site the picture never changes, though - if you reload a page - the picture changes once but then stays for the rest of the site. Is this a kind of caching isue?

Yours, Yves]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Yves</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#78</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#78</guid>         
	  
      <description><![CDATA[Hello,

due to the lack of dynamic pages (I let Movable Type generate .html files where ever possible) I still use the old image rotator. If you have a look at our website, e.g.

http://www.adandbreakfast.com/a/k/Mission.html

where the large picture at the top is delivered by the image rotator php script. If you click through the site the picture never changes, though - if you reload a page - the picture changes once but then stays for the rest of the site. Is this a kind of caching isue?

Yours, Yves]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Frank Cauley</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P70/#79</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#79</guid>         
	  
      <description><![CDATA[Thanks for the article.

I am curious about the question mark at the end of the line in the line:
$id = $images[$img]['id'] ?

Why is it not a semicolon?

If this is a conditional statment I could not find any PHP documentation.

I also had to add the line:
 srand ((float) microtime() * 10000000);
 before the rand_array .]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Dick Broer</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#80</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#80</guid>         
	  
      <description><![CDATA[I tried to use this easy way of random showing images on a site that uses frames. Using the url to point to other pages is no problem since the referred page can be shown in the same frame, but that is obviously not so with an image that links to another site. So, is it possible to add something like:
target = blank
to the ini-file?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Stickman</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#81</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#81</guid>         
	  
      <description><![CDATA[Somebody was asking about using this script without having to change all their .html files to .php. Well, if you're running on Apache then chances are you can use a Server Side Include (SSI) call to insert the script's output into your HTML. You'll need to check with your host about support, but if you can do it then something like this should work:

&lt;!--#include virtual="imagerotator.php"--&gt;

Just get the script to output the entire IMG tag, and put the above line where the IMG tag would be.

http://httpd.apache.org/docs-2.0/howto/ssi.html]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: diseņo web</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#82</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#82</guid>         
	  
      <description><![CDATA[congratulations for the article.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Chris</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#83</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#83</guid>         
	  
      <description><![CDATA[I want to implement rotating .swf files on my site.  I tried to just call them up as images in th .ini file, but to no avail.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Rob Henrichon</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#84</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#84</guid>         
	  
      <description><![CDATA[Great article - Can someone post the code on how they would use the  class and id tags, both on the .ini file and the index.php file? 

I am trying to "style" the way the image appears when called up by the rotator script. (I would like to get rid of the standard "a href border" around the image.

Thanks much - and any help appreciated.

Rob H 

 

]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Dante</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#85</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#85</guid>         
	  
      <description><![CDATA[Does ALA not even bother to maintain their forums anymore? Where's apartness when you need him. Oh yeah...he has a daughter now.

I tried to port this method to generate not just one image, but five. I cannot get it to work.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Devin</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#86</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#86</guid>         
	  
      <description><![CDATA[Hello,

Personally I love the Random Image script. I was just wondering if someone could please help me figure out how to add a target to the A HREF tag.

Many Thanks!]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Jerry E. Clark</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#87</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#87</guid>         
	  
      <description><![CDATA[Dan:
First of all, great script!
Secondly, it is a common practice for guys like me (certainly no PHP experts) to want to implement scripts without realizing that special characters can cause big time problems. Let me give you an example in your rotator.php script.
Please TELL everybody that one MAY NOT include ! in the title line of the images.ini file.
If your configuration page warned about this, I certainly missed it. So:
title = Donald Trump lives at a casino   (works)
but
title = Donald Trump lives at a casino!
(does not work!!!!!!)
This can cause people like me to go crazy trying to fix a perfect working script!]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: vasu</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#88</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#88</guid>         
	  
      <description><![CDATA[hi guys,

great article. Have a question though..  it would be nice to have images with some hotspot-links in them. I mean not the entire image pointing to an url link, but the image would have different parts pointing to different   urls ?

how can this be accomplished ? any ideas..

thanks,
vasu.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Merf</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P80/#89</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#89</guid>         
	  
      <description><![CDATA[I have read the above and it did state that the code would correct the sizing automaticly, but in mine it did not i am using the code above and was wanting to know in this code &lt;?php showImage (); ?&gt; is there a way to addin the width or height. A very specific code that i can copy and paste would help. Or a step by step comfig in english would help.

]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: scott</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#90</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#90</guid>         
	  
      <description><![CDATA[there's something about random image rotation  that's fun to think about. 

i built one of these using php/mysql. you can set up fields for width, height, title, photographer_id and whatever information you want to associate with each image. get a random image_id each time by using the mysql funtion rand() to randomly order the returned rows. then just limit or display the first row. an example sql query...

select image_id, photographer_id, title, image_path from images_random order by rand() limit 0, 1

you make a database call each time a page loads, but it works as fast as any other random rotator i can recall. 

in the admin area set up a page that lets admins add/delete images from the server while keeping the database updated.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: BlueRook</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#91</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#91</guid>         
	  
      <description><![CDATA[Brad, 

if you want your solution to work with border=0 then you need to qualify that in the code. 

Something like 
$border = $images[$img]['border']!=null ? sprintf( ' border="%s" ', $images[$img]['border'] ) : '';

If the border element is set to zero then the statement as is written in your code will always return false and a blank.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: Julian Bowler</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#92</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#92</guid>         
	  
      <description><![CDATA[This is on the face of it an excellent idear to have a php script that can be included in a php file that rotates various images round each time you load up the page....

However I have tried to get it to work a number of times and failed completely.. the script uses an ini file and sometimes shows a jpg file I have on the server but somtimes fails to load a picture and instead just shows a tiny red cross and no image....

It is very disappointing that it appears not to work correctly
I would like to accept e mail about this in an attempt to correct this.. but feel that there must be several things wrong, either with the format of the ini file or the rotator.php script or both...........
Help&gt;&gt;&gt;&gt;...???]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: niklas mortensen</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#93</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#93</guid>         
	  
      <description><![CDATA[it's extremely slow... been testing the script, watching the 'activity viewer' as it downloads the test-page, sometimes it loads fast, but most of the time the download of the page grinds to a halt when it starts downloading the rotator.php file]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: beth mix</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#94</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#94</guid>         
	  
      <description><![CDATA[will it work with text not images?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: mike Z</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#95</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#95</guid>         
	  
      <description><![CDATA[This script will only use the first image listed in the .ini file.  I tried messing around with rotation.php but nothing worked.  

From what I can see, either the ini isnt working correctly, or the rand() command isnt working for some reason.

Can anyone help me here?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: alex morris</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#96</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#96</guid>         
	  
      <description><![CDATA[well i know whats breaking it, but not sure how to fix it ;-)

the problem is the .ini files. if you have an url with a querystring appended to it, the array that parses the ini trips over and everything explodes in a big flaming fireball.

please please mr benjamin can you implement querystring support?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: alex morris</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#97</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#97</guid>         
	  
      <description><![CDATA[well, i fixed it. if your url has a querystring in it. wang some quotes around the ini entry.

eg;

url   = "think.php?id=43&category=life"

thanks for great little script benjamin.]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: andrew maury</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#98</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#98</guid>         
	  
      <description><![CDATA[I can get this to work, but I am having trouble with using it in sub-directories. Ideally, I want to be able to use this with some variables. 

For example, I want to set a variable for the root directory so that the "rotator.php" can be accessed by going to to the root level ($root/rotator.php). However, when I try to do this, I get an error with the showimage() function (Fatal error: Call to undefined function: showimage() in ...)  

Any ideas of how to fix this?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: frog brain</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P90/#99</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#99</guid>         
	  
      <description><![CDATA[Is there a way to rotate images on a certain interval using only PHP? or at least clean JS? I was thinking of implementing a session ID... but that requires session code on each page. Any suggestions?]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>

    <item>
      <title>Posted by: flip flop</title>
	  
	      <link>http://www.alistapart.com/comments/betterrotator/P100/#100</link>
      <guid>http://www.alistapart.com/comments/betterrotator/#100</guid>         
	  
      <description><![CDATA[it is possible to create several links at different places from the loaded image ?

Any ideas of how to do this?
]]></description>
      <dc:subject></dc:subject>
      <dc:date>2012-01-31T13:00:49+00:00</dc:date>
    </item>


    </channel>
</rss>
