|
|
|
|
|
|
![]() |
#1 |
A little nonsense, now and then, is relished by the wisest men
|
AutoGallery SQL question...
How can I do the "Monday" "Tuesday" ...etc. thing, like seen here:
http://www.puppykibble.com/ Thanks, Bill
__________________
TrafficHolder.com - Buy/Sell Adult Traffic |
![]() |
![]() |
![]() |
#2 |
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
Join Date: Jan 2004
Location: colorado
Posts: 318
|
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
__________________
https://furry-yiff.com/ |
![]() |
![]() |
![]() |
#3 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
dayrotate.pl
Code:
#!/usr/bin/perl use File::Copy; @weekdays = ('sunday.jpg','monday.jpg','tuesday.jpg','wednesday.jpg', 'thursday.jpg','friday.jpg','saturday.jpg'); my ($sec,$min,$hour,$mday,$mon,$year, $wday,$yday,$isdst) = localtime time; copy($weekdays[$wday],'today.jpg'); copy($weekdays[($wday==0?7:($wday-1))],'yesterday.jpg'); copy($weekdays[($wday<1?($wday+6):($wday-2))],'twodaysago.jpg'); copy($weekdays[($wday<2?($wday+5):($wday-3))],'threedaysago.jpg'); 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
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
#4 |
A little nonsense, now and then, is relished by the wisest men
|
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
__________________
TrafficHolder.com - Buy/Sell Adult Traffic |
![]() |
![]() |
![]() |
#5 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
that runs completely independently from AutoGallery. All this does is rotate 7 images and set the appropriate filenames -- requires no 'hook' into AutoGallery.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
#6 |
A little nonsense, now and then, is relished by the wisest men
|
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'); copy($weekdays[($wday<4?($wday+3):($wday-5))],'fivedaysago.jpg'); copy($weekdays[($wday<5?($wday+2):($wday-6))],'sixdaysago.jpg'); Bill
__________________
TrafficHolder.com - Buy/Sell Adult Traffic |
![]() |
![]() |
![]() |
#7 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
yep, that would do it.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
#8 |
A little nonsense, now and then, is relished by the wisest men
|
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
__________________
TrafficHolder.com - Buy/Sell Adult Traffic |
![]() |
![]() |
![]() |
#9 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
looks like you uploaded a microsoft word file.
Needs to be uploaded as ascii text -- from notepad or some other text editor.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
#10 |
A little nonsense, now and then, is relished by the wisest men
|
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
__________________
TrafficHolder.com - Buy/Sell Adult Traffic |
![]() |
![]() |
![]() |
#11 |
A little nonsense, now and then, is relished by the wisest men
|
Is this the only way to do this?
Even the support people at webair can't figure out what's wrong. Bill
__________________
TrafficHolder.com - Buy/Sell Adult Traffic |
![]() |
![]() |
![]() |
#12 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
use php
<?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.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
#13 |
I'm a jaded evil bastard, I wouldn't piss on myself if I was on fire...
|
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|
__________________
I sale Internet My sites have no traffic and no PR - let's trade - PM me |
![]() |
![]() |
![]() |
#14 |
A little nonsense, now and then, is relished by the wisest men
|
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
__________________
TrafficHolder.com - Buy/Sell Adult Traffic |
![]() |
![]() |
![]() |
#15 | |
A little nonsense, now and then, is relished by the wisest men
|
Quote:
All I had to do was this: Code:
<img src="images/##Weekday##.gif"> - shows today's image "Tuesday" <img src="images/##Weekday-1##.gif"> - shows yesterday's image "Monday" Bill
__________________
TrafficHolder.com - Buy/Sell Adult Traffic |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|