back to the cotton

Thursday, July 16, 2009

New Designs : Twitter Following Series



OncePressed is happy to introduce a new series inspired by the micro-blog phenomenon. Wear "do you follow?" if you wanna just talk about the craze. Sport "relax i'm following you" if you want to have some fun at the expense of the latest acceptable stalking technique or "quit not following me!" when you're not as popular yet as you'd hoped to be.

These shirts are available in all our styles, sizes and colors. Check them out in our Anti-Social Networking Aisle today!

Labels: ,


Read more!

Friday, July 10, 2009

Why a Somerville T-Shirt?




It was one of those ideas that came to me accidentally. I have an unconscious habit of flipping words and sounds in my head after I hear them. One day, Somervillain just came to me. What better image for a spunky little-brother town than a tough-guy Villain? The idea's come to others too. One the thing about the internet, it teaches humility.

Living outside of Davis and Porter Squares for the past six years, I've seen a lot to love about the area. Somerville is one of those stories of a neighborhood that may get a little bit of teasing, but to its credit I've never heard a single anti-Cambridge or anti-Boston word in return.

Some may argue that Porter and Davis Squares aren't really Somerville and they'd have a point, I do live on the frontier, but what better place to see the difference? Oh, and look for me at Bukowski's in Iman too, and Sherman's or Bloc 11 Coffee Shops in Union, running on Tuft's campus, or the Minute Man Trail or hanging with my Little Brother in Winter Hill.

So why a T-Shirt? Because this town has character and I thought it made sense to make it one. Check it out and wear it with pride, Somerville.

p.s. To all you other Somerville's out there, our shirts fit you too.

Labels: , ,


Read more!

Thursday, July 9, 2009

New Design : As Read In A Book T-Shirt!



Can't quite remember where you heard that clever line in that movie? Don't worry, it may have actually been in a book.

Remind the world that you know where imaginative ideas came from before they were cast in Hollywood. That's right, it's books!

No batteries, easy bookmarking and always right where you left them.

Show your solidarity for the page-turner by getting your "As Read In A Book" T-Shirt today!

Labels: ,


Read more!

Sunday, July 5, 2009

Taking Our T-Shirts on the Road

Went up to Portland Maine to celebrate the Fourth. We had been in town for about ten minutes and had already received two compliments on the "All up in my grill" T-shirt I was sporting. I quickly made up some slips of hotel stationary with my URL on them and for the rest of the day, every time I saw someone laughing at the design, I offered them the URL. The trick seems to be that no one expects that the person wearing it is the designer. Hoping your holiday was great -- or if you are not in the U.S. -- it was still Saturday! 


Read more!

Friday, July 3, 2009

The Moon Through my iPhone and Telescope


We finally got to see the moon here in New England tonight and I took advantage of it by pointing my new Celestron NexStar 114 XLT Telescope and iPhone at it. Can you believe it was a birthday present from mid-June and this was my first real chance to see the moon? update: It's currently still not raining. Weird.

Labels: ,


Read more!

Thursday, July 2, 2009

Using ReWriteRules to Improve SEO on a Tshirt Site

I was recently told by my SEO expert that my web site would rank higher for my search terms (Tshirts, Nerds, Recession, etc.) if the keywords appeared in my URLs.

I already had a categorical hierarchy, but was handling all my pages with one php file, section.php, which only needed a Printfection product or section ID to generate an entire page of relevant content and which sat in the root directory.

She suggested that my links, which then looked like this:

http://www.oncepressed.com/section.php?sectionid=293441

Would be much better regarded by search engines if they looked like this:

http://www.oncepressed.com/Tshirts/Clothe-The-Nerds/Back-In-Black



Getting this to work required a twofold approach.

1) I would need some help adding rewrite RewriteRules to my Apache configuration ...

and ...

2) I would need to change section.php to accept titles OR productIds as arguments.

You may have noticed, even as a casual web user, that more and more sites show paths rather than x.html or x.php files in the broswer's URL window these days. In the past, the only way to hide a script in a directory was to make it the index file. RewriteRules not only let you use different files as index was used in the past, but they will create the appearance of directories in your site where there are none.

The rewrite rules for my site (as written by my expert) look like this:

RewriteEngine on
RewriteRule ^/Tshirts/[^/]+/(.*) /section.php?section_name=$1
RewriteRule ^/Tshirts/(.*) /section.php?section_name=$1

This can be read simply as:

If a URL is presented to Apache, and it starts with /Tshirts, take the last field separated by slashes and pass it to section.php as a new argument called section_name.

The RewriteRules were done.

Next, I took on the PHP portion of the challenge by making section.php friendly to section_name OR section_id. At first I thought I would need a hard-coded look-up table at the beginning of my code to convert names to IDs. Then I had a better idea.

I wasn't currently using the "Teaser" field associated with each product in Printfection's API, so I decided that I would put it to use as way to do a name_to_id lookup in the MySql-esque Printfection database. I revisitied each of my products and sections and gave them a carefully chosen look-up-name in the Teaser field. This look-up-name would become the path to that product. See screenshot for clarification.

It seems that search engines also prefer that words be separated by dashes or underscores so as to read them separately, so I went with Citizens-Of-The-Word, rather than CitizensOfTheWord, my preferred method.

After adding the look-up-name to the teaser field and writing a lookup_id_by_teaser function which called the Printfection database, I had my ID and could leave most of the rest of the code untouched.

Any link code had to be revisited and converted to something like:

<?php
echo '<a href="'.$product_array->teaser.'">'.$product_array->name.'</a>';
?>


It was a bit more complicated than this, because, I also had to remember what my current hierarchy was before building the proper link, but by using the $_SERVER["REQUEST_URI"] variable to determine my current level -- this was a tool I did not have at my disposal before, I was thrilled that the browser was actually going to help me remember where I was -- I was able to solve this problem too.

In summary:

* RewriteRules are powerful tools for the SEO element of your site as well as ease of readability.

* I was reasonably happy with my final solution, but was unhappy to lose my Teaser field. Although I wasn't using it, I know others do and I may want to again some day. I played briefly with imbedding the look-up-name in a <!-- comment --> in the teaser field, but the inability of the API to query by wildcards prevented this.

Anyone else have an idea, short of using the Teaser field? I'd love to hear it.

See the new URLs in action: www.oncepressed.com

thanks,

-matt

Labels: , ,


Read more!