Pagerank

October 28th, 2007

So I’ve seen a few blogs talking about how Google is now punishing sites that sell link advertising, by downranking their sites. I’ve now seen this firsthand on scriptygoddess. It used to have a page-rank of 6 - and now it is a pagerank 43. I’ve seen other sites (good sites with good content) get downranked.

I know I’m probably stating the obvious - but I think its outrageous that Google wants to hurt sites that have good, valueable content, just because they’d like to make some cash for their work. What exactly is “wrong”/”bad” by my making some money for my effort? For a long time I had scriptygoddess remain up, and posted information I had learned - out of the goodness of my heart. But when I started working for myself to help make ends meet - it made sense to put up advertising on the site to help that end as well. I tried to be clear about which links are sponsored links. While it would have been lucrative to use those “inline” advertising links (where they link text right in your own post to advertisements) I didn’t go that route because I felt it gave a bad user experience. Some links were intentional - and others were advertising and how could you tell the difference without mousing over or clicking on it? Annoying.

The biggest joke of all this, is of course, Google isn’t punishing sites that ONLY contain GOOGLE advertising (which, by the way, pay the least/worst of any advertising I’ve contracted with)

On the whole, and up until now, I thought Google’s been a pretty cool company but this move is just plain bad. Back before the dot-com bust - many sites were designed to draw revenue strictly from advertising. The business models didn’t work out quite right - but I think I’ve been seeing a revitalization to that idea - the right advertising can support a website. And what is Google trying to do? Completely smush it and stop progression.

And I think it will eventually come back to bite them. I’ve found recently that when doing searches strictly through Google, I’ve found myself going back through their pages a lot more than I used to - and in some cases never finding what I had needed to. So by downranking sites with valuable information, they’ve pushed them further back in the list of pages, and maybe in some cases, pushing some sites so far back that you’d never find them *making their own search engine not as useful as before*.

I hope they re-think this idea.

Edited to add: The more I think about this, and the more I read, the more I have to laugh. Google is playing “link-police” from what I understand because their complaint is that selling links puts less-relevant sites up on top when you do searches - and that you’re not allowed to “buy” that position. Right. That’s why when I do searches on Google, top of the page, and all along the side are links for sites that BOUGHT that position. So really what they’re saying is it’s only ok when you’re paying GOOGLE. *no one else should be making money* except for them. I think it’s definitely time to change my default search engine!

document.getElementById … has no properties

September 3rd, 2007

This isn’t a big deal, but it was something I was fighting with for a bit. If you’re trying to set the properties of a DIV via javascript, and you’re getting the “document.getElementById(”mydiv”) has no properties” javascript warning, there’s probably two big things that will cause it.

1) you didn’t set the id.
Go back and make sure your div has id=”mydiv” (or whatever you named it) in there.

2) the javascript is running BEFORE the div has been defined in the code.
This is what got me. I had the javascript code just above where the div was… and at load time, that div doesn’t exist yet… the browser hasn’t gotten that far down the page yet, so as far as it’s concerned, that div with that id, doesn’t exist. Once I moved the javascript BELOW the div… all was well.

And actually here - they suggest calling it on onload.

Kudos to W3Schools

August 18th, 2007

Whenever someone asks me for tutorials on one thing or another, I think the first link I send them is w3schools. Recently, one of my clients was asking if I could do XSLT to format their XML document. I’ve heard about XSLT, I even get the basics of XML, and or course I understand HTML and CSS… but I didn’t know how they all fit together. I did a quick little tutorial on their site, and now everything clicks into place. Sure, I’m no expert yet, but I think I have a solid enough understanding to do what they want. I know there’s other good tutorials out there for web technologies (feel free to post some of your favorites in the comments) - but for having only a few minutes this morning, they gave a really good explanation that put everything into place for me.

Use PHP to get the current page/file name

July 13th, 2007

