Browsing articles in "Web Design"
May 1, 2009

Change Permissions [chmod] with Dreamweaver [Update]

Dreamweaver LogoLast April, I reported my findings on how to use Adobe (formerly by Macromedia) Dreamweaver to change the permissions of web files and folders. The versions of Dreamweaver I had used were older, and the only way to accomplish this was to use a command-line interface built into Dreamweaver to enter FTP commands the ol’ fashioned way.

Being, by far, the most popular post with several follow-up comments, I felt it was time for an updated post with all the tips rolled together.

  • Any version of Dreamweaver before 8 (MX or prior): Manual FTP commands, found here.
  • Dreamweaver 8.0 (MX): The FTP command line was removed from this version. The only way to CHMOD within Dreamweaver is to download and install the extension. [Thanks, bill and eskimo]
  • Dreamweaver CS3, CS4 (9.0 and above): The GUI interface for changing persmissions is already included. Just right-click!

Apr 10, 2009

Finally! Inline (Embedded) Images for Gmail!

It’s here folks… turn it on in Labs and go nuts!

Mar 10, 2009

A Slick Automatic Random Image Rotator Script [Random Picture]

I’ve had this post in the drafts bin for awhile now, I’m just going to finish off it’s miserable existence and push it out into the cold, untamed wilderness of the Internets.

Matt Mullenweg, (of Automattic and WordPress fame), wrote a random image script that fixed a problem I was having building a site about a year ago. The wonderful trick with his random method is that it calls a PHP file which then serves the image by manually writing the file headers to make the browser think it’s calling up an image. This is especially helpful when trying to achieve an image rotation in conjunction with a CSS layout. Normally, random image scripts will place a random image tag (rather, a random value for img=)in the page with a specified image file from a list when the page is parsed. But, if you’re using CSS to serve the images (say, as a background, or header), then that won’t work in CSS since the browser/server is not parsing CSS, but merely reading. So, what this script does is allow you to put a reference to a single PHP file in the CSS (or anywhere else). It’s, then, that PHP file that selects the random image and serves it up to the browser.

The best part about this script is that you can drop a new image in the specified directory, and it’s automatically included in the mix! No need to edit the script every time!

One problem I found, though, is because the CSS makes a call to a PHP file, the browser will call up the cached version of that file until expiration, or forced refresh. (This doesn’t seem to be a problem if the call is being made from another PHP, HTML – or otherwise- file) Since, the PHP file never changes (according to the browser) it’ll likely not be as “random” as you’d like. The result is the same image loading over and over. To overcome this, I added a few lines to the PHP file to include the file header of the image that’s returned to the browser:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");

Now, hopefully, the browser will not cache the file at all. But, if it does, the expiration date is set to July 26, 1997. So, the next time the browser loads the page, since the file seems horribly out-of-date, it’ll load the file again.

Below,  I will list the code I have deployed on a live site where it works quite wonderfully. Though, now that I go back and look at it… it’s not very similar to Matt’s script. Huh… I told you this was an oldie. I’m not sure where I got this script, or if I modified it that heavily, but at any rate, here are two random image scripts that work similarly. Perhaps at some point I’ll merge the two different scripts because it seems that Matt’s version is more up-to-date, and uses the more “random” and lightweight “mt_rand” PHP operation.

Script I’m using:
// Modify the following line before using this script
$folder = ".";

$fileList = array();
$handle = opendir($folder);
while (false !== ($file = readdir($handle) ) ) {
if ( substr($file, -4) == ".gif" || substr($file, -4) == ".jpg" ) {
$fileList[count($fileList)] = $file;
}
}
closedir($handle);
$randNum = rand( 0, (sizeOf($fileList) -1) );
if ( substr($fileList[$randNum], -4) == ".gif" ) {
header ("Content-type: image/gif");
} elseif ( substr($fileList[$randNum], -4) == ".jpg" ) {
header ("Content-type: image/jpeg");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
}
readfile($fileList[$randNum]);
?>

