• Resolved mrdthomas

    (@mrdthomas)


    I am trying to figure out why MM-Forms Version 0.9.4b would conflict with Calendar Version 1.2.2 in Safari 4.0.2 on Mac OS X causing the event description to be visible in the calendar day cell. you can see an example here:

    https://mikecdesign.com/DEV/wptest/?page_id=3

    The event description is supposed to be visible when the user puts the cursor over the event title.

    Any help would be greatly appreciated

    Thanks

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

    (@mrdthomas)

    Ok I figured it out.

    I tested in my environment and nothing is broken.

    Comment or remove the following lines in the mm-forms.php file:

    if (remove_filter('the_content', 'wpautop'))
                add_filter('the_content', array(&$this, 'wpautop_substitute'));
    // Original wpautop function has harmful effect on formatting of form elements.
    	// This wpautop_substitute is a temporary substitution until original is patched.
    	// See https://trac.www.ads-software.com/ticket/4605
    	function wpautop_substitute($pee, $br = 1) {
    		$pee = $pee . "\n"; // just to make things a little easier, pad the end
    //return $pee;
    		$pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
    		// Space things out a little
    		$allblocks = '(?:address|area|blockquote|caption|colgroup|dd|div|dl|dt|form|h[1-6]|li|map|math|ol|p|pre|table|tbody|td|tfoot|th|thead|tr|ul)';
    		$pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
    		$pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
    		$pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines
    		$pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates
    		$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end
    		$pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
    		$pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', "<p>$1</p>$2", $pee);
    		$pee = preg_replace( '|<p>|', "$1<p>", $pee );
    		$pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); // don't pee all over a tag
    		$pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists
    		$pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee);
    		$pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);
    		$pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)!', "$1", $pee);
    		$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee);
    		if ($br) {
    			$pee = preg_replace('/<(script|style).*?<\/\\1>/se', 'str_replace("\n", "<WPPreserveNewline />", "\")', $pee);
    			$pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks
    			$pee = str_replace('<WPPreserveNewline />', "\n", $pee);
    		}
    		$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*<br />!', "$1", $pee);
    		$pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);
    		if (strpos($pee, '<pre') !== false)
    			$pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') .  stripslashes(clean_pre('$2'))  . '</pre>' ", $pee);
    		$pee = preg_replace( "|\n</p>$|", '</p>', $pee );
    
    		return $pee;
    	}
Viewing 1 replies (of 1 total)
  • The topic ‘MM-Forms and Calendar’ is closed to new replies.