Post by california on Mar 16, 2006 1:27:34 GMT -8
This code allows you to have weekly or monthly recurring events on the calendar. Only the calendar itself is affected. The "Events this Month" table on the main page is not.
Main Footer
<script type="text/javascript">
<!--
/* Weekly or Monthly Recurring Calendar Events by california
©2006 SoCal Codes, socal.proboards26.com */
var weeklyArr = []; function addWeeklyEvent(title, id, day){weeklyArr.push(new Array(title, id, day));}
var monthlyArr = []; function addMonthlyEvent(title, id, date){monthlyArr.push(new Array(title, id, date));}
// Add Events Here
addWeeklyEvent("Name Of Event", "Event ID", "Week Day");
addWeeklyEvent("Friday Chatsession", "1234567890", "Friday");
addMonthlyEvent("Name Of Event", "Event ID", "Month Day");
addMonthlyEvent("Monthly Gettogether", "9876543210", "2nd Sunday");
addMonthly Event("MOTM Announcements", "1122334455", "12");
document.write('<script type="text/javascript" src="http://iycatacombs.com/socal/resources/scripts/recurringevents.js"></scr'+'ipt>');
// -->
</script>
Main Footer
You can have both weekly and monthly events. The first thing you must do to create a recurring event is to create an event (post) on your calendar the normal way. The date you choose for this doesn't matter much, but let's say it's a weekly event every Monday, it'd make sense obviously if you chose a Monday to post the event on. It just doesn't matter which Monday.
Once you've made the post on your calendar, take a look at the URL of the post. The end of it should say '&thread=#########'. Take note of the ten-digit number indicated in the URL -- that is the ID of the event.
Now to make the event recurring, add a new line in the code like the examples I've given. Let's say it's a weekly event every Monday. Add a line in the code:
addWeeklyEvent("Event Title", "Event ID", "Monday");
Event Title - this is self-explanatory. Use whatever subject/title you used when you created the event.
Event ID - this is the ten-digit number you took note of.
Monday - self-explanatory again. It isn't very strict. "monday" or "mon" will work too.
With monthly events, it is basically the same:
addMonthlyEvent("Event Title", "Event ID", "Day of Month");
Event Title and Event ID are exactly the same as with weekly events.
Day of Month - this determines what day of each month the event shows up on. You have two options here. You can use a number between 1-31, if your event falls on the same date every month (i.e. the 12th of every month), or you can use a description like "2nd Tuesday", "4th Sunday", "1st Thursday", etc. Again this isn't very strict. You can get away with "2 sun" for "2nd Sunday" for example. Unfortunately there is no "Last Sunday" or "Last day of the month" option at this time. When/if I ever feel like adding that functionality, I will. No need to ask.
Once you've added that line you should see the event appear every week or month on your calendar. You can add as many weekly or monthly events as you like by adding more lines. The order is not particularly important. If you need support, post in Code Support, please don't PM me.
Main Footer
<script type="text/javascript">
<!--
/* Weekly or Monthly Recurring Calendar Events by california
©2006 SoCal Codes, socal.proboards26.com */
var weeklyArr = []; function addWeeklyEvent(title, id, day){weeklyArr.push(new Array(title, id, day));}
var monthlyArr = []; function addMonthlyEvent(title, id, date){monthlyArr.push(new Array(title, id, date));}
// Add Events Here
addWeeklyEvent("Name Of Event", "Event ID", "Week Day");
addWeeklyEvent("Friday Chatsession", "1234567890", "Friday");
addMonthlyEvent("Name Of Event", "Event ID", "Month Day");
addMonthlyEvent("Monthly Gettogether", "9876543210", "2nd Sunday");
addMonthly Event("MOTM Announcements", "1122334455", "12");
document.write('<script type="text/javascript" src="http:/
// -->
</script>
Main Footer
You can have both weekly and monthly events. The first thing you must do to create a recurring event is to create an event (post) on your calendar the normal way. The date you choose for this doesn't matter much, but let's say it's a weekly event every Monday, it'd make sense obviously if you chose a Monday to post the event on. It just doesn't matter which Monday.
Once you've made the post on your calendar, take a look at the URL of the post. The end of it should say '&thread=#########'. Take note of the ten-digit number indicated in the URL -- that is the ID of the event.
Now to make the event recurring, add a new line in the code like the examples I've given. Let's say it's a weekly event every Monday. Add a line in the code:
addWeeklyEvent("Event Title", "Event ID", "Monday");
Event Title - this is self-explanatory. Use whatever subject/title you used when you created the event.
Event ID - this is the ten-digit number you took note of.
Monday - self-explanatory again. It isn't very strict. "monday" or "mon" will work too.
With monthly events, it is basically the same:
addMonthlyEvent("Event Title", "Event ID", "Day of Month");
Event Title and Event ID are exactly the same as with weekly events.
Day of Month - this determines what day of each month the event shows up on. You have two options here. You can use a number between 1-31, if your event falls on the same date every month (i.e. the 12th of every month), or you can use a description like "2nd Tuesday", "4th Sunday", "1st Thursday", etc. Again this isn't very strict. You can get away with "2 sun" for "2nd Sunday" for example. Unfortunately there is no "Last Sunday" or "Last day of the month" option at this time. When/if I ever feel like adding that functionality, I will. No need to ask.
Once you've added that line you should see the event appear every week or month on your calendar. You can add as many weekly or monthly events as you like by adding more lines. The order is not particularly important. If you need support, post in Code Support, please don't PM me.