Matt’s Random Image Script.

To use, just make a call to the php file like you would any image either in a PHP/HTML/CSS/what-have-you page.

(Photo by David Asch)

Feb 24, 2009

If You Post it, they will SPAM it

Spam for Weblogs

Most people don't care for spam, in all forms.

I hope that my Internet savvy readers will know that you should never, ever, post a personal email address online in public view. In personal emails, in password-protected forums, sure, post away, but otherwise, posting an email address in plain-text is a one-way ticket to SPAM-ville.

So, if you already know this stuff, why am I writing about it? Because, obviously, not everyone does. Over the past year, I’ve been responsible for the design and upkeep of a local church web site. Of course, one of the best (nerdy) perks is being able to analyze all the unique stats that roll in. One very helpful metric, the “search engine terms” metric, as its commonly referred to, shows you what people terms or phrases that a visitor bounced off a search engine in order to find your site. An interesting trend began to appear after awhile;  one that I hadn’t seen before. It seems that someone, or something, had come to the site after searching for something such as “church in california @hotmail.com.” At first, I only saw a couple of these, but after awhile, these hits began to occurring weekly with different phrases, “pastors in california @hotmail.com,” “email contacts of pearsons @hotmail.com,” “prayer 2009 @gmail.co.th,” and so on. After digging into the stats more, I was able to pull the IP address of the machines that had landed on the site after those searches. The IP address? 74.125.77.132. I’ll wait a second for the nerds to run a trace.

Weird, huh? That address points squarely at Google. Not all the searches had that address attached to them. For example, one search traced back to Togo Telecom, an ISP in France.

No doubt some of you already know what this is all about, but just in case, I’ll dispense with the details of my theory. The hits are coming from bots which are programmed to harvest email addresses for specific campaigns. Yes, even church pastors and staff get spammed from “religious” organizations with special “services” to sell. The method of querying a couple of keywords, then a popular email provider is actually pretty smart in a, let-someone-else-do-the-heavy-lifting kind of way. The hits from Google are most likely a result of the bot choosing to visit the cached link — a snapshot of the web page as it was indexed — provided by Google for each search result so the coveted email address it seeks will still be available on the page, just waiting to be added to a list of email addresses for sale. A search engine bascially hands a list of pages to a bot with email addresses on them, making it even faster to crawl pages than to randomly bounce from site to site hoping to find them.

For example, if I wanted to spam people who are involved with Relay for Life I would search for “relay for life @yahoo.com,” or if I had a fraudulent operation running on fake Scantron forms, I could search “school teacher @hotmail.com.”

So, in review: Don’t post any email address online in plain-text, unless, of course, you enjoy the extra reading material. Currently, the safest way to allow web site visitors to contact you is to use a temporary “throw-away” address, or a form with CAPTCHA verification. Another method I consider safe enough is generating an image that shows the email address without actual text on the page (don’t use the mailto link either!). Any of these email image generators will do. Though your email address appears on the page, it isn’t easily read by a bot harvesting email addresses from text. Though the technology is there, as far as I know, very few spammers bother with OCR (optical character recognition) technology since there are still so many good addresses readily available in plain text.

I wonder what would happen if I Googled “looking for unheard of foreign entity to transfer large sums of cash with no assurance of legitimacy @citibank.com.”

Jan 28, 2009

Update to WiFi Map & Other Updates

I’ve made a sizable update to the WiFi Scan / Wardriving map adding nearly 1000 new points to the map from areas in Southern California. Though, for some reason, the new points are not showing on the web maps, but show when the KML file is loaded directly into Google Earth. I would figure out what the problem is, but, meh.

Secondly… I think I was going to say something about how I’m really digging WordPress 2.7 and its built-in plugin updating and auto-install features. So yeah, I really like WP 2.7′s plugin updating and auto install feature.

