Changeset 1464000
- Timestamp:
- 07/30/2016 07:17:56 PM (10 years ago)
- Location:
- chronosly-events-calendar/trunk
- Files:
-
- 7 edited
-
README.txt (modified) (1 diff)
-
README.txt~ (modified) (1 diff)
-
chronosly.php (modified) (2 diffs)
-
classes/chronosly_dad_elements.php (modified) (1 diff)
-
classes/chronosly_widgets.php (modified) (1 diff)
-
post-types/post_type_chronosly.php (modified) (8 diffs)
-
post-types/post_type_chronosly_calendar.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chronosly-events-calendar/trunk/README.txt
r1452263 r1464000 6 6 Requires at least: 3.1 7 7 Tested up to: 4.5.3 8 Stable tag: 2.4. 78 Stable tag: 2.4.8 9 9 License: GPLv2 10 10 -
chronosly-events-calendar/trunk/README.txt~
r1452263 r1464000 5 5 Tags: calendar, calendars, event plugin, events plugin, event plugins, events plugins, event calendar, event calendars, events calendar, events calendars, event list, events list, event lists, events lists, online calendar, organizer, organizers, place, places, recurring events, responsive calendar, calendar shortcode, event shortcode, event calendar AJAX, events calendar AJAX, event calendars AJAX, events calendars AJAX, events calendars google map, event calendar google maps, events calendar google maps, event calendars google maps, events calendars google maps, event gmap, events gmap, event management, events management, event manager, events manager, event organizer, events organizer, event page, events page, event widget, events widget, kalender, kalenders, evento, eventos, calendario, calendarios, schedule, scheduling 6 6 Requires at least: 3.1 7 Tested up to: 4. 5.18 Stable tag: 2.4. 67 Tested up to: 4.6.1 8 Stable tag: 2.4.8 9 9 License: GPLv2 10 10 -
chronosly-events-calendar/trunk/chronosly.php
r1452263 r1464000 4 4 * Plugin URI: https://www.chronosly.com 5 5 * Description: Chronosly is one of the plugins you have always dreamt about. Designed to suit all users (basic, designers, and software developers). Choose your template and you are ready to publish your events. Install addons to enhance the preset plugin features. You can get a wide selection of templates and addons in our marketplace 6 * Version: 2.4. 76 * Version: 2.4.8 7 7 * Author: Chronosly 8 8 * Author URI: https://www.chronosly.com … … 26 26 define('CHRONOSLY_TEMPLATES_URL', plugins_url()."/chronosly-templates"); //path para incluir scripts o css 27 27 define('CHRONOSLY_DEBUG', false); //debug mode 28 define('CHRONOSLY_VERSION', "2.4. 7"); //debug mode28 define('CHRONOSLY_VERSION', "2.4.8"); //debug mode 29 29 define('CHRONOSLY_ADMIN_INTERFACE', 1); //Todo: hacer diferentes interficies de admin simple o varios event 30 30 define('CHRONOSLY_ADMIN_MODALITY', 1); //Todo: hacer diferentes modalidades segun la tematica -
chronosly-events-calendar/trunk/classes/chronosly_dad_elements.php
r1452263 r1464000 5178 5178 } 5179 5179 if($vars->metas['tickets_vars'][$value]["sale"] && $vars->metas['tickets_vars'][$value]["sales-price"]) { 5180 if($vars->metas['tickets_vars'][$value]["currency"]) $currency = $vars->metas['tickets_vars'][$value]["currency"];5180 if($vars->metas['tickets_vars'][$value]["currency"]) $currency = urldecode($vars->metas['tickets_vars'][$value]["currency"]); 5181 5181 5182 5182 $porc = " <span class='sale-discount' style='background-color: #sale-color'>".round((($vars->metas['tickets_vars'][$value]["sales-price"]-$vars->metas['tickets_vars'][$value]["price"])/$vars->metas['tickets_vars'][$value]["price"])*100)."%</span>"; -
chronosly-events-calendar/trunk/classes/chronosly_widgets.php
r1301303 r1464000 19 19 if ( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title']; 20 20 if($instance['type'] == "calendar" and !$instance['year'] and !$instance['month'] and !$instance['week']){ 21 $instance['month'] = date(" m");21 $instance['month'] = date("n"); 22 22 } 23 23 foreach($instance as $k=>$v){ -
chronosly-events-calendar/trunk/post-types/post_type_chronosly.php
r1452263 r1464000 765 765 if($_REQUEST["ch-price-max"]) $args["post_meta_price_max"] = $_REQUEST["ch-price-max"]; 766 766 if(has_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') )) remove_action( 'pre_get_posts', array("Post_Type_Chronosly",'add_custom_post_vars') ); 767 if(isset( $args["p"])) unset( $args["p"]); 767 768 $query2 = new WP_Query( $args ); 768 769 … … 1079 1080 $pos = Post_Type_Chronosly::get_event_position(get_the_title(),$meta, get_the_ID(), $start); 1080 1081 if(Post_Type_Chronosly::filter(get_the_ID())) { 1081 $elements[ $pos] = get_the_ID();1082 $elements["$pos"] = get_the_ID(); 1082 1083 } 1083 1084 } else { … … 1090 1091 $pos = Post_Type_Chronosly::get_event_position(get_the_title(),$meta, get_the_ID(), $start); 1091 1092 if(Post_Type_Chronosly::filter(get_the_ID())) { 1092 $elements[ $pos] = get_the_ID();1093 $elements["$pos"] = get_the_ID(); 1093 1094 } 1094 1095 } … … 1154 1155 $pos = Post_Type_Chronosly::get_event_position($name,$meta, $id, $from, date("H", $from), date("i", $from)); 1155 1156 // echo $pos." "; 1156 $elements[ $pos]= array("id" => $id,"start" => $from, "end" => $to , "h" => date("H", $from), "m"=> date("i", $from), "eh" => date("H", $to), "em"=> date("i", $to));1157 $elements["$pos"]= array("id" => $id,"start" => $from, "end" => $to , "h" => date("H", $from), "m"=> date("i", $from), "eh" => date("H", $to), "em"=> date("i", $to)); 1157 1158 } 1158 1159 … … 1225 1226 if($start >= $start_min and $start <= $end_top){ 1226 1227 $pos = Post_Type_Chronosly::get_event_position($name,$meta, $id, $start); 1227 if(Post_Type_Chronosly::filter($id)) $elements[ $pos]= array("id" => $id, "start" => $start, "end" => $end);1228 if(Post_Type_Chronosly::filter($id)) $elements["$pos"]= array("id" => $id, "start" => $start, "end" => $end); 1228 1229 } 1229 1230 $start = $end;//restamos un dia porque si no el ultimo dia no se cuenta al salir del bucle … … 1240 1241 if($start >= $start_min and $start <= $end_top){ 1241 1242 $pos = Post_Type_Chronosly::get_event_position($name,$meta, $id, $start); 1242 if(Post_Type_Chronosly::filter($id)) $elements[ $pos]= array("id" => $id, "start" => $start, "end" => $end);1243 if(Post_Type_Chronosly::filter($id)) $elements["$pos"]= array("id" => $id, "start" => $start, "end" => $end); 1243 1244 } 1244 1245 $start = $end;//restamos un dia porque si no el ultimo dia no se cuenta al salir del bucle … … 1256 1257 if($start >= $start_min and $start <= $end_top){ 1257 1258 $pos = Post_Type_Chronosly::get_event_position($name,$meta, $id, $start); 1258 if(Post_Type_Chronosly::filter($id)) $elements[ $pos]= array("id" => $id, "start" => $start, "end" => $end);1259 if(Post_Type_Chronosly::filter($id)) $elements["$pos"]= array("id" => $id, "start" => $start, "end" => $end); 1259 1260 } 1260 1261 $start = $end;//restamos un dia porque si no el ultimo dia no se cuenta al salir del bucle … … 1271 1272 if($start >= $start_min and $start <= $end_top){ 1272 1273 $pos = Post_Type_Chronosly::get_event_position($name,$meta, $id, $start); 1273 if(Post_Type_Chronosly::filter($id)) $elements[ $pos]= array("id" => $id, "start" => $start, "end" => $end);1274 if(Post_Type_Chronosly::filter($id)) $elements["$pos"]= array("id" => $id, "start" => $start, "end" => $end); 1274 1275 } 1275 1276 $start = $end;//restamos un dia porque si no el ultimo dia no se cuenta al salir del bucle -
chronosly-events-calendar/trunk/post-types/post_type_chronosly_calendar.php
r1452263 r1464000 203 203 if(isset($meta["ev-from-m"][0]) and $meta["ev-from-m"][0] != "00") $pos += $meta["ev-from-m"][0]*10000000000; 204 204 if($settings["chronosly_featured_first"] and (!isset($meta["featured"][0]) or $meta["featured"][0] != 1)) $pos += 10000000000000; 205 //echo $id." ".$pos."<br/>"; 205 206 return $pos; 206 207 } 207 208 208 public static function get_array_days_by_query($year, $month, $week, $query){209 public static function get_array_days_by_query($year, $month, $week, $query){ 209 210 $elements = array("ids"=>array(), "days"=>array()); 210 211 $settings = unserialize(get_option("chronosly-settings")); … … 234 235 $end = strtotime($meta["ev-to"][0]); 235 236 }//si no empezamos en el primer dia del año 236 else $end = strtotime("31-12-". $year+1)-1;237 $end_top = strtotime("31-12-". $year+1)-1;237 else $end = strtotime("31-12-".($year+1))-1; 238 $end_top = strtotime("31-12-".($year+1))-1; 238 239 if($settings["chronosly_week_start"] == 1) { 239 240 //$start -= (60*60*24); … … 245 246 $pos = Post_Type_Chronosly_Calendar::get_event_position_by_hour(get_the_title(), $meta, get_the_ID()); 246 247 do{ 247 if($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d"))) {$elements["days"][date('Y-m-d',$start)][ $pos]= get_the_ID();}248 if($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d"))) {$elements["days"][date('Y-m-d',$start)]["$pos"]= get_the_ID();} 248 249 $start = strtotime("+ 1 day",$start); 250 // echo date('Y-m-d',$start)." $start $end $endHours $end_top<br/>"; 249 251 }while ( $start<=$end and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours))); 250 252 … … 305 307 $endHours = $end + ($meta["ev-to-h"][0]*60*60) + ($meta["ev-to-m"][0]*60); 306 308 do{ 307 $elements["days"][date('Y-m-d',$start)][ $pos]= get_the_ID();309 $elements["days"][date('Y-m-d',$start)]["$pos"]= get_the_ID(); 308 310 $start = strtotime("+ 1 day",$start); 309 311 }while ( $start<=$end and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) ); … … 355 357 $endHours = $end + ($meta["ev-to-h"][0]*60*60) + ($meta["ev-to-m"][0]*60); 356 358 do{ 357 $elements["days"][date('Y-m-d',$start)][ $pos]= get_the_ID();359 $elements["days"][date('Y-m-d',$start)]["$pos"]= get_the_ID(); 358 360 $start = strtotime("+ 1 day",$start); 359 361 }while ( $start<=$end and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours))); … … 454 456 if(!$month and !$week){ 455 457 if($repeated) $start_min = strtotime("01-01-".$year);//start building array 456 $end_top = strtotime("01-01-". $year+1)-1;//limit of repeats per year458 $end_top = strtotime("01-01-".($year+1))-1;//limit of repeats per year 457 459 if(isset($meta["ev-repeat-option"][0]) and $meta["ev-repeat-option"][0] == "until" and 458 460 isset($meta["ev-until"][0]) and strtotime($meta["ev-until"][0]) < $end_top){ 459 $end_top = strtotime($meta["ev-until"][0]) ;461 $end_top = strtotime($meta["ev-until"][0])+(60*60*24); 460 462 } 461 463 } else if($week){ … … 469 471 if(isset($meta["ev-repeat-option"][0]) and $meta["ev-repeat-option"][0] == "until" and 470 472 isset($meta["ev-until"][0]) and strtotime($meta["ev-until"][0]) < $end_top){ 471 $end_top = strtotime($meta["ev-until"][0]) ;473 $end_top = strtotime($meta["ev-until"][0])+(60*60*24); 472 474 } 473 475 // if($settings["chronosly_week_start"] == 1) { … … 480 482 if(isset($meta["ev-repeat-option"][0]) and $meta["ev-repeat-option"][0] == "until" and 481 483 isset($meta["ev-until"][0]) and strtotime($meta["ev-until"][0]) < $end_top){ 482 $end_top = strtotime($meta["ev-until"][0]) ;484 $end_top = strtotime($meta["ev-until"][0])+(60*60*24); 483 485 } 484 486 } … … 506 508 --$count; 507 509 while($start <= $end and $start <= $end_top){//rellenamos los dias de este tramo 508 if($start >= $start_min and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) $elements["days"][date('Y-m-d',$start)][ $pos]= array("id" => $id, "start" => $start1, "end" => $end );510 if($start >= $start_min and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) $elements["days"][date('Y-m-d',$start)]["$pos"]= array("id" => $id, "start" => $start1, "end" => $end ); 509 511 $start = strtotime("+ 1 day",$start); 510 512 //echo date('Y-m-d',$start)." ".date('Y-m-d',$end)."<br/>"; … … 528 530 //echo date('Y-m-d',$start)." ".date('Y-m-d',$end)."<br/>"; 529 531 while($start <= $end and $start <= $end_top){//rellenamos los dias de este tramo 530 if((!$repeated or $start >= $start_min) and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) $elements["days"][date('Y-m-d',$start)][ $pos]= array("id" => $id, "start" => $start1, "end" => $end );532 if((!$repeated or $start >= $start_min) and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) $elements["days"][date('Y-m-d',$start)]["$pos"]= array("id" => $id, "start" => $start1, "end" => $end ); 531 533 // echo $id." ".date('Y-m-d H:i',$start)." ".date('Y-m-d H:i',$endHours)." ".date('Y-m-d H:i',$end_top)."<br/>"; 532 534 … … 550 552 //echo date('Y-m-d',$start)." ".date('Y-m-d',$end)."<br/>"; 551 553 while($start <= $end and $start <= $end_top){//rellenamos los dias de este tramo 552 if((!$repeated or $start >= $start_min) and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) $elements["days"][date('Y-m-d',$start)][ $pos]= array("id" => $id, "start" => $start1, "end" => $end );554 if((!$repeated or $start >= $start_min) and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) $elements["days"][date('Y-m-d',$start)]["$pos"]= array("id" => $id, "start" => $start1, "end" => $end ); 553 555 // echo $id." ".date('Y-m-d H:i',$start)." ".date('Y-m-d H:i',$endHours)." ".date('Y-m-d H:i',$end_top)."<br/>"; 554 556 $start = strtotime("+ 1 day",$start); … … 569 571 //echo date('Y-m-d',$start)." ".date('Y-m-d',$end)."<br/>"; 570 572 while($start <= $end and $start <= $end_top ){//rellenamos los dias de este tramo 571 if((!$repeated or $start >= $start_min) and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) $elements["days"][date('Y-m-d',$start)][ $pos]= array("id" => $id, "start" => $start1, "end" => $end );573 if((!$repeated or $start >= $start_min) and ($endHours < $end_top or date('Y-m-d',$start) != date('Y-m-d',$endHours)) and ($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d")))) $elements["days"][date('Y-m-d',$start)]["$pos"]= array("id" => $id, "start" => $start1, "end" => $end ); 572 574 $start = strtotime("+ 1 day",$start); 573 575 //echo date('Y-m-d',$start)." ".date('Y-m-d',$end)."<br/>"; … … 581 583 return $elements; 582 584 } 583 585 584 586 public static function seasons($eventos, $year, $month, $week, $start, $end, $id, $elements, $tickets){ 585 587 $settings = unserialize(get_option("chronosly-settings")); … … 652 654 do{ 653 655 if($settings["hide_past_on_calendar"] != 1 or $start>= strtotime(date("Y-m-d"))) { 654 $elements["days"][date('Y-m-d',$start)][ $pos]= array("id" => $id,"start" => $start_ini, "end" => $end , "h" => date("H", $from), "m"=> date("i", $from), "eh" => date("H", $to), "em"=> date("i", $to));}656 $elements["days"][date('Y-m-d',$start)]["$pos"]= array("id" => $id,"start" => $start_ini, "end" => $end , "h" => date("H", $from), "m"=> date("i", $from), "eh" => date("H", $to), "em"=> date("i", $to));} 655 657 $start = strtotime("+ 1 day",$start); 656 658 }while ( $start<=$end ); … … 697 699 do{ 698 700 // echo date('Y-m-d',$start)." "; 699 $elements["days"][date('Y-m-d',$start)][ $pos]= array("id" => $id,"start" => $start_ini, "end" => $end , "h" => date("H", $from), "m"=> date("i", $from), "eh" => date("H", $to), "em"=> date("i", $to));701 $elements["days"][date('Y-m-d',$start)]["$pos"]= array("id" => $id,"start" => $start_ini, "end" => $end , "h" => date("H", $from), "m"=> date("i", $from), "eh" => date("H", $to), "em"=> date("i", $to)); 700 702 $start = strtotime("+ 1 day",$start); 701 703 }while ( $start<=$end ); … … 726 728 727 729 do{ 728 $elements["days"][date('Y-m-d',$start)][ $pos]=array("id" => $id,"start" => $start_ini, "end" => $end , "h" => date("H", $from), "m"=> date("i", $from), "eh" => date("H", $to), "em"=> date("i", $to));730 $elements["days"][date('Y-m-d',$start)]["$pos"]=array("id" => $id,"start" => $start_ini, "end" => $end , "h" => date("H", $from), "m"=> date("i", $from), "eh" => date("H", $to), "em"=> date("i", $to)); 729 731 $start = strtotime("+ 1 day",$start); 730 732 }while ( $start<=$end );
Note: See TracChangeset
for help on using the changeset viewer.