![]() |
AutoGallery SQL question...
How can I do the "Monday" "Tuesday" ...etc. thing, like seen here:
http://www.puppykibble.com/ Thanks, Bill |
one of the board moderators might want to get rid of that link when I clicked on it my virus program went off saying i had picked up a trojan
Fred |
dayrotate.pl
Code:
#!/usr/bin/perl Code:
0 0 * * * cd /var/www/domain.com/images/;/usr/bin/perl /var/www/domain.com/images/dayrotate.pl > /dev/null in your html, you refer to today.jpg, yesterday.jpg, twodaysago.jpg and threedaysago.jpg |
Wow, this might be beyond my abilities, but what the heck, I'll give this a try!
Do I edit the cron.cgi file that came with AutoGallery SQL and add that line of code somewhere? Thanks, Bill |
that runs completely independently from AutoGallery. All this does is rotate 7 images and set the appropriate filenames -- requires no 'hook' into AutoGallery.
|
Ok, cool.
if I want to show all 7 days of the week, do I just add more code to the dayrotate.pl file? Like: Code:
copy($weekdays[($wday<3?($wday+4):($wday-4))],'fourdaysago.jpg'); Bill |
yep, that would do it.
|
Ok, cool.
I have customer support helping me with this at webair and they're telling me there's errors generated by the dayrotate.pl file. Here's the error messages: /www/virtual/tortus32/www.largelovelys.com/images/dayrotate.pl: line 1: {rtf1macansicpg10000cocoartf102: command not found /www/virtual/tortus32/www.largelovelys.com/images/dayrotate.pl: line 2: syntax error near unexpected token `}' /www/virtual/tortus32/www.largelovelys.com/images/dayrotate.pl: line 2: `{\fonttbl\f0\fmodern\fcharset77 Courier;}' Let me know what you think. Thanks, Bill |
looks like you uploaded a microsoft word file.
Needs to be uploaded as ascii text -- from notepad or some other text editor. |
Yep, that's what I did.
I copied the code from above and pasted it into a text file with TextEdit. Uploaded it with Fetch to my images folder. And once it was uploaded, the file type says Perl Source. Thanks, Bill |
Is this the only way to do this?
Even the support people at webair can't figure out what's wrong. Bill |
use php
echo date("l"); echo date("l",time() - (1* 86400)); echo date("l",time() - (2* 86400)); echo date("l",time() - (3* 86400)); echo date("l",time() - (4* 86400)); echo date("l",time() - (5* 86400)); echo date("l",time() - (6* 86400)); ?> although I really hate doing date calculations on every pageload -- especially 7 of them you could also do the same thing with an array, find the current position, cycle through and set the variable. |
The answer is under Template Values on this page - http://www.jmbsoft.com/owners/ags/ma...lates.tgp.html
You could always ask in the owners forums and get Tech Support to give you a hand |viking| |
Those are both great, but I want to do this with image files for each day that say the day of the week, as seen in the link I posted above..
I already posted in teh owners forum there, but they always take a few days to reply. Not the speediest bunch. Thanks, Bill |
Quote:
All I had to do was this: Code:
Bill |
All times are GMT -4. The time now is 12:58 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc