right after it add
<option value="0000" $year0000selected>every year</option>
edit calendar.php
find in (action==display)
PHP Code:
WHERE eventdate
LIKE '$year-$doublemonth-%' AND ((userid = '$bbuserinfo[userid]' AND public = 0) OR (public = 1))");
and replace it with
PHP Code:
WHERE (eventdate LIKE '$year-$doublemonth-%' OR eventdate LIKE '0000-$doublemonth-%') AND ((userid = '$bbuserinfo[userid]' AND public = 0) OR (public = 1))");
find in (action==update)
PHP Code:
if (!checkdate($month,$day,$year))
replace it with
PHP Code:
if ($year=="0000") {
$testyear= date("Y");
} else {
$testyear=$year;
}
if (!checkdate($month,$day,$testyear))
jump to ($action == "getday")
under
PHP Code:
$eventdate = explode("-",$info[eventdate]);
add
PHP Code:
if ($eventdate[0]=="0000") {
$eventdate[0]=$year;
}
thats it. Now enter a calendar event and when you pick the year, choose the new option 'every year'. the event will show up this year, next year, the year after. hell it will even show up last year.
I just did it and haven't tested it really well, but it sure looks like it works. let me know what ya think
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I am willing to pay anyone who can come up with this hack! Just let me know your fee. The sooner the better! I need a reoccurring event option for events spanning several days and events that occur once a week, month or year. An ingenious example of this done in cgi script is at http://www.perlcal.com/calenda2.htm. Logon as biff, password: demo. Hit the update button and add a new event. The calendar is not pretty but the reoccurring event function is a good idea. Please contact me as soon as possible if you have developed a hack for vbulletin and want a donation for your efforts.
Although this hack appears to be for re-curring annual events, is there a hack for adding an autodate feature so that a re-curring event can be inserted into the calender on numerous dates and months throughout the year?
T&H - I'm not really sure what you are looking for.
Wow, I did this so long ago. I was looking at vb3 and it looks like it has alot of similar calendar hacks to mine. At this point, you should just wait for vb3. shouldn't it be out soon.
I currently have multiple day events, anniversaries (re-occurring annual events), & event categories. You can also link a thread to an event, by adding it's threadid. You can display the calendar in monthly calendar view or event view which just lists the events with full descriptions.
I never added re-occurring monthly events, but I'll do it this time.
When I upgrade to vb3, anything that isn't in the new calendar, I'll write up a new hack. I've been slacking off on posting hacks because I'm too far from the original code by now and it gets confusing to write instructions. vb3 will give me a new starting point.
I too need more calendar functionality.. and I don't think we can wait for vb3 to come out (my guess is they won't have a public beta for many months, if even this half of the year based on how things have gone thus far)
We need recurring capabilities. Every month, every week, perhaps even every other week.
It would be cool if someone could get recurring to meet just about any need. Shouldn't it be a matter of math?
What we're trying to do is set up racing events, meetings etc. all that have various recurring themes.