Third, I’ve recently become engaged. I guess others would use that as an excuse as to why they are spending less time with online endevours. I’m not. I haven’t spent too much time on this site before the engagement, so, no excuses from me you will hear. However, you will be delighted (but probably “meh”) to know that I have not spared my engagement from the nuances of nerdom. I am currently building a site to centralize wedding details, photos, and house a blog where my dearest and I will share our adventures with family and friends. The site will also have a method to accept RSVPs from guests. I thought that idea would get shot down right quick, because it’s “not how it’s done.” But, to my surprise, she was excited about the prospect of saving the postage by not sending return cards to our tech-savvy friends and family (the techno-phobic will still get the tradtional reply cards).

So anywho, that’s some of what’s going on over here. How about over there?

Dec 31, 2008

Zune 30GB Frozen at Midnight, December 31, 2008

So, I go to work tonight and I get the hankerin’ to listen to “The Device Had Been Modified v2.”  I get out my trusty black 30GB Zune, and my little portable speakers,  fire up the Zune and….

Boot screen…
Bar charges across the screen… stops.
Stuck. Nothing. Frozen. Dead. Crap.

zuneblue

I perform the ol’ back button + up button reset trick and even the back button + down button (reportedly works when the other doesn’t) and it fails to thaw my Zune. I leave the Zune alone for a couple hours, and after returning to my office, I find the screen black and the battery drained.

But, apparently, I am not alone.

Owners of the original 30gb Zune from around the world are reporting that when they tried turning on their Zune after midnight on December 31, 2008, the device rebooted, then hung on reboot. The only workaround discovered thus far is detaching the battery, effectively resetting the internal clock which is being pointed to as the culprit.

zune-status

Looks like MS is aware of the problem.

It would seem that if something like this was going to occur, it would occur at midnight of the new year. One astute reader at Engadget noted that 2008 was a leap year, with one day more than other years. Whatever the reason is for the strange behavior, this could be the reason why our Zunes didn’t die as the new year came to be. Or perhaps there’s a conflict of certain processes thinking it’s 2008, but the others, 2009 depending on if the process takes the leap year into account. Then again, Microsoft could just be telling us to go buy a new gen2 Zune.

Welcome to the Zunicide.

Update: I’d just like take a second and note all the whiny, bitchy, complaining people who’ve been without some media player for a few hours; those who are crying foul and whining all over the Internet as if their mother just died and Microsoft called in the hit. I know its just a minority, a vocal minority. But geez people, GET A GRIP.

microsoft zune 30gb midnight die dead broken frozen fix

Dec 30, 2008

100s of Free Worship Backgrounds & Graphics [Church Media]

I was recently hired by a church in my area to maintain their computers, networks, information services, and web site.  Being a poor college student, and previously, a jobless high school student, I’ve gained an appreciation for frugality. That, combined with witnessing disproportionate amounts of cash misdirected in other area ministries, I am determined to support the ministries at this church by positively affecting the most people and supporting the ministry staff while operating under one of the smallest budgets.

One of the responsibilities I took over was the creation of the Sunday morning visual presentation (lyrics, sermon notes, announcements, etc). Previously, someone purchased stock photos from iStockphoto to use as backgrounds for lyrics. Unfortunately, it seemed that this person (long gone before I arrived) had very little money with which to work. There were only a handful of images which were only in small to medium-sized web quality; certainly not something that would look any good when blown up on a large projection screen.

So, off I went on a hunt to find web sites and Flickr users that would allow me to use their photos freely. Sure, there’s plenty of sites out there that offer spectacular photos made specifically for the purpose, but it all comes at a price. After some time, I’ve discovered a few good sites, and one really good Flickr group who freely share their works with the church community. Even if you don’t need backgrounds, or any of the images found on these sites, they’re a great place to get ideas for your own graphic projects.

Free worship and church backgrounds, graphics, and media:

Also, if you’re looking for videos or motion backgrounds, here’s a web site that gives them away for simply registering. They’re the real deal, and they’re doing a wonderful thing. Consider sharing your media with them if you have any to share:

This web site provides a small selection of free video backgrounds in return for registering:

Pages:12»