Website Designers and Webmasters

Dedicated to all the tasks Webmasters, Website Developers and Website Designers find themselves facing.

By: Ashton Sanders

WordPress Plugin Settings: Contact Form 7

Jul 8 2011

Filed under: Email,Webmaster,Wordpress

I’ve used Contact Form 7 on a number of websites.

I dislike the default settings for the contact form because I like to realize when emails I get are from my website. (Also email providers like to see that the from address is actually from the same server where that domain is.) These settings also make it easier to reply to the website visitor.

Here’s what I change the Contact Form settings to:

From: contactform@website.com
Subject: Website Contact Request: [your-subject]
Additional Headers: Reply-To: [your-name] <[your-email]>

Enjoy,
Ashton Sanders

By: Ashton Sanders

Websites in a Flash CSS Reset

Jul 1 2011

As one does more and more work with CSS, you start to create a CSS Reset that work well for you and your workflow. There is some important code that I always recommend having on any website, so it’s more of “CSS Starter Code” that a “CSS Reset”


/* ~-~-~~-~ CSS Starter Code -~-~-~-~ *\
|                                      |
|           by Ashton Sanders          |
|                                      |
\* ~-~-~~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ */

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
vertical-align: top;
}

ol, ul {
list-style: none;
}

html { overflow-y: scroll;}

strong, b {font-weight:900;}
em { font-style:italic; }
big { font-size: 1.17em }
small, sub, sup { font-size: .83em }
p { margin:1.12em 0;}

I’ll probably update this more in the future.

Ashton

By: Ashton Sanders

PHP Mail Fail on Windows IIS Server

Jun 28 2011

Over the years I’ve transferred a number (too many) PHP websites to Windows servers running PHP (or have had to install PHP apps on a windows server, etc.). One of the biggest problems I always run into when using PHP on a Windows IIS Server is that the PHP Mail Function doesn’t work.

The solution is to change from using the PHP Mail Function to using Authenticated SMTP delivery. In essence, you’ll set up your web app to act like Outlook or Thunderbird to connect to an emailbox directly. This app obviously won’t download any emails; just send them.

You can search for “PHP SMTP email” to get some good solutions to how to handle this with a Pear script.

If you’re using WordPress, though there’s a very simple WordPress Plugin called WP-Mail-SMTP that does all the hard work for you. All you need to do is enter your server information and select your settings.

I just used it, and it took 5 minutes to setup and test.

By: Ashton Sanders

Development Temporary Image Placeholder

Mar 21 2011

I found this great website that helps you instantly create temporary image placeholders for your development websites. Here’s the default example of the temporary image:

Temporary image placeholder

I create this image by making the image source (src=) “http://dummyimage.com/480×108″.

The website automatically creates the temporary image with the number. Just looking at their home page, I found that you can also change the background color, text color and replace the dimensions with text. Here’s an example:

Temporary image placeholder

The source for this image is:

http://dummyimage.com/470×115/0F6983/fff&text=Temporary+Image+Text

I highly recommend checking out their website at: http://dummyimage.com/

Enjoy,
Ashton Sanders

By: Ashton Sanders

WordPress: Redirect Blog to First Post

Apr 12 2010

I just created a simple WordPress installation. It was only going to be short pages and a simple shopping cart, but at the last minute, they decided to add a blog. Since the area for text was so small, we decided to only have one post for every page. As it would only act as duplicate content, there is no point in using the blog home page at all.

With some help from WP Recipes, I created this code to redirect the blog home template (home.php) to the first post:

<?php
/*
home.php (Blog Home Page):
Redirect To First Post
*/
if (have_posts()) {
while (have_posts()) {
the_post();
wp_redirect(get_permalink());
}
}
?>

It’s actually very simple. It just uses the WordPress Redirect function to redirect to the first permalink that would show up on that page.

Enjoy,
Ashton Sanders

(P.S. If you haven’t heard, Adobe just released the pre-order for CS5… If I were to get one of the packages today, I’d probably get: Adobe Web Premium CS5. It looks ridiculously epic.)

Older Posts »
RSS

Where Am I?

You have found the semi-coherent ramblings of Ashton Sanders: a website designer, developer and webmaster. This is primarily Ashton's place to save notes about techniques and things that he learns in his never-ending conquest of the internet. Hopefully it's coherent enough to be useful to you too.

Subscribe:

Enter your email to get automatic emails whenever Ashton posts on the blog.

Email:

Advertisers:

Email Marketing $19/Month! OIOpublisher Learn how to make Money from Blogging Hillarious, High-Quality Shirts for $6/each Great Book Keeping and Invoicing Software Advertiser Here

Tags and Categories

Links

Blog Roll