HighDots Forums  

Daily Thought Javascript?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Daily Thought Javascript? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tweaked_eye
 
Posts: n/a

Default Daily Thought Javascript? - 03-25-2009 , 01:33 PM






I could maybe do this in flash....but, has anyone found a daily thought
script that would allow me to reference a .jpg file for 365 days? I found
one that repeats every 31 days but want to implement a new thought everyday
for an entire year.

Thanks in advance.


Reply With Quote
  #2  
Old   
tweaked_eye
 
Posts: n/a

Default Re: Daily Thought Javascript? - 03-25-2009 , 01:36 PM






Maybe, would the is a good beginning level database project? I still cannot
get my head around creating a db but with CS4 would this be a good way to
approach it? Because I would also like it to tie in automatically to
something like an opt-in tatango feature.

"tweaked_eye" <nospam (AT) spammerssuck (DOT) com> wrote

Quote:
I could maybe do this in flash....but, has anyone found a daily thought
script that would allow me to reference a .jpg file for 365 days? I found
one that repeats every 31 days but want to implement a new thought everyday
for an entire year.

Thanks in advance.


Reply With Quote
  #3  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Daily Thought Javascript? - 03-25-2009 , 01:55 PM



..oO(tweaked_eye)

Quote:
Maybe, would the is a good beginning level database project? I still cannot
get my head around creating a db but with CS4 would this be a good way to
approach it? Because I would also like it to tie in automatically to
something like an opt-in tatango feature.
I don't think you need a DB here. If this is only about images, then why
not simply put 366(!) JPEGs into a directory and let the script pick the
one for the current day of year? In PHP that would be a one-liner (OK,
maybe two lines if you also add a file_exists() check, just in case).

Micha


Reply With Quote
  #4  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Daily Thought Javascript? - 03-25-2009 , 01:57 PM



..oO(tweaked_eye)

Quote:
Maybe, would the is a good beginning level database project? I still cannot
get my head around creating a db but with CS4 would this be a good way to
approach it? Because I would also like it to tie in automatically to
something like an opt-in tatango feature.
Hmm, I didn't read the last sentence ... what do you mean with that?

Micha


Reply With Quote
  #5  
Old   
tweaked_eye
 
Posts: n/a

Default Re: Daily Thought Javascript? - 03-25-2009 , 02:13 PM



www.tantango.com is a company prolly waiting to be bought by google. It is
about creating opt-in sms groups.

The more I hit the web on this I guess this would be the perfect world
design:

1) for the website, refer to a .jpg graphic
2) have the same message parlayed into an opt-in html email template
3) have the same message reduced to text for opt-in SMS messaging groups.

I suspect door#3 is probably not practical for me at this point as a NO
PROFIT website. but, I would like to accomplish door's #1 and #2.

Thanks in advance.


"Michael Fesser" <netizen (AT) gmx (DOT) de> wrote

Quote:
.oO(tweaked_eye)

Maybe, would the is a good beginning level database project? I still
cannot
get my head around creating a db but with CS4 would this be a good way to
approach it? Because I would also like it to tie in automatically to
something like an opt-in tatango feature.

Hmm, I didn't read the last sentence ... what do you mean with that?

Micha


Reply With Quote
  #6  
Old   
tweaked_eye
 
Posts: n/a

Default Re: Daily Thought Javascript? - 03-25-2009 , 02:14 PM



I am not a php'er...but, any direction you can point me to where I would
find that php code would be appreciated.

"Michael Fesser" <netizen (AT) gmx (DOT) de> wrote

Quote:
.oO(tweaked_eye)

Maybe, would the is a good beginning level database project? I still
cannot
get my head around creating a db but with CS4 would this be a good way to
approach it? Because I would also like it to tie in automatically to
something like an opt-in tatango feature.

I don't think you need a DB here. If this is only about images, then why
not simply put 366(!) JPEGs into a directory and let the script pick the
one for the current day of year? In PHP that would be a one-liner (OK,
maybe two lines if you also add a file_exists() check, just in case).

Micha


Reply With Quote
  #7  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Daily Thought Javascript? - 03-25-2009 , 02:23 PM



..oO(tweaked_eye)

Quote:
I am not a php'er...but, any direction you can point me to where I would
find that php code would be appreciated.
The most simple one, without any error checking:

<?php
printf("<img src='/path/to/images/%03d.jpg' alt=''>\n", date('z'));
?>

This would require JPEGs named 000.jpg, 001.jpg, ..., 365.jpg (date('z')
returns the day of year, starting with 0).

Micha


Reply With Quote
  #8  
Old   
tweaked_eye
 
Posts: n/a

Default Re: Daily Thought Javascript? - 03-25-2009 , 02:38 PM



thanks a bunch.

"Michael Fesser" <netizen (AT) gmx (DOT) de> wrote

Quote:
.oO(tweaked_eye)

I am not a php'er...but, any direction you can point me to where I would
find that php code would be appreciated.

The most simple one, without any error checking:

?php
printf("<img src='/path/to/images/%03d.jpg' alt=''>\n", date('z'));
?

This would require JPEGs named 000.jpg, 001.jpg, ..., 365.jpg (date('z')
returns the day of year, starting with 0).

Micha


Reply With Quote
  #9  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Daily Thought Javascript? - 03-25-2009 , 02:42 PM



..oO(tweaked_eye)

Quote:
thanks a bunch.
You're welcome.

Micha


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.