Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: CiQ on May 02, 2010, 03:11:23 AM

Title: Repeating Events for Calendar
Post by: CiQ on May 02, 2010, 03:11:23 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2520)

Repeating Events for Calendar 1.0

This is a SMF mod that will add repeating events and the Moon Phases to your calendar. It will also allow you to force a specific board for events that are linked to a posting.

To turn on/off the event posting control, go to Admin|Calendar and look for Force default board in events.
Click this option to force event posts to go to the default board.

To turn the display of the Moon Phases on/off, go to Admin|Calendar and scroll to the bottom of the list:

Display Moon phases: Turns the display of the Moon Phases on/off
Moon Phase text color: The color of the text used to display the Moon Phase info.

! This is recoded "Repeating Events for Calendar by Chris Curran" mod (http://custom.simplemachines.org/mods/index.php?mod=655). !

Enjoy!

[email protected]
Title: Re: Repeating Events for Calendar
Post by: CiQ on May 02, 2010, 03:56:19 AM
This mod request calendar module in php. if your php was compiled without calendar module you can add this code:
function gregorianToJD($month, $day, $year)
{
if($month < 3)
{
$month = $month + 12;
$year = $year - 1;
}

$jd = $day + floor((153 * $month - 457) / 5) + 365 * $year
+ floor($year / 4) - floor($year / 100)
+ floor($year / 400) + 1721118.5;

return($jd);

}

function jdtogregorian($julian) {
$julian = $julian - 1721119;
$calc1 = 4 * $julian - 1;
$year = floor($calc1 / 146097);
$julian = floor($calc1 - 146097 * $year);
$day = floor($julian / 4);
$calc2 = 4 * $day + 3;
$julian = floor($calc2 / 1461);
$day = $calc2 - 1461 * $julian;
$day = floor(($day + 4) / 4);
$calc3 = 5 * $day - 3;
$month = floor($calc3 / 153);
$day = $calc3 - 153 * $month;
$day = floor(($day + 5) / 5);
$year = 100 * $year + $julian;

if ($month < 10) {
$month = $month + 3;
}else{
$month = $month - 9;
$year = $year + 1;
}
if ($day < 10) {
$day = "0".$day;
}
if ($month < 10) {
$month = "0".$month;
}
return $month."/".$day."/".$year;
}

in Sources/Calendar.php before
// Show the calendar.
function CalendarMain()
Title: Re: Repeating Events for Calendar
Post by: doughboy99 on September 12, 2010, 07:49:06 PM
Grfeat job. Is there any chance of getting thid for SMF2?
Title: Re: Repeating Events for Calendar
Post by: Chris Curran on October 14, 2010, 08:16:29 AM
Quote from: doughboy99 on September 12, 2010, 07:49:06 PM
Grfeat job. Is there any chance of getting thid for SMF2?

Not unless someone else does it...
Title: Re: Repeating Events for Calendar
Post by: shin111 on November 22, 2010, 09:28:26 AM
So far I've had no luck getting this mod to work, or the old one, on my 1.1.12 install, or the 1.1.111 install. Don't really have any calendar affecting mods installed either.

The problem is, after the install, both versions of the mod will look like a perfect install, reporting no problems, but when you get to edit an event, the new text for the new functions does not show up.

The new bullets and drop down menus will show, though with nothing in them, and no text. It's not white on white text either, can't highlight it.

No matter what I do I can't get repeating holidays every year on my calendar.  :(
Title: Re: Repeating Events for Calendar
Post by: jellie on February 08, 2011, 06:14:40 PM
Works fine for me, all the text shows up where it should be :)
Title: Re: Repeating Events for Calendar
Post by: ohiovibe on May 16, 2011, 02:34:08 AM
I run a website that lists all electronic music events in Columbus, OH at http://ohioVibe.net/   It's almost imperative to have repeating events in the calendar, but I'm forced to create an event for each week the event takes place.  I'm new to forum administration and PHP is really out of my scope of knowledge!  Since I'm running SMF 2.0 RC4, I would really like to help support the development of a repeating event mod for my version of SMF.  I'm sure many others would benefit from this as well.  I'd appreciate any guidance or direction in finding those who can either update code for SMF 2.0 or create a new one altogether.  Thanks!

