2009.07.28

Adding .liquid to DW Code View

By underblob @ 12:19pm — Categories: Tech
Tags: , , , , ,

I’ve been using Shopify a lot recently as an easy to use hosted e-commerce solution. They have a handy theme editor called Vision that lets you create your own custom theme on your desktop and then upload it to your Shopify account. It is pretty easy to use if you are familiar with markup and CSS. They also have their own markup language for their application, called Liquid with a helpful wiki.

The only problem I find is that when I’m editing the .liquid files in Dreamweaver in Code View, the color coding on the markup isn’t there… it’s just all black text. Enter this handy Adobe Tech Note to the rescue: http://kb2.adobe.com/cps/164/tn_16410.html

2009.07.24

Using CryptX in WP Template

By underblob @ 5:01pm — Categories: LAMP, Mobile, Tech, WordPress
Tags: , , , , , , ,

Separating the images from content using strip_tags in a WordPress Template to control the page layout. Using the CryptX plugin to encrypt mailto and email addresses so they won’t get picked up by spam bots. After installing the plugin, you can call the cryptx function directly from the Template to apply the encryption:

if ( function_exists ( 'cryptx' ) ) :
	cryptx ( $content, $text, $css, $echo );
endif;

$content is the string to encrypt.
$text is the string to replace the text inside the alt attribute of the <a> or <img> tags.
$css is the css class to assign to the link.
$echo is set to false to return the result in a variable, true to echo the result to the browser.

Links

CryptX plugin page: wordpress.org/cryptx
CryptX author’s site: weber-nrw.de
PHP function to strip HTML and PHP tags: php.net/strip-tags

2009.07.08

DW Extension: EnityConverter

By underblob @ 4:31pm — Categories: HTTP, Tech
Tags: , , , , ,

Converting seven back issues of a magazine for online publication, I had to copy and paste the text from the designer’s PDFs into my HTML documents for formatting (Acrobat has “Export as HTML with CSS” but it was über-Frankenstein, creating more work than doing it by hand… export as txt is much better). Of course all of the special characters like em-dash, smart quotes, etc. had to be converted to HTML entites: &mdash; &ldquo; etc. Frustrated with the ongoing find and replace in Dreamweaver, Google found me this time-saving relic in the Adobe Exchange that will auto-convert everything to HTML entities in code view:

www.adobe.com/cfusion/exchange/entityconverter/

2009.07.07

Changing .html to .php on XP

By underblob @ 10:38am — Categories: LAMP, Tech
Tags: , , , , ,

Open the Windows CLI and cd to the directory where you want to change the file names, then enter the following command:

ren *.html *.php

Ta-da!

Links

Microsoft CLI reference

2009.07.06

AS2 Disable Underlying Buttons

By underblob @ 10:47am — Categories: Flash, Tech

Create a new movie clip to block the content underneath and apply the following ActionScript:

mc_target.onRollOver = function () {};
mc_target.useHandCursor = false;

Register the empty function so Flash will treat the movie clip like a giant button so that none of the underlying buttons will be active. Add the useHandCursor property to keep the pointer hand from showing up.