Current location: Hot Scripts Forums » General Community » Script Requests » automatic motd script?


automatic motd script?

Reply
  #1 (permalink)  
Old 09-11-03, 02:00 PM
althalus althalus is offline
Newbie Coder
 
Join Date: Sep 2003
Location: schveden
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
automatic motd script?

hej
i'm looking for a script (preferably php, as i'm starting to learn) that would spew out a few lines of different text depending on the day and month. been browsing and searching the net for an hour now but couldn't find anything useful.

i'm guessing i'd need a database for this? i have one, but i'm not very very good at handling it (noob). either that or the script would be very big, i guess?

hmm.. anyway, if anyone could help me i'd be grateful

thank you
/al
__________________
:: www.magnusandgeorgia.tk ::
Reply With Quote
  #2 (permalink)  
Old 09-11-03, 02:14 PM
Godsmack Godsmack is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Did you check out the scripts on this site under PHP -> Quote Display. Here is the link:

http://www.hotscripts.com/PHP/Script...lay/index.html

Hope this helps.
Randy
Reply With Quote
  #3 (permalink)  
Old 09-11-03, 02:24 PM
althalus althalus is offline
Newbie Coder
 
Join Date: Sep 2003
Location: schveden
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
hmm it seems like they are all just posting stuff (quotes) randomly though.

what i want is a script that would display a snip of text (info about the day but different year, basically) which would look something like:

september 11
19xx - something happened
19yy - something else happened
20zz - yet something else happened

i'm not great at explaining, but i'm sure you understand?

thank you
/al
__________________
:: www.magnusandgeorgia.tk ::
Reply With Quote
  #4 (permalink)  
Old 09-12-03, 12:38 AM
jewellgr jewellgr is offline
Wannabe Coder
 
Join Date: Aug 2003
Location: Michigan USA
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
You will need a database for that unless only have a few hundered entries.
Then, you could get away with a csv file database.
__________________
ArecaWeb Team
Gregg Kenneth Jewell
Reply With Quote
  #5 (permalink)  
Old 09-12-03, 10:23 AM
althalus althalus is offline
Newbie Coder
 
Join Date: Sep 2003
Location: schveden
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
i was thinking about it some today, and maybe would i somehow be able to use a .txt-file with the text written as:

20030912, text here text here
20030913, text here text here

and so on? and have a script somehow extract the data depending on the first numbers (the date). i don't know.

otherwise, could you give any information on how to deal with the database?

thank you


added: i re-read your post, what is a csv database?
__________________
:: www.magnusandgeorgia.tk ::

Last edited by althalus; 09-12-03 at 10:25 AM.
Reply With Quote
  #6 (permalink)  
Old 09-12-03, 12:28 PM
clay@lazarusid.com clay@lazarusid.com is offline
Newbie Coder
 
Join Date: Aug 2003
Location: Flint, Michigan
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
althalus,

Why you just demonstrated was a csv database. It's definitely something that could be managed as a simple text file, because the structure of the data isn't likely to change. You do get yourself limited as to the length of your entries though.

That's something you could probably do yourself, and would make a good learning project. There is some merit to storing the data in a database though, because pretty quickly it will get very large.
__________________
<a href="http://www.lazarusid.com/">www.lazarusid.com</a>

Custom script development
Reply With Quote
  #7 (permalink)  
Old 09-13-03, 04:29 AM
althalus althalus is offline
Newbie Coder
 
Join Date: Sep 2003
Location: schveden
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
i guess i could edit the file now and then and remove dates that had already been displayed.

ok then, moving on. where would i begin with such a script? is there anywhere on this site i could look for a "php-school"? i'm not great at looking up stuff myself so any "starting" guidelines would be appretiated.

thank you
__________________
:: www.magnusandgeorgia.tk ::
Reply With Quote
  #8 (permalink)  
Old 09-13-03, 06:05 AM
althalus althalus is offline
Newbie Coder
 
Join Date: Sep 2003
Location: schveden
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
i was browsing this site some and found the tips & tricks section. looked through it and found a link leading to this page:
http://www.netlogger.net/downloads/example/index.php

maybe could i somehow modify the script so that instead of name, weight and city, it would look for the date and only that, and present the text? just one question, how could i 'break out' of the table? is it possible?
__________________
:: www.magnusandgeorgia.tk ::
Reply With Quote
  #9 (permalink)  
Old 09-13-03, 06:37 AM
clay@lazarusid.com clay@lazarusid.com is offline
Newbie Coder
 
Join Date: Aug 2003
Location: Flint, Michigan
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
althalus,

Where to start? First, reconsider how you manage the data. The date column shouldn't be the date you want to print something out. It should be the date that the event occurred. Then you scan through your list for any date that matches the month and day, but not the year. You can process a really big list line by line using this technique, and it won't be a big burden on the server.
__________________
<a href="http://www.lazarusid.com/">www.lazarusid.com</a>

Custom script development
Reply With Quote
  #10 (permalink)  
Old 09-14-03, 02:38 AM
althalus althalus is offline
Newbie Coder
 
Join Date: Sep 2003
Location: schveden
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
i managed to re-create the script from the page (just to have something to start with).

now, the next thing (and probably the last?) thing i need help with would be how i would have it check *today's* date. is there a simple way of implementing it into the script?

as i said, i am a n00b and i don't know a whole lot about php (other than it's harder than html ) i am determined to learn it "fully" at some stage, but right now i don't have the time for it, sadly.
__________________
:: www.magnusandgeorgia.tk ::
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a good review management script griz_fan Script Requests 10 07-29-07 05:08 AM
Question of the Day script? ncasares Script Requests 1 08-28-03 01:12 PM
automatic alignement script amj01 Script Requests 2 07-04-03 01:22 PM
Talkback script..help pls BC_ PHP 0 06-22-03 06:44 PM
Need help with a script boardpix PHP 7 06-08-03 11:37 PM


All times are GMT -5. The time now is 11:46 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.