Calendar

Calendar 6.1

No permission to download

creativeforge

Active member
Hi Andy, my client is looking for a calendar/appointment addon. He gives online music lessons. Can this be used/adapted for that? He installed Widget Framework but we can't see Calendar in the dropdown "renderer" list, only Calendar Plus. However, even that doesn't show up in the Sidebar.

Thanks for any help!

Andre
 

Jim Fox

Member
Hi Andy,

I downloaded the Calendar and installed it and got it working, and it looks great!

But I have one question, when I am looking at the Calendar, it has a button that says "Submit" in the upper left. What does it do? I have clicked on it and nothing happens, I don't see where I can actively type on the calendar when viewing to then Submit something. Please, what am I missing?

Thanks,

Jim
 
this might be stupid to ask, but i have not much clue about these things, but I would like to add the calendar dates from the PWC, WEC races in 2018-2019 to the calendar, do i need to create a thread for each date? and each race?
meaning WEC has 9 events, so i would require to create 9 threads???
thank you all.
 

Attachments

Lukaluk

Member
Hey Guys, I need some help. I have the XenAtendo Events on my Xenforo site, and it has worked for me thus far. However, I really need something that I can make private to specific public user groups. Will this work for me or am I just missing something on the XenAtendo?
 

AndyB

Well-known member
AndyB updated Calendar with a new update entry:

See description

A security issue has been identified in earlier versions of this add-on. The issue allows a cross site scripting (XSS) attack to potentially be triggered via a specially crafted username. XSS issues may allow an attacker to steal data (including cookies) or force a user to take actions without their consent or knowledge (possibly including administrative actions).

I strongly recommend all users to upgrade to the latest version of Calendar v6.1 to resolve the issue as soon as possible.
Read the rest of this update entry...
 

AndyB

Well-known member
Holiday.php for Swedish language

PHP:
<?php

//########################################
// holiday functions
// 0 = sunday
// 1 = monday
// 2 = tuesday
// 3 = wednesday
// 4 = thursday
// 5 = friday
// 6 = saturday
//########################################