I probably already have this posted somewhere, I know I use it a ton but always have to look it up for the exact syntax. Here’s how you can get the name of the current file (ie. if your file is “aboutus.php” this will echo “aboutus.php”)
<?php
$currentFile = $_SERVER["PHP_SELF"];
$parts = Explode(’/', $currentFile);
echo $parts[count($parts) - 1];
?>

I’ve seen variations on it, as I said, I always have to look it up for the exact syntax - but today I found that from here. Also here - which seems to list a bunch of other useful snippets.

Warning: reference to undefined property

July 10th, 2007

The main reason I’ve seen that error come up in javascripts is because a form name or field name has been misspelled somewhere. Tonight, while I combed over every name until my vision was crossed - I discovered a new reason why you might get this error:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

I was working with CubeCart - and that’s their default. I usually use:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Hope that saves someone else some pain…

Working with CubeCart

July 6th, 2007

As I wrote in the comments on this post, I have a new project that needed a shopping cart again. I tried Zen Cart again, and again I quickly remembered why I hated it so much. If I ever even so much as think of trying that package, just hand me the spork to remind me how I wanted to spork my eyes out everytime I use it.* Last time I really liked working with Cube Cart but ran into a problem with shipping and then went on a long hunt for something that did what I needed with shipping, was easy to modify templates, etc. etc. Since this time I didn’t have the same kind of shipping restriction, I figured I’d give Cube Cart another go. So far so good. Customizing has been a breeze. Very intuitive. I’ll be updating this post over the next few days with things I find useful as I work on the project (due next week! Wish me luck! heh)
Read the rest of this entry »

Email fiasco

July 4th, 2007

Something strange happened to my email address (the one that receives comment notifications from this site, of course) - it just sort of disappeared off the server. I’ve set it up again, so everything should be fine now - but if you’ve tried to contact me and I haven’t responded, or if you left a comment on this site and it seemed like it was stuck in moderation forever, I apologize. Everything’s fixed now. (And here I thought I wasn’t getting any email because no one loved me) ;P

Make phone numbers clickable to dial on mobile phones.

June 14th, 2007

If you’re designing a page for a mobile web browser, and you want to make the phone number “clickable” so that a mobile web browser can click and dial the number, just add the code below:
<a href="wtai://wp/mc;8015551212">801-555-1212</a>

update: Sadly I really should check out THIS site on a mobile browser, so I have no idea if it’s useful or not - but just in case you’re coming here FROM a mobile browser and want to test it out - here is a sample link: 801-555-1212

update#2: Thanks to a comment from Jane, I’ve now learned that Apple’s iPhone needs that formatted differently:
<a href="tel:1-801-555-1212">1-801-555-1212</a>
I’ve tested it on my phone (which isn’t an iPhone) and it still works. I have an LG-VX8100. If you test it, please leave a comment indicating what kind of phone/browser you’re using and if it worked or not…

Please test the following link:
1-800-555-1212

Redirect a subdomain to a directory using .htaccess

June 13th, 2007

I will tell you right off the bat that I don’t “get” regular expressions, and I don’t get .htacess rewrite rules. I wish I understood them better, but there’s some part of my brain that just fights me every time I try to get a better all-around understanding. Still, I have to (and want to) do stuff with htaccess, so I end up digging for code online, and trying stuff until something works. I wish I knew more about WHY it worked, but I’m just happy that it works at all. :)

Now that I’m done with my disclaimer, on to the point of this post. I had to use a htaccess file to redirect a subdomain to a directory in the main domain. For example: http://blog.mysite.com needed to point to http://www.mysite.com/blog/

After much digging and trial and error, this seems to work:RewriteEngine On
RewriteCond %{HTTP_HOST} ^blog\.mysite\.com
RewriteRule ^(.*)$ /blog/$1 [L]

(in search of) A better glass button photoshop tutorial

May 29th, 2007

I’ve been hunting around the last few days, looking for a good tutorial on how to make those glossy/glass-like buttons in photoshop. There are A LOT of tutorials out there. Some of them are just hard to follow. Others only seem to work best with one particular shape. But I did find this one that worked for me no matter what shape I’m using. As well, it’s incredibly simple and easy to follow. The one thing I added which I think helps the effect came from another tutorial I had seen - which was to add a drop shadow - about 75% opacity, 0 distance, and size: 7px.

Multiple Button Shapes

(The tutorial is somewhat old (in internet years) - dated 2001 in the footer… Makes me wonder if the site is and will be still visible for too much longer…)

There was another one I found that was a little “fancier”. (Side note: I went through so many of these pages today, and now I can’t find the link to the one I’m thinking of. If someone recognizes these steps please make a note in the comments, and I’ll update the post with the appropriate credit link. I’ve even gone through every page in my history. I suspect that I’ve combined a number of tricks from a variety of different tutorials to come up with this one, but with all the sites I saw, I can’t be 100% sure.) I liked this trick - but it didn’t work as well with every shape I tried with it. So click the “read more” to see how to create buttons that look like this:
smaller sample
(Updated 6/2/07 A lot of this is similar to these two tutorials on Bartelme - which I actually DON’T remember seeing before writing this - but I was looking at his badges trying to figure out how he did them, when I wrote this. I hadn’t seen that he had a tutorial on them.)
Read the rest of this entry »