Plugin Directory

Changeset 704797


Ignore:
Timestamp:
04/27/2013 07:44:03 PM (13 years ago)
Author:
markpdxt
Message:

adding version 1.0.9

Location:
sync-facebook-events/tags
Files:
7 copied

Legend:

Unmodified
Added
Removed
  • sync-facebook-events/tags/1.0.7/readme.txt

    r704792 r704797  
    33Tags: facebook, events, synchronize, calendar
    44Requires at least: 3.0
    5 Tested up to: 3.4.2
    6 Stable tag: 1.0.8
     5Tested up to: 3.5.1
     6Stable tag: 1.0.7
    77
    88A simple plugin to Sync Facebook events to The Events Calendar plugin by Modern Tribe.
  • sync-facebook-events/tags/1.0.7/sync-facebook-events.php

    r704792 r704797  
    55Description: Sync Facebook Events to The Events Calendar Plugin
    66Author: Mark Nelson
    7 Version: 1.0.6
     7Version: 1.0.7
     8Revision by: Sam Haines (Wordpress username shaines1)
    89Author URI: http://pdxt.com
    910*/
    1011 
    11 /*  Copyright 2012 PDX Technologies, LLC. (mark.nelson@pdxt.com)
     12/*  Copyright 2013 PDX Technologies, LLC. (mark.nelson@pdxt.com)
    1213
    1314    This program is free software; you can redistribute it and/or modify
     
    6465        'cookie' => true,
    6566    ));
     67Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYPEER] = false;
     68Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYHOST] = 2;
    6669
    6770    $ret = array();
     
    103106        'posts_per_page'=>'-1'
    104107    ));
    105 
     108   
     109   
     110   
    106111    foreach($query->posts as $post) {
    107112        if(!empty($post->to_ping)) {
     
    124129   
    125130    foreach($events as $event) {
    126        
    127131        $args['post_title'] = $event['name'];
    128132       
    129133        $offset = get_option('gmt_offset')*3600;
    130134       
    131         $offsetStart = $event['start_time']+$offset;
     135        $offsetStart = strtotime($event['start_time'])+$offset;
    132136        $offsetEnd = $event['end_time']+$offset;
    133137       
    134138        //don't update or insert events from the past.
    135         if($offsetEnd > time()) {
    136                
     139        if($offsetStart > time()) {
    137140            $args['EventStartDate'] = date("m/d/Y", $offsetStart);
    138141            $args['EventStartHour'] = date("H", $offsetStart);
     
    182185                //eid, name, start_time, end_time, location, description
    183186        }
    184         reset($eids);
     187        //reset($eids);
    185188    }
    186189}
     
    283286    <?php if(isset($events)) { ?>
    284287        <div style="margin-top:20px;font-size:14px;color:#444;border:1px solid #999;padding:15px;width:95%;font-face:couriernew;">
    285         <span style="color:red;">Updaing all facebook events...</span><br />
     288        <span style="color:red;">Updating all facebook events...</span><br />
    286289        <?php fbes_send_events($events); ?><br />
    287290        <span style="color:red;">Events Calendar updated with current Facebook events.</span><br /><br />
    288291        </div>
    289     <? } ?>
     292    <?php } ?>
    290293<?php   
    291294}
Note: See TracChangeset for help on using the changeset viewer.