~Mike
http://ohiovibe.net/
Title: Re: Repeating Events for Calendar
Post by: T3CHN0 on February 04, 2014, 05:04:56 AM
Will this mod work for me in 2.0.7?
I want to set dates to repeat in the calendar but there is no option for it in 2.0.7.
Title: Re: Repeating Events for Calendar
Post by: NekoJonez on February 04, 2014, 06:35:27 PM
Quote from: T3CHN0 on February 04, 2014, 05:04:56 AM
Will this mod work for me in 2.0.7?
I want to set dates to repeat in the calendar but there is no option for it in 2.0.7.
From what I can gather: no.

Since this is for the v1 series.
Title: Re: Repeating Events for Calendar
Post by: Kindred on February 05, 2014, 12:50:41 AM
guaranteed no.
Title: Re: Repeating Events for Calendar
Post by: NekoJonez on February 05, 2014, 06:37:34 AM
Is there a mod or a feature that adds this to 2.0.7?
Title: Re: Repeating Events for Calendar
Post by: T3CHN0 on February 05, 2014, 07:25:56 AM
I found this. Not perfect but better then nothing.
It will work for what I need

http://www.simplemachines.org/community/index.php?topic=474940.msg3320917#msg3320917
Title: Re: Repeating Events for Calendar
Post by: Nomadikhan on March 09, 2014, 03:52:50 PM
Is there a chance someone would create a mod for this again?  I know it's not super popular but it's quite handy for those that use it.  I'm not sure who or where to ask about something like this.
Title: Re: Repeating Events for Calendar
Post by: Kindred on March 09, 2014, 03:59:56 PM
So---   in an effort to "sneak" around the bumping rules, you instead, deleted your previous post and entered the exact same thing with a new date.  Uncool behavior. Don't do it again, or you will be put on post moderation.

Since no one is responding, I would assume that the answer is no, at this time.
Title: Re: Repeating Events for Calendar
Post by: Nomadikhan on March 10, 2014, 09:28:30 PM
Sure, perceive it how you may.  I did it as I personally see single word posts for the sake of bumping as clutter.  It made more sense my way, I'm sorry it's against the rules.  I shan't post here again... save this post :/  Feel free to remove my account.  I tried being polite and this sort of reception, a bully tactic, has me feeling non-welcomed and hesitant to return.  Goodbye.
Title: Re: Repeating Events for Calendar
Post by: Kindred on March 10, 2014, 09:39:24 PM
How is warning you to follow the rules and not spam being a bully?
Title: Re: Repeating Events for Calendar
Post by: T3CHN0 on March 10, 2014, 10:43:21 PM
You have that effect on people Kindrad, you have made me feel bullied by you a few times and I stay away for a while.
I see nothing wrong with his post even if it may have been a copy and past from another topic "I would never had known".
and it's a clean post all the same nothing wrong with it. better then writing BUMP:
Title: Re: Repeating Events for Calendar
Post by: Kindred on March 10, 2014, 11:36:26 PM
It wasn't from another topic...   He posted once. Then a day later, deleted that post and reported the same thing, making it look like a new post.....

As for bullying.  I am blunt. I don't sugar coat things. However, for the most part, I don't think that most folks would see my statements as bullying.  If they do, then they really need to grow a thicker skin if they plan to be on the internet for any length of time....  ;)
Title: Re: Repeating Events for Calendar
Post by: Steve on March 11, 2014, 10:37:38 AM
I'm nobody here but I'm throwing my 2 cents worth in anyway. I have to agree with Kindred. It would have been easy for Nomadikhan to wait a day, then reply with something polite like 'anyone had a chance to look at this yet?' etc. I also agree with the bluntness and thick skin comments.

Can you tell I've been running my own board for going on 12 years now? :P