this sounds interesting and I envy your for yuour programming skills …
Sure enough the smeghead in me would love to see some web admin interface but heck .. whatever works …
I think i really need to pick up some PHP books
Thanks and let me know how it is coming along. Good luck and fun with it.
P
thanks nightmayr …
I think I am still to far to even remotly try something that hands on …
so .. so far what i did was learning the magic of doing a second blog, using the same SQL database … and it lives at nacken.com/dj and i can edit it web based … and sure, it has not all the fun automation ideas i saw mentioned here …
I think i’d be happy enough if i accomplish the following 2 steps …
nacken.com/dj should look like http://nacken.com/dj/index.php?p=4
meaning .. each day it displays the post of the day site with comments and such …
and what was the next thing i wanted ??? .. hmmm
oh yeah .. previous / next buttons to switch between days … i read some stuff .. but could not really find a solution …
Thanks again
P
Commenting on myself already:
I think the random picture of the day script will keep a log over pictures shown earlier, and use a scheme where those from before are not in the bucket of random pictures selected for a given day.
When the bucket is empty, the log is flushed, and the random pic starts again.
Even more ideas:
For each directory (and working for the subtree if nothing is specified further down in it) I will add the possibility to add default data for pictures; thus you don’t have to write in your name in each and every exif (it is a chore, though Photoshop do remember your last used values). I’ll also add the possibility to store exif information in plain text files; so that if you don’t have a software which can save exif, my script will take the exif from your camera and add what you have written in the default file then what is written in the specific file for that specific picture.
So EXIF data will have this priority: original exif data of photo highest, then followed by manually added and then finally the defaults for the directory, and working upwards to the root of the photodirectories, with the last default (highest in the directory hierarchy) the one with the lowest priority.
I think the original exif data should have highest priority, because camera settings are stored there. That might have the unfortunate side-effect of overturning any info you’ve added to photographer manually; perhaps I should make each exif data in each extra file either overwrite or append; ie. in the camera the photographers name is stored as “Camera owner: Paul K Egell-Johnsen”, then I add to the manual text file “EXIF-Photographer-Append: ‘Photographer: Paul’s brother'”, and in the topmost hierarchy file I have “EXIF-Photographer-Append: ‘Hosted by: Vogol.com'”.
So the resulting field in the database would read: “Camera owner: Paul K Egell-Johnsen Photographer: Paul’s brother Hosted by: Vogol.com”
This would have to make it into a 0.4 version.
I think I should put up a blog for the project…
Anonymous
<?
if (file_exists(“image_rand.txt”) ) $temps=date(“U” , filemtime(“image_rand.txt”));
if ($temps < (3*2) ) {
$dir = “images/”;
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false){
if ($file != “.” && $file != “..”) {
$fichier[$nbimages]=”$file”;
$nbimages++;}}
closedir($dh); }}
$i=rand(0,$nbimages);
echo’ <img src=”images/’.$fichier[$i].'” border=”0″ />‘;
$fp=fopen(“image_rand.txt”,’w+’);
fputs($fp,$fichier[$i]);
fclose($fp);
} else {
$fichier=file(“image_rand.txt”);
echo’ <img src=”images/’.trim($fichier[0]).'” border=”0″ />‘;
}
?>