Create One-Pixel Bevel Button in Adobe Fireworks


What it looks like…

Buttons in Adobe Fireworks

How to do it…

WebResource.axd and ScriptResource.axd 404 error with WordPress


While working on a WordPress project, one of the requirements was to keep an existing web application in ASP.NET which also meant that this would be on a Windows server. No big whoop, right? Here is something I learned…

The rewrite rules for WordPress in the web.config can interfere with calling the WebResource.axd and ScriptResource.axd. The problem is they show up as 404 errors when called via the ASP.NET app.

The fix was to modify the rewrite rules as follows…

1
2
3
4
5
6
7
8
<rule name="wordpress" patternSyntax="ECMAScript">
<match url=".*" />
<conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <add input="{URL}" negate="true" pattern="\.axd$" />
</conditions>
<action type="Rewrite" url="index.php" />

The difference is changing the patternSyntax from WildCard to ECMAScript and adding the pattern for .axd.

Dynamic Subpages in WordPress


When working with client websites (or your own), it important to make it easy to navigate content. In many cases, you will have a horizontal top (parent) level navigation menu and you might have drop down menus to drill down through child pages. This is helpful, but not easy to use, especially if your menu is several levels deep. In general, you should not rely only on drop down menus alone. It is bad UX design and frustrates users. So what can you do?

subnav-example

As noted in the example image above… You can have a sub-navigation element that displays dynamically based on the top (parent) level navigation that was selected!

Fortunately, there are a few  plugins that will help you do just that. My current favorite is “BE Subpages Widget” by Bill Erickson.

Plugin: BE Subpages Widget by Bill Erickson

But don’t limit yourself, there are several out there

WordPress: Load jQuery From CDN


Add the following snippet to your function.php file to load jQuery from a CDN.

1
2
3
4
5
6
7
8
9
function uw_load_scripts() {
// De-register the built in jQuery
wp_deregister_script('jquery');
// Register the CDN version
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', array(), null, false);
// Load it in your theme
wp_enqueue_script( 'jquery' );
}
add_action( 'wp_enqueue_scripts', 'uw_load_scripts' );

Source: WordPress Codex

Simple jQuery Page FadeIn/Loader


Have pages load with a subtle fade effect using jQuery. Simply include jQuery and add the following. Simple!

1
2
3
4
jQuery(document).ready(function(){
jQuery("body").css("display", "none");
jQuery("body").fadeIn("slow");
});

Create QR codes!


http://www.generate-qr-codes.com/ Just for the heck of it, I created a QR code generator based on google APIs. Nothing special. Just a tool that will allow to create a QR code and add it to your site. It will let your users to take snapshots of the QR code on your site using their mobile device to easily gain access to pages, contacts and more. 

www.generate-qr-codes.com

Super Easy Copy Filler with a Click


I used to use www.lipsum.com for copy filler… Not anymore. I now use this super handy Mac App, Littleipsum. It is super easy to use and will help streamline your workflow. Every little bit counts.

iPhone App – Stanky Cheese (free)


As mentioned in a previous post, I am learning to develop for the iPhone and needed an app to get my feet wet. The idea of the app came from my 9 year old daughter.

Stanky Cheese

It was a prefect app to get my feet wet and was fun to make. It is a fart app (yes, there are a million of them and no, they are not real farts) but was a good way to break the ice and understand the app store submission process, which was not a great experience. Apple felt the first version was too risky (animated bum). The version that is in the iTunes store is not nearly as funny as the original but, if you are a kid at heart or just like slap stick, it will put a smile on your face. My daughter loves it.

You can download it for free from the iTunes store. If you download it, please rate it. : )

Objective-C and “For Loop” with Fibonacci


I am in the process of learning to develop for the iPhone and of course the primary language is Objective-C.

One of my first assignments after an introduction to Objective-C was to create several console type apps. One of which was to display the first 20 values of the Fibonacci sequence.

I had no clue what Fibonacci was/is until Wikipedia explained it to me (see link). In the end, I was able to figure out the formula and put it in code.

The Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int i; // used in the "for" loop
int fcounter = 20; // specifies the number of values to loop through
int f1 = 1; // seed value 1
int f2 = 0; // seed value 2
int fn; // used as a holder for each new value in the loop
for (i=1; i&lt;fcounter; i++){
fn = f1 + f2;
f1 = f2;
f2 = fn;
printf("%d: ", fn); // print each value of fn
}

The Answer:

1
1: 1: 2: 3: 5: 8: 13: 21: 34: 55: 89: 144: 233: 377: 610: 987: 1597: 2584: 4181: