Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #12  
Old 01-25-2002, 03:37 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Mutt

Now re-occuring events will show un on the getday page
No it does not. Like today 1/25 I have an event on homepage. I selected every year after applying the fix, it stopped showing. Do you have 0000 defines as every year somewhere?

I did like Kevin suggested and yours too (the two posts above this one). I am a little confuse with the 1900 from Kevin and 0000 in yours.

Anyway, I can't get an every year event to show. Any suggestions because this a great time saver hack?
Reply With Quote
  #13  
Old 01-25-2002, 03:51 PM
KevinG KevinG is offline
 
Join Date: Dec 2001
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry Lionel,

I think I confused some here with what I posted. I actually made my own hack to get events and birthdays to display on a non-vb page (homepage). It is a hack of a hack. The original hack was for the displaying of news (pluhnews I believe. Can't remember but thank you to the hacker for this) on a non-vb page.

Using that hack, I made my own for displaying four more things on my homepage;
  • Today's Birthdays
  • Upcoming Birthdays
  • Today's Events
  • Upcoming Events

In my version of the hack, I use 1900 as the year for storing recurring events. I had problems saving years that were 0000. That is the only difference with mine. Any year should work as long as you are consistant in all areas that are looking for recurring events.

If you can post what you have for displaying your events on a non-vb page, I can try to help you sort out the problem.

Kevin
Reply With Quote
  #14  
Old 01-25-2002, 03:59 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am actually using the todaysevents.php hack to display on a vb page, under birthdaybits. I then installed re-occuring events. Problem is when I select that option, it is no longer displaying todays events on forumhome as, I assume, it gets confused with the year. It shows in calendar but not in index page.
Reply With Quote
  #15  
Old 01-25-2002, 04:32 PM
KevinG KevinG is offline
 
Join Date: Dec 2001
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lionel,

Can you upload that file here?
I can look it over to see what the problem is.

Thanks,
Kevin
Reply With Quote
  #16  
Old 01-25-2002, 04:37 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! PM me your email. They don't like for us to display vb codes on forums. I'll send you a zip.
Reply With Quote
  #17  
Old 01-28-2002, 12:45 AM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this DOES work!
everything in the calendar script has been attended to so that re-occuring events will show up every year.

Lionel
you are talking about a seperate hack which displays calendar events on the main forum page. that will have to be modified just like the caledar script was modifed. I don't have that hack installed so I don't know exactly what will be change. I can tell you that it will be very similar to these changes that I've posted. if you would post the code that gets the events for your main forum page, I could tell you how to modify it.
Reply With Quote
  #18  
Old 01-28-2002, 12:57 AM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

New Year's Day: January 1
Groundhog Day: February 2
Mardi Gras: Tuesday, February 12
Ash Wednesday: Wednesday, February 13
Valentine's Day: February 14
President's Day: Monday, February 18
St. Patrick's Day: March 17
Passover (Begins at Sundown*): March 27
Easter: Sunday, March 31
April Fool's Day: April 1
Earth Day: April 22
Cinco de Mayo: May 5
National Teacher's Day: May 7
Mother's Day: Sunday, May 12
Memorial Day: Monday, May 27
Flag Day: June 14
Father's Day: Sunday, June 16
Gay Pride Day: Sunday, June 30
US Independence Day: July 4
Labor Day: Monday, September 2
Rosh Hashanah (Begins at Sundown*): September 6
Grandparents Day: September 8
Yom Kippur (Begins at Sundown*): September 15
Columbus Day: October 14
Boss' Day: October 16
Halloween: October 31
US Election Day: Tuesday, November 5
Veterans Day: November 11
Thanksgiving Day (US): Thursday, November 28
Chanukah (Begins at Sundown*): November 29
Christmas Day: December 25
Kwanzaa: December 26


doesn't seem like much and several are different every year because of the day of te week. Got em here
http://www.holidays.net/dates.htm
Reply With Quote
  #19  
Old 02-21-2002, 03:48 AM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need something like this but instead of every year, how about x amount of days? Like a convention is May 1-7. Currently you would have to enter each day....
Reply With Quote
  #20  
Old 04-25-2002, 04:40 PM
Tungsten's Avatar
Tungsten Tungsten is offline
 
Join Date: Jan 2002
Location: Nashville, TN
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmmm. How would one tweak the code for this hack so that recurring events could be set for specific days of the week with a starting and ending date?

Example: every Tuesday from April 2nd, 2002 through March 30, 2003 I want the same event to be listed on the calendar.

Thoughts?
Reply With Quote
  #21  
Old 04-25-2002, 09:23 PM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default


funny, I wanted both of these options. My calendar is so hacked at this point, I stopped playing with it before it got too different from the original

not sure how to handle either, but I'll put some thought into it again.

re-occuring day of week with date range
ex 1 - every monday may to aug
ex 2 - second thurs of the month, every month

one event span multiple days
Reply With Quote
Reply

Thread Tools

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 12:44 AM.


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.10119 seconds
  • Memory Usage 2,315KB
  • 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)bbcode_quote
  • (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