Aug
31

Droid Phone wont boot? This may help.

Thought I’d throw this quick note out there.  I’m using a Droid 2, which I’ve been very happy with (because its awesome, runs a lot of apps and because the company I started working for in January provides it for FREE!)

I grabbed my phone from the charger this morning and a couple of hours later looked at it and it was dead and wouldn’t boot (yes, boot…it IS a computer).

Slapped it on my USB charger at work but no dice, even though the charge light on the side said it was working.

Had a co-worker try his battery in mine, worked fine, so it wasn’t the phone.

After some thought I’m pretty sure that my home charger was unplugged from the wall and so my phone not only didn’t charge but probably ran completely down.  A quick web search revealed that if your Droid 2 (and I’m guessing other Droids) is down below 5% or so, a USB charger wont work.  Luckily I had my car charger out in the car, went out, plugged in and immediately, ZU-ZAP! got my Motorola logo.

So if you phone is wicked dead, don’t try a USB charge, go wall or car.

Aug
23

Put wordpress on a site with an existing page.

Author Chris Cummings    Category PHP, Wordpress     Tags

So I had this site that already had a page up.  I needed to install wordpress in the root and make some changes but I didn’t want wordpress to be live to the general public…after asking in 4 forums and not getting help I figure this out.  I was thinking I should use .htaccess but I solved this with a stand alone page and a cookie checker added to the themes header.php

Here’s the good:

  1. Moved my current page from www.site.com to www.site.com/sub/
  2. Created a page accessible only to me on the site that sets and destroys a cookie in the root directory using something like this:
    $action = $_GET['action'];
    if ($action == "create")	{	setcookie("dealvilletempcookie123", "yes", time()+(60*60*24*365),"/");			}
    if ($action == "destroy")	{	setcookie("dealvilletempcookie123", "no", time()+(60*60*24*365),"/");				}
  3.  

  4. In the header.php file of the WP theme I check the cookie.
    If its set to YES then I do nothing (which opens the WP install in the root directory)
    If its set to NO (or not set or set to anything else) then I use the PHP header function to redirect…do this at the very top of the header file, before you load an WP stuff.  ITS THE LAW! :-)

Whoop…there it is.

Aug
8

The First Web Page: Kickin’ it old school…

Remember your first web page?  Mine was on Geocities.  Aaahhhhh, Geocities!  Good times.

Here is THE first web page…sorta.  It’s actually a revision of the first page (which no longer exists) but its an early revision.  The first page dropped in 1991 and this is a revision from 1992.

Enjoy: http://www.w3.org/History/19921103-hypertext/hypertext/WWW/TheProject.html

Aug
2

Cool + Somewhat useful = FireFox Tilt!

You’ll just need to check it out (trust me):

  1. Read about it here (if you want): http://hacks.mozilla.org/2011/07/tilt-visualize-your-web-page-in-3d/
  2. Download it here (download it and drag it to firefox to install it): https://github.com/victorporof/Tilt/raw/master/bin/Tilt.xpi
  3. Restart FF
  4. Open up a page you want to tilt
  5. Shift + Ctrl + M
  6. Use your mouse (with click) to move it around.
  7. You can see all the div layers stacked up.
  8. Be amazed, share a link to my blog, show some love, save a whale.
Jul
15

Cool moving background with CSS3

Author admin    Category CSS, HTML     Tags

I saw a cool thing on www.css-tricks.com (one of my favorite sites) and after looking at his code plus a few others was able to doit…so I present:
COOL SLIDE IN BACKGROUND (not the best name but, whattyagonnado?)

Here’s the code…all you need is a png file named droid.png:

 

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
#thebox {
-webkit-border-radius: 14px;
-moz-border-radius: 14px;
border-radius: 14px;
background-color: #10365b;
height: 300px;	width: 400px;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #FFF;	font-size: 30px;
background-image: url(droid.png);
background-position: 390px 0px;	background-repeat:no-repeat;
overflow: hidden;}#thebox p {	padding-top: 16px;
padding-right: 150px;
padding-bottom: 16px;
padding-left: 16px;}#thebox:hover  {
position: absolute;
background-color: #30567b;
background-image: url(droid.png);
background-position: 190px 0px;	background-repeat:no-repeat;
-webkit-transition: all 0.8s ease; 
-moz-transition: all 0.8s ease; 
background-position: 220px 100%; 
background-repeat: no-repeat;	}
</style></head>
<body>	<div id="thebox">	  
<p>This is a cool box with some text in it </p>	  
<p>OK, that's all.</p>
</div>
</body></html>
Jul
1

