Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Mutt Mutt is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-17-2002 Last Update: Never Installs: 15
 
No support by the author.

Here's something quick and easy. I haven't been contributing lately but this was so easy and so cool, I figured I better share.

I wanted to be able to enter calendar events once which happen every year like Christmas and have them show up year after year.


edit template - calendar_enterevent

find
<option value="2004" $year2004selected>2004</option>

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") {
$testyeardate("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.

Comments
  #22  
Old 04-27-2002, 04:47 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cant get this to work.
Reply With Quote
  #23  
Old 04-27-2002, 04:56 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had to use the year 1900. mysql had added the date 2000 instead of 0000 when I looked at the tables.
Reply With Quote
  #24  
Old 05-01-2002, 01:25 AM
mvigod mvigod is offline
 
Join Date: Dec 2001
Location: Jersey
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

date spanning of an event would be cool..either single event with span or recurring...bummer if you have to add a 7 day event and do one at a time!
Reply With Quote
  #25  
Old 05-17-2002, 10:07 PM
mikesatx mikesatx is offline
 
Join Date: May 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

mike-anderson@houston.rr.com
Reply With Quote
  #26  
Old 05-17-2002, 10:21 PM
mikesatx mikesatx is offline
 
Join Date: May 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hear vb3 will have this option. Is this true? When is vb3 scheduled to be released?
Reply With Quote
  #27  
Old 11-22-2002, 10:10 PM
Esdee's Avatar
Esdee Esdee is offline
 
Join Date: Oct 2002
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack.
But I'm also looking for that hack Lionel was speaking of and can it be combined with this one ?
Reply With Quote
  #28  
Old 01-20-2003, 08:05 AM
T&H T&H is offline
 
Join Date: Jan 2003
Location: London
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?

A hack would be greatly appreciated.

T&H
Reply With Quote
  #29  
Old 01-20-2003, 09:34 PM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #30  
Old 01-30-2003, 08:16 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #31  
Old 04-03-2003, 03:55 PM
ryancooper ryancooper is offline
 
Join Date: Jul 2002
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't find <option value="2004" $year2004selected>2004</option> in my calendar_enterevent
I am runing 2.3.0

Any ideas. . .
Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:28 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04570 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete