• Resolved John

    (@vaughajj)


    Has anyone been able to get the pop-up on the calendar to show more than one time. I have a small theater site with multiple showings per day and would like all the showing times to appear when a user mouses over the date. Right now it only shows the first showing. The easiest way would probably be to get all the times in the title tag since that’s what the javascript pop-up function is calling, but I’m not sure how to do that.

    http://wordpress.org/extend/plugins/event-calendar-3-for-php-53/

Viewing 1 replies (of 1 total)
  • Thread Starter John

    (@vaughajj)

    I ended up editing the day.php file to include a db query to get a list of the times. Not the most efficient way to do things, but it works.

    class ec3_Day
    {
      var $is_event =False;
      var $titles   =array();
      function ec3_Day(){}
    
      function add_post($title,$date,$is_event,$id)
      {
        $safe_title=strip_tags($title);
        $safe_title=
          str_replace(
            array(',','@'),
            ' ',
            htmlspecialchars(
              stripslashes($safe_title),
              ENT_QUOTES,
              get_option('blog_charset')
            )
          );
        if($is_event)
        {
    
    	  global $ec3, $wpdb;
    
    	  $sql=
    		"SELECT
    		   post_id,
    		   start
    		 FROM $ec3->schedule
    		 WHERE post_id='$id'";
    	  $sql.=' ORDER BY start ASC';
    	  $times = $wpdb->get_results($sql);
    	  $first_round = 1;
    	  foreach ($times as $time){
    	  	//is the date of the showing the same as this date
    		if(mysql2date("Ymd",$date) == mysql2date("Ymd",$time->start)){
    			$time_pretty = mysql2date("g:i a", $time->start);
    			if($first_round){
    				$time_string = $time_pretty;
    				$first_round = 0;
    			}else{
    				$time_string .= " " . $time_pretty;
    			}
    	  	}
    	  }
    
    	  $safe_title.=' @ '.$time_string;
    
          $this->is_event=True;
        }
        $this->titles[]=$safe_title;
      }
      function get_titles()
      {
        return implode(', ',$this->titles);
      }
    }
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Event Calendar 3 for PHP 5.3] Only showing one time in calendar pop-up’ is closed to new replies.