Super Helpful Nerdy Web Design Type Links

I love CSS-TRICKS.COM.  Always interesting, usually helpful…but today its MEGA HELPFUL!  This post in particular:

http://css-tricks.com/12389-one-page-apps-i-actually-use/

Why?  Because I’m always looking up the code for rounded corners or trying to find the exact link to jQuery…here are some great links from that article!

That’s it.  Have fun. :-)

Jun
22

Let Google Host Your jQuery

Author Chris Cummings    Category HTML, jQuery     Tags

I cannot seem to find one particular place where this info is available (maybe i’m loosing meh mad googlin’ skills?) but here it is:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js" type="text/javascript"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />

So the first line is your jquery, the 2nd is your jquery ui, the 3rd is the CSS.  ’nuff said.

Jun
8

PHP Cookies and WordPress – Set That Path, Brother!

Author admin    Category PHP, Wordpress     Tags

OK I don’t claim to understand this (as so many things I post here) but I figured since I worked this out I would post it!

I am working on a WordPress site and setting a cookie with PHP code. I was running this code:

setcookie("your-selected-location", $the_slug, time()+(60*60*24*365));

The problem is that I was getting odd results and when I checked Firebug in Firefox, looking at the cookies, this ONE line was setting TWO cookies with the same name but for 2 different paths!

Still not sure why, although I think its something about WP, but I fixed it by changing the code to this:

setcookie("your-selected-location", $the_slug, time()+(60*60*24*365),"/");

Which forces just 1 cookie to set for the / path. There it is!

May
25

Control the content that shows in WordPress

Author admin    Category Wordpress     Tags

This is a quick post that assumes you know wordpress.

This gets the content of a page

$content = get_the_content();

This gets and displays the content:

the_content();

I needed to get the content, show only the first paragraph, then display it…so this is what I did:

/* THIS CODE GETS THE FIRST PARAGRAPH ONLY OF THE PAGE CONTENT */
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]&gt;', $content);
$content = strstr($content, '</p>', true);
echo ("<hr>$content<hr>");
 

There ya go…be about it!

May
20

Good Design, Compromise and the Rolling Stones

Author admin    Category General Nerdiness     Tags

I am (as you may guess by my blog) a web designer.  When I build websites for my clients I know that almost always my clients are not super web savvy people.  After all, if they were, they’d do it themselves.

But being a knowledgeable, professional web designer and working with people who are not poses a unique set of problems.  When I take my car into a shop to get serviced, say for an oil change, there is only one proper way to really do an oil change.  You can go with certain filters, certain oils but as far as the end result, there is only one correct final outcome.  Guy changes oil, car works, I’m happy.

With web design there is nothing of the sort.  Web design is equal parts art and science (and sometimes, I’m convinced, just a smidge of voodoo and masochism).  There is a lot to know and web based technology changes so fast there is no way one person can be an expert in all of it…or even a fraction of it.  So we choose our areas.  With me its HTML, CSS, PHP, WordPress and the like.  I’m a strong mid-level PHP programmer.  I’ve spent a lot of time with WordPress.  I dream in HTML.  You get my point.

Not only do I know the technical stuff, but I’ve been around long enough and have just enough of an artistic eye that I know what looks good, and works good, and what doesn’t it.

But my clients don’t always know that…or do they?

See I’m always torn.  Case in point, I designed a fairly nice logo for a client recently that I think really captured what they need to convey with their website.  Correct font, nice colors, conveying certain emotions.  It was simple, it was nice.  They came back and wanted their logo in what might as well have been Comic Sans, because they loved it that way and felt their clients would to.

It was hideous…to me.

So I always struggle here, with who’s right and who’s wrong?  On the one hand you have me, a seasoned pro at web design with an artistic flair.  On the other hand you have Grandma Jane, wanting a website for her knitted baby clothes (not really I’m making that stuff up) and she has this God-awful, hideous look in mind that she just loves.

So who’s really right?  I don’t know.  My selfish side says “PICK ME!” but my logic kicks in and says “Grandma Jane is designing for people just like her…it may be an unattractive font to you, but her peers are gonna probably love it…so get over yourself.”

I don’t know, it’s Friday and I’m just wondering aloud here…probably more about this later.

Oh…Rolling Stones…
“You Can’t Always Get What You Want, But If You Try Sometimes, You Just Might Find, You Get What You Need.”