Website Designers and Webmasters

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

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

Firefox Adding and Removing Scrollbar (CSS Fix)

Nov 3 2010

Filed under: CSS,Firefox,HTML

In Firefox, if the webpage you are viewing is not taller than your screen (and doesn’t need a scrollbar), Firefox will completely remove the scroll bar from your screen. This adds 20px of more space to your view space. Unfortunately, if your website is centered, this will actually move your webpage 10px to the left or right when switching between some pages.

This CSS code will automatically force a sidebar onto every page of your website; even if the scrollbar is not needed. That will stop your webpage from moving left and right on different pages:

html { overflow-y: scroll;}

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.)

By: Ashton Sanders

Free FLV Editor – Not Trial Software!

Nov 12 2009

I have looked through the interwebs for many an FLV video editor. There are many to select from on CNET and for any search on Google. I have downloaded and tried many of these. Even with them being trial software, I was not impressed. In a sentence, I’ve had horrible luck trying to find a good FLV editor.

I’m not totally surprised since most people don’t do a lot of FLV editing. Most people who work with videos create and edit videos in another format (MPEG, AVI, etc.) and then use a FLV converter to turn the file into a Flash Video. If an edit needed to be done to the video, it would be done in the original format and re-exported into Flash Video.

This brings me to my point: I have found a pretty cool FLV editor that is not trial software. You can clip the timeline very easily and edit the MetaData for the Flash Videos that you edit. It is built in Adobe Air.

Here’s the link to the FLV editor build by RichApps.

Thanks!
Ashton Sanders

By: Ashton Sanders

SQL – Delete Similar or Identical Records

Oct 20 2009

Filed under: SQL,Webmaster

Deleting similar or identical records in SQL is a lifesaver. I found Brian Cryer’s “SQL How To…” about deleting similar or identical records in SQL. It’s got a lot of information, including the code for MS-Access SQL.

Here’s a quick explanation of what the following code does:

It searches MyTable for and deletes all rows where the dupField is the same except for the row with the lowest uniqueField.

Delete Similar Records

To delete similar records, i.e. where the records are not the same but one field is the same and only one copy needs to be preserved, try the following SQL:

DELETE T1
FROMÂ MyTable T1, MyTable T2
WHEREÂ T1.dupField = T2.dupField
AND T1.uniqueField > T2.uniqueField

To break this down even further, this code would delete all rows in MyTable that had the same value in dupField.

DELETET1
FROM MyTable T1, MyTable T2
WHERE T1.dupField = T2.dupField

This last line restricts the deleting to only rows that are also greater than another row with the same dupField

AND T1.uniqueField > T2.uniqueField

Obviously, you would replace the field and table names to work for your table.

Talk soon,
Ashton Sanders

« Newer PostsOlder 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