Plugin Directory

Changeset 784158


Ignore:
Timestamp:
10/07/2013 07:54:45 PM (12 years ago)
Author:
barclay_reg
Message:

taging version 1.5.1

Location:
ical-for-wp-calendar
Files:
2 edited
4 copied

Legend:

Unmodified
Added
Removed
  • ical-for-wp-calendar/tags/1.5.1/ical-wp-calendar.php

    r727161 r784158  
    3333define("ICAL_WP_CALENDAR_QUERY_VARIABLE", "wp-calendar-ical");
    3434define("ICAL_WP_CALENDAR_QUERY_PARAMETER_CATEGORY", "category");
    35 
     35define("ICAL_WP_CALENDAR_QUERY_PARAMETER_EVENTID", "event_id");
    3636
    3737
     
    8383        $category_parameter = $_GET[ICAL_WP_CALENDAR_QUERY_PARAMETER_CATEGORY];
    8484    }
     85
     86    if (isset($_GET[ICAL_WP_CALENDAR_QUERY_PARAMETER_EVENTID]))
     87    {
     88        $single_event_parameter = $_GET[ICAL_WP_CALENDAR_QUERY_PARAMETER_EVENTID];
     89    }
    8590   
    8691    if ( !function_exists('fse_get_events') )
     
    9499       
    95100        $options = get_option("ical-wp-calendar-options");
    96        
    97         if (!is_null($options) && !is_null($options['ical-wp-calendar-history-length-months']))
     101
     102        if (isset($single_event_parameter))
    98103        {
    99             $historyLengthMonths = $options['ical-wp-calendar-history-length-months'];         
    100             $limitDate = strtotime("-" . $historyLengthMonths . " month");
    101            
    102             $args['datefrom'] = $limitDate;
    103             // $args["dateto"] = ... does not need to be defined, so all events in the future will be queried
    104             $args['datemode'] = 1; // == FSE_DATE_MODE_ALL
    105             $args['number'] = 0; // == FSE_DATE_MODE_ALL           
    106         }
    107 
    108         if (isset($category_parameter))
     104            /* query for a single event */
     105            $singleEvent = fse_get_event($single_event_parameter);
     106            if ($singleEvent)
     107            {
     108                $fsEvents = array();
     109                array_push($fsEvents, $singleEvent);
     110            }
     111        }
     112        else
    109113        {
    110             $args['categories'] = array($category_parameter);
    111         }
    112        
    113         // query the events from WP Calendar
    114         $fsEvents = fse_get_events ($args);
     114            /* query for multiple event */
     115            if (!is_null($options) && !is_null($options['ical-wp-calendar-history-length-months']))
     116            {
     117                $historyLengthMonths = $options['ical-wp-calendar-history-length-months'];         
     118                $limitDate = strtotime("-" . $historyLengthMonths . " month");
     119               
     120                $args['datefrom'] = $limitDate;
     121                // $args["dateto"] = ... does not need to be defined, so all events in the future will be queried
     122                $args['datemode'] = 1; // == FSE_DATE_MODE_ALL
     123                $args['number'] = 0; // == FSE_DATE_MODE_ALL           
     124            }
     125
     126            if (isset($category_parameter))
     127            {
     128                $args['categories'] = array($category_parameter);
     129            }
     130           
     131            // query the events from WP Calendar
     132            $fsEvents = fse_get_events ($args);
     133        }
     134
     135       
    115136       
    116137        $outputBody = "";
  • ical-for-wp-calendar/tags/1.5.1/readme.txt

    r727161 r784158  
    44Requires at least: 3.0
    55Tested up to: 3.5.1
    6 Stable tag: 1.5.0
     6Stable tag: 1.5.1
    77
    88An extension for the Wordpress plugin WP Calendar, which generates iCal / RFC5545 / RFC2445 conform files.
     
    2929= Where is the feed located? =
    3030
    31 At http://your-web-address/?wp-calendar-ical
     31At
     32* http://your-web-address/?wp-calendar-ical OR
     33* http://your-web-address/?wp-calendar-ical&category=<id of category> OR
     34* http://your-web-address/?wp-calendar-ical&event_id=<id of single event>
     35
    3236
    3337= How can I add the iCal URL to my website =
     
    4448= How can the list of feeds be limited? =
    4549
    46 By adding 'category=1' to the feed url, you can limit to events, which are asssigned to the (post) category 1. The feed url will then look like
     50The list can be limited in two ways. By a single event id (like given by the placeholder \{event_id\} ) or by adding 'category=<id of category>' to the feed url, you can limit to events, which are asssigned to the (post) category. The feed url will then look like
    4751
    4852http://your-web-address/?wp-calendar-ical&category=1
     53http://your-web-address/?wp-calendar-ical&event_id=4
    4954
    5055== Changelog ==
     56
     57= Version 1.5.1 - 07.10.2013 =
     58* add query parameter 'event_id' to select single events into an ical feed
    5159
    5260= Version 1.5.0 - 16.06.2013 =
  • ical-for-wp-calendar/trunk/ical-wp-calendar.php

    r727161 r784158  
    3333define("ICAL_WP_CALENDAR_QUERY_VARIABLE", "wp-calendar-ical");
    3434define("ICAL_WP_CALENDAR_QUERY_PARAMETER_CATEGORY", "category");
    35 
     35define("ICAL_WP_CALENDAR_QUERY_PARAMETER_EVENTID", "event_id");
    3636
    3737
     
    8383        $category_parameter = $_GET[ICAL_WP_CALENDAR_QUERY_PARAMETER_CATEGORY];
    8484    }
     85
     86    if (isset($_GET[ICAL_WP_CALENDAR_QUERY_PARAMETER_EVENTID]))
     87    {
     88        $single_event_parameter = $_GET[ICAL_WP_CALENDAR_QUERY_PARAMETER_EVENTID];
     89    }
    8590   
    8691    if ( !function_exists('fse_get_events') )
     
    9499       
    95100        $options = get_option("ical-wp-calendar-options");
    96        
    97         if (!is_null($options) && !is_null($options['ical-wp-calendar-history-length-months']))
     101
     102        if (isset($single_event_parameter))
    98103        {
    99             $historyLengthMonths = $options['ical-wp-calendar-history-length-months'];         
    100             $limitDate = strtotime("-" . $historyLengthMonths . " month");
    101            
    102             $args['datefrom'] = $limitDate;
    103             // $args["dateto"] = ... does not need to be defined, so all events in the future will be queried
    104             $args['datemode'] = 1; // == FSE_DATE_MODE_ALL
    105             $args['number'] = 0; // == FSE_DATE_MODE_ALL           
    106         }
    107 
    108         if (isset($category_parameter))
     104            /* query for a single event */
     105            $singleEvent = fse_get_event($single_event_parameter);
     106            if ($singleEvent)
     107            {
     108                $fsEvents = array();
     109                array_push($fsEvents, $singleEvent);
     110            }
     111        }
     112        else
    109113        {
    110             $args['categories'] = array($category_parameter);
    111         }
    112        
    113         // query the events from WP Calendar
    114         $fsEvents = fse_get_events ($args);
     114            /* query for multiple event */
     115            if (!is_null($options) && !is_null($options['ical-wp-calendar-history-length-months']))
     116            {
     117                $historyLengthMonths = $options['ical-wp-calendar-history-length-months'];         
     118                $limitDate = strtotime("-" . $historyLengthMonths . " month");
     119               
     120                $args['datefrom'] = $limitDate;
     121                // $args["dateto"] = ... does not need to be defined, so all events in the future will be queried
     122                $args['datemode'] = 1; // == FSE_DATE_MODE_ALL
     123                $args['number'] = 0; // == FSE_DATE_MODE_ALL           
     124            }
     125
     126            if (isset($category_parameter))
     127            {
     128                $args['categories'] = array($category_parameter);
     129            }
     130           
     131            // query the events from WP Calendar
     132            $fsEvents = fse_get_events ($args);
     133        }
     134
     135       
    115136       
    116137        $outputBody = "";
  • ical-for-wp-calendar/trunk/readme.txt

    r727161 r784158  
    44Requires at least: 3.0
    55Tested up to: 3.5.1
    6 Stable tag: 1.5.0
     6Stable tag: 1.5.1
    77
    88An extension for the Wordpress plugin WP Calendar, which generates iCal / RFC5545 / RFC2445 conform files.
     
    2929= Where is the feed located? =
    3030
    31 At http://your-web-address/?wp-calendar-ical
     31At
     32* http://your-web-address/?wp-calendar-ical OR
     33* http://your-web-address/?wp-calendar-ical&category=<id of category> OR
     34* http://your-web-address/?wp-calendar-ical&event_id=<id of single event>
     35
    3236
    3337= How can I add the iCal URL to my website =
     
    4448= How can the list of feeds be limited? =
    4549
    46 By adding 'category=1' to the feed url, you can limit to events, which are asssigned to the (post) category 1. The feed url will then look like
     50The list can be limited in two ways. By a single event id (like given by the placeholder \{event_id\} ) or by adding 'category=<id of category>' to the feed url, you can limit to events, which are asssigned to the (post) category. The feed url will then look like
    4751
    4852http://your-web-address/?wp-calendar-ical&category=1
     53http://your-web-address/?wp-calendar-ical&event_id=4
    4954
    5055== Changelog ==
     56
     57= Version 1.5.1 - 07.10.2013 =
     58* add query parameter 'event_id' to select single events into an ical feed
    5159
    5260= Version 1.5.0 - 16.06.2013 =
Note: See TracChangeset for help on using the changeset viewer.