scriptygoddess

07 Oct, 2002

Event Script

Posted by: Jennifer In: Scripts

Another script for ya! On the low tech side – but the name of the game is KISS – Keep It Simple Stupid. :)

This script will let you enter in events (through a web interface/page). They can either be recurring events (like birthdays, anniversaries, etc.) or single occurence events.

Then, with a simple line of php, you can have the next x# of days' events display on your site.

The script should be fairly easy to install – just requires your editing a config file… You enter in the dates. Add the line of code to your site… you're done.

Download the script here.

Once again – I have little time to actually support this stuff, but please feel free to post any questions you may have in the comments section. If I can't/don't have time to answer it, there might be someone else who can. But before you post a question – if there are already comments here, please read through the comments to see if your question has already been answered.

50 Responses to "Event Script"

1 | Christine

October 8th, 2002 at 9:37 am

Avatar

Can't wait! Can't wait! Yeah! By the way, can you link to a URL for the date too? For example – September 25th – <link>Jennifer's Birthday</link>?

2 | Jennifer

October 8th, 2002 at 9:50 am

Avatar

Yes, you can. In the "add event" window you select month / day / year (if not recurring)
and the there's a text box – that's the text that will show up next to the date… You can enter anything you want in there (including HTML) so enter in <a href="htt://…">person</a>

3 | Tom

October 11th, 2002 at 11:48 am

Avatar

Wondering what code could be added to the script to allow you to delete entries in the event list. Also, will this script only show future entries or just all entries in the event list? Thanks!

4 | Jennifer

October 11th, 2002 at 6:08 pm

Avatar

