gEEEk Posted October 19, 2011 Share Posted October 19, 2011 Well hello again! I'm developing a website for a company and they have requested to have two "templates" of sorts.. One for spring/summer and one for autumn/winter. The switch between the templates only consist of some replacements of image files. So it's not that sophisticated, however I've became quite busy these days I'm looking for a script to automate this process. Preferably I'd like it to run server-side, however it won't be an issue if not. Does anyone know any software for this purpose? Maybe you could automate two FTP actions to run on certain dates? Thanks! :) Quote Link to comment Share on other sites More sharing options...
digip Posted October 19, 2011 Share Posted October 19, 2011 Add the image urls to a script or if the site supports PHP, do it on the backend with an if statement to call which image you want. Get the current date and if the month is say less than 6 show image 1, if its greater than 6 show different image. Adjust according to your needs obviously, like having ranges, if 1-3, show image 1, month 4-7, etc, etc Quote Link to comment Share on other sites More sharing options...
Sparda Posted October 19, 2011 Share Posted October 19, 2011 If the web site has a template system, you could just cron a script to change the template automatically based on the date. Even if it doesn't have a template system, you could just have it swap the images around. Quote Link to comment Share on other sites More sharing options...
Infiltrator Posted October 19, 2011 Share Posted October 19, 2011 (edited) Here is an example, of how you can change a picture with PHP Demo: http://demo.marcofolio.net/php_random_image_rotation/ Source code: http://downloads.marcofolio.net/programming/webdesign/rotate/rotate.zip This PHP script, works by rotating the images every time the page is refreshed. In order to get the images, rotated by date/time the script will need to be slightly modified. Edited October 19, 2011 by Infiltrator Quote Link to comment Share on other sites More sharing options...
gEEEk Posted October 20, 2011 Author Share Posted October 20, 2011 Excellent, thank you for your suggestions. However there might be a problem with this script since the images are not embedded using plain HTML because I am using them in a jQuery script (slideshow). Although this should probably work anyway if I just point the jQuery script to for example: <img src="http://example.com/rotate.php?img=gorilla.jpg"> Hmm not sure how well php and javascript plays toghether in this matter, well I'll just try to configure the script and report back to you once I have a result :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.