Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 310

SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
12/29/12 06:14 AM (13 years ago)

Rotating Image in Menu with Image

For those folks who utilize Susan Metoxen's really cool "Menu with Image" plugin, I found this rather neat PHP Script that when placed in the same directory as your (random) images, will select and display them without modification (other than having PHP on your server). Script located at http://www.alistapart.com/d/randomizer/rotate.txt (of course you'll want to save it with a 'php' extension eventually) I thought it was kind of interesting. I'm thinking rotating advertising banners, but everyone might find a different use for the technique. If you want to read the article (which also includes some interesting variations of use) it's located at http://www.alistapart.com/articles/randomizer/ Basically, just substitute the "DataURL" with the URL to your randomizer script. ("DataURL":"http://www.yourserver.com/directorypath/rotate.php") Hope I'm not repeating something that's already been said, and done. Cheers! -- Smug
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
12/29/12 06:21 AM (13 years ago)
Very nice tip! That could be useful for a lot of things. Especially as you said advertising banners etc.. Galleries. Unlimited creative use :) Good stuff thanks!
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
12/29/12 11:44 AM (13 years ago)
nice Smug:)
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/29/12 03:33 PM (13 years ago)
That is so cool! I need to start organizing modifications like this to the Menu with Image documentation. I have had requests for this to be built, and this will fill the gap nicely. I will put this on the Menu with Image discussions page. http://www.buzztouch.com/plugins/discussions.php?pid=F018606BDA6027B90A3ED49
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
12/30/12 09:13 AM (13 years ago)
Excellent post/resource. Pulling and randomizng with php is the right way to do this, because that makes it work on both platforms! Anxious to set this up and experement. Great share, big thanks :)
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
01/01/13 09:49 AM (13 years ago)
Is there a screenshot showing what it looks like?
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
01/02/13 11:11 AM (13 years ago)
Would this also work for screen background images?
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
04/08/13 09:24 AM (12 years ago)
Finally got around to using this. Great mod and bookmarked it a while back for future use. The future is now and this is great for keeping banner content fresh. A couple of things- 1) If I used the DataURL with this, it was parsing the menu items and displaying a blank menu. 2) Instead I put the path to the randomizer.php script in the URL for the image and then it would display the random image. 3) YES it does work for the image background. But if you point to the same script, it displays the same header image as the screen background image. Instead - make another folder for bkg images and copy the script in there and it will display a different random background image. Thanks for the tip smug, I've got 3 variations of this Menu With Image plug-in to use now. The standard version, my animated header mod and now this random image mod. Great stuff, thanks for the link and tip again :)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.