function holiday_name($y, $m, $d)
{
    if ($m == 1 && $d == 1)    // jan 1
    return "Nyårsdagen";

    if ($m == 1 && $d == 6)    // jan 6
    return "Trettondag Jul";
    
    if ($m == 5 && $d == 1) // may 1
    return "Första Maj";

    if ($m == 6 && $d == 6) // 6 Juni
    return "Sveriges Nationaldag";

    if ($m == 6 && match_day($y, $m, $d, 5, 4)) // Midsommarafton 4e fredagen i Juni
    return "Midsommarafton";

    if ($m == 6 && match_day($y, $m, $d, 6, 4)) // Midsommardagen 4e lördagen i Juni
    return "Midsommardagen";

    if ($m == 11 && match_day($y, $m, $d, 6, 1)) // 1a lördagen i Nov
    return "Alla helgons dag";

    if ($m == 12 && $d == 24) // dec 24
    return "Julafton";

    if ($m == 12 && $d == 25) // dec 25
    return "Juldagen";

    if ($m == 12 && $d == 26) // dec 26
    return "Annandag Jul";

    if ($m == 12 && $d == 31) // dec 31
    return "Nyårsafton";

    //##########
    // easter
    //##########
    
    if ($y == 2015 && $m == 4 && $d == 3) // easter
    return "Långfredagen";

    if ($y == 2015 && $m == 4 && $d == 5) // easter
    return "Påskdagen";    
    
    if ($y == 2016 && $m == 3 && $d == 25) // easter
    return "Långfredagen";

    if ($y == 2016 && $m == 3 && $d == 27) // easter
    return "Påskdagen";     
    
    if ($y == 2017 && $m == 4 && $d == 14) // easter
    return "Långfredagen";
    
    if ($y == 2017 && $m == 4 && $d == 16) // easter
    return "Påskdagen"; 
    
    if ($y == 2017 && $m == 4 && $d == 17) // easter
    return "Annandag Påsk"; 
    
    if ($y == 2018 && $m == 3 && $d == 30) // easter
    return "Långfredagen";

    if ($y == 2018 && $m == 4 && $d == 1) // easter
    return "På skdagen";

    if ($y == 2018 && $m == 4 && $d == 2) // easter
    return "Annandag Påsk";
    
    if ($y == 2019 && $m == 4 && $d == 19) // easter
    return "Långfredagen";
    
    if ($y == 2019 && $m == 4 && $d == 21) // easter
    return "Påskdagen";

    if ($y == 2019 && $m == 4 && $d == 22) // easter
    return "Annandag Påsk";
        
    if ($y == 2020 && $m == 4 && $d == 10) // easter
    return "Långfredagen";

    if ($y == 2020 && $m == 4 && $d == 12) // easter
    return "Påskdagen";
    
    if ($y == 2020 && $m == 4 && $d == 13) // easter
    return "Annandag Påsk";

    if ($y == 2021 && $m == 4 && $d == 2) // easter
    return "Långfredagen";
    
    if ($y == 2021 && $m == 4 && $d == 4) // easter
    return "Påskdagen";                

    if ($y == 2021 && $m == 4 && $d == 5) // easter
    return "Annandag Påsk";    

    if ($y == 2022 && $m == 4 && $d == 15) // easter
    return "Långfredagen";
    
    if ($y == 2022 && $m == 4 && $d == 17) // easter
    return "Påskdagen";                

    if ($y == 2022 && $m == 4 && $d == 18) // easter
    return "Annandag Påsk";

    if ($y == 2023 && $m == 4 && $d == 7) // easter
    return "Långfredagen";
    
    if ($y == 2023 && $m == 4 && $d == 9) // easter
    return "Påskdagen";                

    if ($y == 2023 && $m == 4 && $d == 10) // easter
    return "Annandag Påsk";

    if ($y == 2024 && $m == 3 && $d == 29) // easter
    return "Långfredagen";
    
    if ($y == 2024 && $m == 3 && $d == 31) // easter
    return "Påskdagen";                

    if ($y == 2024 && $m == 4 && $d == 1) // easter
    return "Annandag Påsk";


    //##########
    // Kalle Flygare
    //##########            

    if ($y == 2016 && $m == 5 && $d == 5) // Kalle Flygare
    return "Kristi Himmelsfärdsdag";    

    if ($y == 2017 && $m == 5 && $d == 25) // Kalle Flygare
    return "Kristi Himmelsfärdsdag";    

    if ($y == 2018 && $m == 5 && $d == 10) // Kalle Flygare
    return "Kristi Himmelsfärdsdag";

    if ($y == 2019 && $m == 5 && $d == 30) // Kalle Flygare
    return "Kristi Himmelsfärdsdag";

    if ($y == 2020 && $m == 5 && $d == 21) // Kalle Flygare
    return "Kristi Himmelsfärdsdag";

    if ($y == 2021 && $m == 5 && $d == 13) // Kalle Flygare
    return "Kristi Himmelsfärdsdag";

    if ($y == 2022 && $m == 5 && $d == 26) // Kalle Flygare
    return "Kristi Himmelsfärdsdag";

    if ($y == 2023 && $m == 5 && $d == 18) // Kalle Flygare
    return "Kristi Himmelsfärdsdag";

    if ($y == 2024 && $m == 5 && $d == 9) // Kalle Flygare
    return "Kristi Himmelsfärdsdag";

    // return empty if no match for holiday
    return; 
}

function match_day($year, $month, $day, $day_of_week, $week='')
{
    if (!$week || ($week == ''))
    {
        $lastday = date('t', mktime(0, 0, 0, $month, 1, $year));
        $temp = (date('w', mktime(0, 0, 0, $month, $lastday, $year)) - $day_of_week) % 7;
    }
    else
    {
        $temp = ($day_of_week - date('w', mktime(0, 0, 0, $month, 1, $year))) % 7;
    }

    if ($temp < 0)
    {
        $temp += 7;
    }

    if (!$week || ($week == ''))
    {
        $target_day = $lastday - $temp;
    }
    else
    {
        $target_day = (7 * $week) - 6 + $temp;
    }

    return ($day == $target_day);
}
 

rfc0001

Well-known member
Hi Andy, I think I found a bug. If you have Upcoming Maximum set to 10, and there are 100 upcoming events, and 2 of the next 10 events are only viewable by Admins, non-admins will only see 8 events (despite there being at least 10 upcoming events). I would expect all users to see the next 10 upcoming events viewable by them.
 