Well – I was trying to keep the script simple. Deleting a line seemed like more trouble than it's worth… all you'd need to do to delete an event… go into the "eventlist.php" page – and remove the line for the event you want to delete (it'll show up with "|||" between the month / day / year(or recurring) / description.. :)

5 | Quadsk8

October 12th, 2002 at 9:36 am

Avatar

Hello Jennifer,
For me the "show events for the next $noOfDays"-option does not seem to work, I get every date in the list.

I have translated some Months and Display-messages into Dutch, could this be the reason? (Also I swapped the day/month to make it European)

Any suggestion?

Lawrence

6 | Jennifer

October 12th, 2002 at 9:41 am

Avatar

What does your include line look like?
also why don't you paste your changes here – what the code was originally, and what you changed…

7 | Quadsk8

October 12th, 2002 at 10:23 am

Avatar

Ok, sorry
Displaying all items was caused by having the wrong include-line, (changed it too much).
I discovered that the not-showing-30-days problem is in the day/month instead month/day.
Because 10 november is showing while 11 october is not…

I translated you KISS-able interface as in this screenshot
by altering to this modified addevent.php (text link).
At last I put the original ShowEvents back to the server. (no succes)
Lawrence

8 | Jennifer

October 12th, 2002 at 8:06 pm

Avatar

Did you modify the code just so it would display the day before the month? (and also different text for months?) – if so – you would only have needed to modify the showevents.php.

To change the order displayed – you would need to do it here where you see this part:
if (strtotime("$str")

Change the above to this:
if (strtotime("$str")

to change the text for the month… towards the beginning – change the only the names here:

if ($listline[0] == "01") {
$month = "January";
} else if ($listline[0] == "02") {
$month = "February";
} else if ($listline[0] == "03") {
$month = "March";
} else if ($listline[0] == "04") {
$month = "April";
} else if ($listline[0] == "05") {
$month = "May";
} else if ($listline[0] == "06") {
$month = "June";
} else if ($listline[0] == "07") {
$month = "July";
} else if ($listline[0] == "08") {
$month = "August";
} else if ($listline[0] == "09") {
$month = "September";
} else if ($listline[0] == "10") {
$month = "October";
} else if ($listline[0] == "11") {
$month = "November";
} else if ($listline[0] == "12") {
$month = "December";
}

9 | Jennifer

October 12th, 2002 at 8:07 pm

Avatar

I should add – if you wanted the names of the months to display properly in the addevent.php page – make sure you don't change the VALUE in the option tag…

10 | Carla

October 14th, 2002 at 5:17 pm

Avatar

Is it possible to add email notification of the script? I'm looking for a good reminder script and seems this one's almost there.

11 | laura

October 19th, 2002 at 10:44 pm

Avatar

i can't seem to get the events to show on my page. i can add an event just fine, and i have checked all the other files, and they list the events also, they just won't chow up on my page. any suggestions? the include on the main page looks like this:

<?
include '/home/laura/public_html/events/showevents.php';
?>

and it's also chmod'ed correctly.

12 | Dennis

October 24th, 2002 at 12:19 pm

Avatar

I am having the same troubles Laura is having. It will show up though when I use showall.php instead, but I really don't want to.

Any suggestions?

13 | Jennifer

October 24th, 2002 at 12:25 pm

Avatar

I had emailed Laura on the side… are you using ".php" as the extension in your page? If not, did you set your site to process html pages like php? (there's an explanation, or a link to an explanation somewhere on this site…)

14 | Dennis

October 24th, 2002 at 12:46 pm

Avatar

The index file does not have the .php extension, but my site can process html as php. I don't know what's up…

15 | Toni

October 26th, 2002 at 12:55 am

Avatar

It works! But only when the file displaying the events is in the same directory as the other files. What have I done wrong?

16 | Jennifer

October 26th, 2002 at 7:45 am

Avatar

Toni – you've done nothing wrong – those files have to be in the same directory.

17 | Quadsk8

October 26th, 2002 at 9:30 am

Avatar

Jennifer,

Thank you for your long comment above with date changes to European format. I finally got your script working my way by swapping *all* day and month variables and values…
(And filled in already over 30 birthdays of skaters joining our skateclass)

The only thing is that in the SHOWALL.PHP you do a sort($list), and this now sorts in a strange order on date instead of month. Would you have a suggestion to sort on month (is now index[1], maybe after the list is exploded)?

Lawrence

19 | Linda Dunn

November 27th, 2002 at 3:03 am

Avatar

I ran across this script in an ongoing search.

I know enough scripting to get things installed and tweaked pretty well (like Movable Type, Mojo Mail, etc.) After that, I pretty much revert to mouth breathing.

SO….I am hoping someone can help me with this — I have a music site for my band, and what I would ideally love to do is have one page that has all our upcoming gigs listed, and then a box on the home page that has the next five upcoming concerts listed.

This events script looks perfect for this(almost…). The only mod I am trying to do is, instead of it always showing the next x number of days (and the corresponding events, if any), I want it to display the next x number of days which have events (i.e. the next five concert dates).

It looks like a mod of this little script is the solution I need, rather than these gigantic calendar scripts I keep running across.

Is this do-able? Or, because of my scripting ignorance, have I done something akin to asking, "Well, yes, this Simpsons Watch from Burger King is perfect for my needs, but can I modify it to also show me different timezones, and remind me of important holidays!?"

In other words, is the KISS method not going to work for what I need in a PHP script?

20 | Quadsk8

January 1st, 2003 at 11:50 am

Avatar

Just found a little Bug (probably causing the top comment remark) All links are styled white in the Body tag, so if you put a mailto or site href around the name of the Birthday-person/event it will be displayed by showall.php as white on white background. Easy when you know it, but I could not understand why the names did not display.

Lawrence

21 | Kristal

January 26th, 2003 at 8:18 pm

Avatar

is there a way to make the script display the current day's event? for example, I have a birthday set on January 26, but the script is showing all events after January 26.

22 | Jennifer

January 26th, 2003 at 9:23 pm

Avatar

Just playing around with it now, and I was able to get it to show the current date by changing this line (do a search in showevents.php):

$str2 = $listline[1]." ".$month." ".$year;

to this:

$str2 = $listline[1]." ".$month." ".$year." 11:59:59 pm";

However, for some reason it showed it out of sequence… If I have time, I'll play with it some more, but can't guarantee it… :-\

23 | Kristal

January 26th, 2003 at 11:33 pm

Avatar

thanks for trying! :) I appreciate it… I'm not extremely good with PHP yet, so I can't figure this out on my own, heh.

how about making it show everything for the current month, maybe? is there an easy way to make it do that?

24 | Lunarum

February 26th, 2003 at 3:30 am

Avatar

Hey Jennifer,

I'm having the same problem as Kristal with your script. The dates of events don't show on the date of the event itself. I was wondering how your "playing" (with the script off course) was getting along? I really would want this to work! Thanx anyway for this simple yet very handy script!

Lunarum

25 | Greg

April 23rd, 2003 at 11:58 pm

Avatar

I am trying to figure out how to add that "next 10 results" function to a simple url search that uses an indexed .txt file as its database. The script is very short, it has a built in indexer that writes to a .txt file. The script can be found at "http://www.technotrade.com/cgi/urlsrch.txt"
A sample of the search/indexer in action can be found at
"http://www.technotrade.com/cgi/urlsrch.html"
I am new to cgi scripts and stuff and have been stuck on this for a long time…so if anyone here could help me out…even with some advice….it would be greatly appreciated, thanks for your time.
-Greg

26 | troutkiller

July 5th, 2003 at 10:26 am

Avatar

Okay… first, let me say THANKS for this very simple solution to what seems to be something a lot of people are looking for and all we find is overkill.

Now the question: I'm trying to put the files in a secure password protected folder (events) and have my index page call the results from that folder with an include. Everything worked before adding the password protection for the directory. Is there an easy way to keep the event list secure?

27 | Nick Sabine

December 4th, 2003 at 10:42 am

Avatar

the easiest way to delete entries or fix errors that I have found is just to directly edit the file. just be careful not to mess up the file format!

to edit the events file, put the following code in a new file, edit.php

— start edit.php –

<html>
<head>
</head>
<body>
<?php
$filename="file/eventlist.php";
if ($_POST["update"] == "yes") {
$new_text = preg_replace("(\\\\\\\\)", "", $text);
$file = fopen($filename, "w");
fputs($file, $new_text);
fclose($file);
}
?>

<FORM METHOD="post" ACTION="<?=$PHP_SELF; ?>">
<INPUT TYPE=hidden NAME="update" VALUE="yes">
<TEXTAREA NAME="text" COLS="80" ROWS="40">
<?
include "$filename";
?>
</TEXTAREA>
<P>
<INPUT TYPE=submit VALUE="Update Text">
</FORM>
</body>
</html>

— end edit.php –

hope that helps!
-Nick

28 | Allison

January 17th, 2004 at 8:52 pm

Avatar

This is my first time experimenting with scripts. Everything went well, except when I try click "Submit" to add an event, this message is in the header after submitting:

Warning: fopen(/mydomain/public_html/sjwc/events/list//eventlist.php): failed to open stream: No such file or directory in /home/mydomain/public_html/sjwc/events/list/addevent.php on line 4

Warning: fwrite(): supplied argument is not a valid stream resource in /home/mydomain/public_html/sjwc/events/list/addevent.php on line 5

Warning: fclose(): supplied argument is not a valid stream resource in /home/mydomain/public_html/sjwc/events/list/addevent.php on line 6

Of course, "mydomain" is correct in my page. The only modifications to the code where the ones suggested. Please advise!

29 | Jennifer

January 17th, 2004 at 10:25 pm

Avatar

Judging by the error, I'm guessing you have a path set to:
/mydomain/public_html/sjwc/events/etc. etc.
when it should be:
/home/mydomain/public_html/sjwc/events/etc. etc.

30 | Gareth Goddard

February 9th, 2004 at 7:08 am

Avatar

Hello,

I was wondering whether anyone knows were to get the code for sending a 'Virtual Kiss' from a website page to someone that is a member of that site like they do on some dating sites.

I have looked for weeks and can't find anything at all.

Gareth

31 | Joe

March 21st, 2004 at 12:58 pm

Avatar

I spent an hour and couldn't get it to work. :-( No problem with bulletin boards, and I've even used php to make an order tracking app for my old emplyer. Don't know what I'm missing, but it ain't there.

Joe

32 | Big Pink Cookie

October 8th, 2002 at 9:35 am

Avatar

Like a Belated Birthday Present…
I asked Jennifer and Kristine a few weeks ago if they knew of a slick way to automate my birthday

33 | Big Pink Cookie

October 14th, 2002 at 1:34 am

Avatar

How Did I Forget…
I forgot to mention that I need to install the latest & greatest Event Script to my blog too! Eek!

34 | Big Pink Cookie

October 19th, 2002 at 3:41 pm

Avatar

Sooooo Good!
I just have to say thank you to Jason! Now you can set up your Blogroll to display a partial

35 | Bloggie Broad

December 3rd, 2003 at 2:09 am

Avatar

Bloggie Scripty Fun
I like to keep an up-to-date listing of all the scripts I've implemented for my own reference, so here's a reverb for moi (plugins aren't…

36 | Bloggie Broad

December 4th, 2003 at 1:29 am

Avatar

Introducing the all-new, *improved* Bloggie Broad!
I added a bunch of new scripts and features over the past couple of days….among them: The Referrals, courtesy of Textism Sidebar Scripts: Pull-down menus…

37 | Gavin

September 30th, 2004 at 4:44 am

Avatar

Hello ,
I am getting this error when I try to add an event.

Warning: fopen("/eventlist.php", "a+") – Permission denied in /data/virtualdomains/110/hornbag.net/documents/event/addevent.php on line 4

Warning: Supplied argument is not a valid File-Handle resource in /data/virtualdomains/110/hornbag.net/documents/event/addevent.php on line 5

Warning: Supplied argument is not a valid File-Handle resource in /data/virtualdomains/110/hornbag.net/documents/event/addevent.php on line 6

I have had no luck so far.
Many thanks!

38 | Jennifer

September 30th, 2004 at 7:43 am

Avatar

Gavin – "Permission denied" type errors usually indicate that the file wasn't chmod correctly… It's been a LONG time since I reviewed this script – but if it mentions anything about chmod-ing – check that again. From your error – you'll want to check the permissiong on "eventlist.php" specifically.

39 | Gavin

September 30th, 2004 at 10:12 am

Avatar

Hi!
Thanks for the prompt response! I'm still getting an error however this time it's…

Warning: fopen("/documents/events/eventlist.php", "a+") – No such file or directory in /data/virtualdomains/110/hornbag.net/documents/events/addevent.php on line 4

Warning: Supplied argument is not a valid File-Handle resource in /data/virtualdomains/110/hornbag.net/documents/events/addevent.php on line 5

Warning: Supplied argument is not a valid File-Handle resource in /data/virtualdomains/110/hornbag.net/documents/events/addevent.php on line 6

Do I need to create eventslist.php ? If so is there any script I need to put in it?
Many thanks again!

40 | Jennifer

September 30th, 2004 at 10:31 am

Avatar

Gavin – pay close attention to those errors. They give a lot away.

Look at the first error… it's talking about a file with this path:
"/documents/events/eventlist.php"
Saying it doesn't exist – and then it gives you the path for what it's looking for:
"/data/virtualdomains/110/hornbag.net/documents/events/addevent.php"
1) Check that your paths are the full server path, which based on your error, probably needs to include that "/data/virtualdomains/110/hornbag.net/" part…
2)make sure the directory "events" is CHMOD 777

41 | Gavin

September 30th, 2004 at 10:56 am

Avatar

Thank you so so so so so much! I am such an idiot!
This is a great script and I thank you for your great work and great support for dummies!
Well done!

42 | Gavin

October 4th, 2004 at 4:27 am

Avatar

Hello me again!
Sorry to bother, I am trying to figure out where in the script (also which script) am I able to make the date in the listed events 'bold'. At present it's looking a little cluttered and having the date of the event bold would help very much.
I know you can do it when you add an event manually but was wondering if it was possible to make it default.
Many Thanks Again!

43 | Gavin

October 6th, 2004 at 8:27 am

Avatar

Hi just wondering if anyone was able to help with the making of the dates bold automatically?
Sorry to be a bother I just cannot work it out.

44 | Jennifer

October 6th, 2004 at 8:47 pm

Avatar

Gavin – I've updated the script. Download it again and then, to "upgrade" just copy over showevent.php (completely replace your version) and copy over eventconfig.php (first you'll have to go in there are set your settings again). Those are the only two files that have really changed…

45 | Gavin

October 7th, 2004 at 3:43 am

Avatar

Hello , Where do I download the script?
I downloaded the file above however no change was noticed. It also said the files were from 2002.
Can you please provide a link to the new version of the event script?
I am ever so sorry to bother you again.

46 | Jennifer

October 7th, 2004 at 7:41 am

Avatar

Gavin – the link is the same. Perhaps you already have a copy of the zip in the same place you're trying to download it to – and it's not replacing it? I just tested it just now – and the download works fine…

47 | Gavin

October 7th, 2004 at 9:46 am

Avatar

Bummer! I must be doing something wrong.
Check out http://www.hornbag.net and you can still see the dates are not in bold.
I'm so sorry to bother you but I would really like the dates bold and my site would be complete!
Thanks again for putting up with me!

48 | Yoke

October 28th, 2004 at 3:50 pm

Avatar

Hi,

I think ur script is great but I can't seems to get it work. I've just copied the entire file over and CHOMD the file to 777. I didn't change anything but still I get this:

Warning: fopen(/HOME/PATH/TO/YOUR/LIST//eventlist.php): failed to open stream: No such file or directory in /home/www/rapturez/z02-clique/00rz/eventlist/addevent.php on line 4

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/rapturez/z02-clique/00rz/eventlist/addevent.php on line 5

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/rapturez/z02-clique/00rz/eventlist/addevent.php on line 6

hope you can help. Thanks heaps.

49 | beth

November 10th, 2004 at 5:36 am

Avatar

oh dear, I have finally figured out the full path and the errors on my page have stopped appearing, but now there is nothing showing up at all. I have entered and event, but I have nada!
:-(

50 | Peter van Breda

April 2nd, 2005 at 5:44 am

Avatar

Hi there. I've noticed that this post started a long time ago and that the last post is from last year. I still hope that someone will read this.

Here's my problem.
I've created a folder and put all the .php files in it. I've changed the folder to CHMOD 777. The .php files are still in CHMOD 644.

After that i've changed the path in the eventconfig.php file to
$listLocation = "/home/u5/petervanbreda/html/events";

I've also tried to add a slash at the end and even extended the path to the eventlist.

Whatever I try, the events I want to add won't show up in my list. This script will be a GREAT benefit for my my website, so please help me out!

Thanks!

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements