Support » Plugin: Spiffy Calendar » Want to remove dot from "show upcoming events"

Viewing 3 replies - 1 through 3 (of 3 total)
  • Found it myself in the spiffy-calendar/spiffy-calendar.php file: where you see:

    // Print upcoming events
    	function upcoming_events($cat_list = '')
    	{
    		global $wpdb;
    
    		$options = $this->get_options();
    
    		// Find out if we should be displaying upcoming events
    		$display = $options['display_upcoming'];
    
    		if ($display == 'true') {
    			// Get number of days we should go into the future
    			$future_days = $options['display_upcoming_days'];
    			$day_count = 1;
    
    			$output = '';
    			while ($day_count < $future_days+1)	{
    				list($y,$m,$d) = explode("-",date("Y-m-d",mktime($day_count*24,0,0,date("m",$this->ctwo()),date("d",$this->ctwo()),date("Y",$this->ctwo()))));
    				$events = $this->grab_events($y,$m,$d,'upcoming',$cat_list);
    				usort($events, array($this, 'time_cmp'));
    				if (count($events) != 0) {
    					$output .= '';
    // $output .= '<li>'; original code, removed to remove dot
    					$output .= date_i18n(get_option('date_format'),
    								mktime($day_count*24,0,0,date("m",$this->ctwo()),date("d",$this->ctwo()),date("Y",$this->ctwo())));
    					$output .= '<ul>';
    				}
    				foreach($events as $event) {
    					$output .= ''.$this->draw_event($event).'';
    //$output .= '<li>'.$this->draw_event($event).'</li>'; original code, removed to remove dot
    				}
    				if (count($events) != 0) {
    					$output .= '</ul>';
    //$output .= '</ul></li>'; original code, removed to remove dot
    					}
    				$day_count = $day_count+1;
    			}
    
    			if ($output != '') {
    				$visual = '<ul>';
    				$visual .= $output;
    				$visual .= '</ul>';
    				return $visual;
    			}
    		}
    	}

    You can see the 3 edits I made where I have commented the original code. There’s probably a better way to do it, such as removing the output line itself, but this way works for me, and it is easy to revert to the original code if needed.

    Plugin Author swdd

    (@bstofko)

    A better way would be to update the CSS and set list-style-type:none for the upcoming list UL style. Your edit is removing the LI tags and rendering invalid html.

    Ok thanks. I think the phrase “rendering invalid html” is going to come up a lot for me until I get used to this stuff.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Want to remove dot from "show upcoming events"’ is closed to new replies.