hohleweg

Active member
Holiday.php for German language

Code:
<?php

//########################################
// holiday functions
// 0 = sunday
// 1 = monday
// 2 = tuesday
// 3 = wednesday
// 4 = thursday
// 5 = friday
// 6 = saturday
//########################################

function holiday_name($y, $m, $d)
{
    if ($m == 1 && $d == 1)    // jan 1
    return "Neujahr";
 
    if ($m == 1 && $d == 6)    // jan 6
    return "Heilige 3 K&ouml;nige (BW, BY, ST)";
 
    if ($m == 2 && $d == 14) // feb 14
    return "Valentinstag";
 
    if ($m == 2 && $d == 8) // feb 8
    return "Weiberfastnacht";
 
    if ($m == 2 && $d == 12) // feb 12
    return "Rosenmontag";
 
    if ($m == 2 && $d == 14) // feb 14
    return "Aschermittwoch";
 
    if ($m == 3 && $d == 30) // mar 30
    return "Karfreitag";
 
    if ($m == 4 && $d == 1) // apr 1
    return "Ostersonntag";
 
    if ($m == 4 && $d == 2) // apr 2
    return "Ostermontag";
 
    if ($m == 5 && $d == 1) // may 1
    return "Tag der Arbeit";
 
    if ($m == 5 && match_day($y, $m, $d, 0, 2)) // 2nd sun in may
    return "Muttertag";
 
    if ($m == 5 && $d == 10) // may 10
    return "Christi Himmelfahrt";
 
    if ($m == 5 && $d == 20) // may 20
    return "Pfingstsonntag";
 
    if ($m == 5 && $d == 21) // may 21
    return "Pfingstmontag";
 
    if ($m == 5 && $d == 31) // may 31
    return "Fronleichnam(BW,BY,HE,NW,RP,SL)";
 
    if ($m == 8 && $d == 15) // aug 15
    return "Mari&auml; Himmelfahrt (BY,SL)";
 
    if ($m == 10 && $d == 3) // oct 3
    return "Tag der deutschen Einheit";
 
    if ($m == 10 && $d == 31) // oct 31
    return "Reformationstag (BB,MV,SN,ST,TH)";
 
    if ($m == 11 && $d == 1) // nov 1
    return "Allerheiligen (BW,BY,NW,RP,SL)";
 
    if ($m == 11 && $d == 21) // nov 21
    return "Bu&szlig; und Bettag (SN)";
 
    if ($m == 12 && $d == 2) // dec 2
    return "1. Advent";
 
    if ($m == 12 && $d == 6) // dec 6
    return "Nikolaustag";
 
    if ($m == 12 && $d == 9) // dec 9
    return "2. Advent";
 
    if ($m == 12 && $d == 16) // dec 16
    return "3. Advent";
 
    if ($m == 12 && $d == 23) // dec 23
    return "4. Advent";
 
    if ($m == 12 && $d == 24) // dec 24
    return "Heiligabend";
 
    if ($m == 12 && $d == 25) // dec 25
    return "1. Weihnachtsfeiertag";
 
    if ($m == 12 && $d == 26) // dec 26
    return "2. Weihnachtsfeiertag";

    // return empty if no match for holiday
    return;
}

function match_day($year, $month, $day, $day_of_week, $week='')
{
    if (!$week || ($week == ''))
    {
        $lastday = date('t', mktime(0, 0, 0, $month, 1, $year));
        $temp = (date('w', mktime(0, 0, 0, $month, $lastday, $year)) - $day_of_week) % 7;
    }
    else
    {
        $temp = ($day_of_week - date('w', mktime(0, 0, 0, $month, 1, $year))) % 7;
    }

    if ($temp < 0)
    {
        $temp += 7;
    }

    if (!$week || ($week == ''))
    {
        $target_day = $lastday - $temp;
    }
    else
    {
        $target_day = (7 * $week) - 6 + $temp;
    }

    return ($day == $target_day);
}
     
?>
 

piepo

Member
I am currently using the AddOn Events, which I want to change / migrate it to this addon.

Any importer available ?
 

Joeychgo

Well-known member
Just a comment. I think this would be better if it could be limited to threads in a specific forum and selectable from the thread creation screen.
 
Top