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
  #32  
Old 08-07-2003, 03:13 PM
Zannie Zannie is offline
 
Join Date: Jul 2003
Location: My Little Cottage in VA
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way I can modify this to allow for recurring weekly and daily events?
Reply With Quote
  #33  
Old 09-20-2003, 04:20 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could somebody just make a .txt file with a working version for 2.3 or maybe even 3.0? Thanks
Reply With Quote
  #34  
Old 11-22-2003, 10:46 AM
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Location: TX
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am checking into this now gmairk
Reply With Quote
  #35  
Old 11-22-2003, 12:56 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would be great to make a predefined list of dates of birthdays of my friends, so that vB takes one photo from my, for example, PhotoPost picture DB and sends it as an e-card, so, if I forget to congratulate them, atleast a few lines would be sent.
Reply With Quote
  #36  
Old 03-30-2004, 01:59 AM
JustAskJulie JustAskJulie is offline
 
Join Date: Nov 2002
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this hack allow for weekly or monthly repeat events? or is there another hack available?
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 11:27 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04777 seconds
  • Memory Usage 2,265KB
  • Queries Executed 22 (?)
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
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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