• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

Coding

IE screenSize

July 9, 2011 by Webhead

Problem:

Apparently no one cares about a user’s actual screen resolution.  Usually I don’t too, but in this case I do.  In creating a home page with an image as the background and expands as the user expands their window, the overflow is hidden.  However for users with a low resolution this means that they cannot scroll to see what else is on the page.

Solution:

The workaround for this is to detect the users screen resolution and change the css overflow attribute on the html, body tags to be “auto”.  I have two monitors, one at 1600×1200 and another at 1024×768.  On firefox and chrome the height values match with the javascript property screen.height.  On IE the value is always 1200.  I’m guessing it’s because the 1600×1200 monitor is my primary monitor.

Filed Under: Coding Tagged With: css, IE crap, javascript

Share Buttons with jQuery

July 6, 2011 by Webhead

Simple as pie… Adding share buttons using jQuery and CSS:

http://www.webanddesigners.com/floating-share-box/

Filed Under: Coding Tagged With: css, jquery

Styling for Mobile Web

July 1, 2011 by Webhead

Developing for IE, Firefox, Safari, and Chrome is a pain!  But now we have mobile devices like the iPhone and iPad.  This website demonstrates a nice way to handle these:

http://www.danstorm.com/dan-storm-article-css-15.html

Filed Under: Coding Tagged With: css, iPad, iPhone

Slow Javascript in IE

June 30, 2011 by Webhead

Problem:

The menu on this website:  http://www.sohtanaka.com/web-design/side-navigation-tooltip-popup-bubble/ ran fine in IE.  It was quick and worked fine.  On my website however, it ran slooow.

Solution:

Look for large images that may be loaded.  IE doesn’t seem to handle them very well.  The background image for my project was 1196×1150.  Pretty large…  Gotta adjust for the weakest browsers.

Filed Under: Coding Tagged With: IE crap, javascript, jquery, optimize

Custom WordPress Comments

June 27, 2011 by Webhead

This guy explains how to customize WordPress comments pretty well:

http://devpress.com/blog/using-the-wordpress-comment-form/

 

Disable HTML in Comments

You can try this plugin found on :  http://www.theblog.ca/literal-comments

 

// This will occur when the comment is posted
function plc_comment_post( $incoming_comment ) {

	// convert everything in a comment to display literally
	$incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);

	// the one exception is single quotes, which cannot be #039; because WordPress marks it as spam
	$incoming_comment['comment_content'] = str_replace( "'", ''', $incoming_comment['comment_content'] );

	return( $incoming_comment );
}

// This will occur before a comment is displayed
function plc_comment_display( $comment_to_display ) {

	// Put the single quotes back in
	$comment_to_display = str_replace( ''', "'", $comment_to_display );

	return $comment_to_display;
}

add_filter( 'preprocess_comment', 'plc_comment_post', '', 1);
add_filter( 'comment_text', 'plc_comment_display', '', 1);
add_filter( 'comment_text_rss', 'plc_comment_display', '', 1);
add_filter( 'comment_excerpt', 'plc_comment_display', '', 1);

 

Filed Under: Coding Tagged With: wordpress

IIS 7 PHP Write Permissions

June 15, 2011 by Webhead

Problem:

PHP is throwing errors saying it cannot find a directory when trying to upload a file.  This usually means PHP does not have permissions to create or modify files in that directory.

Solution:

I’m not sure why, but adding Modify and Write permissions for COMPUTERUsers group solves the problem.  Found the solution here: http://forums.iis.net/t/1153990.aspx

Filed Under: Coding Tagged With: iis, php

  • « Go to Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 23
  • Go to page 24
  • Go to page 25
  • Go to page 26
  • Go to page 27
  • Interim pages omitted …
  • Go to page 30
  • Go to Next Page »

Primary Sidebar

Topics

apache apple block editor chrome cms css debug eCommerce embed firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization mac os x ms sql mysql open source optimize php php 5.3 responsive rest api seo svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools