Archive

Author Archive

Anthony Alexander Fall Designer Jewelry Fashion Show

July 12th, 2006 tony 16 comments

This is a total link love post to my Dad. Before or around the time I was born my father started his jewelry and belts manufacturing business. Its a great entrepreneurship story: he was a history teacher in Greensboro, NC and wasn’t too crazy about his career choice. One day he decided to get his students involved in other cultures and came up with a hands on teaching device. He got together beads and leather strands so the students could build their own ethnic necklaces (sorry I can’t remember what culture they were from). Well the students ate it up but the real spark came when the other teachers started begging Anthony to sell them the necklaces. He quit the teaching job, started designing more jewelry, and hit the street. 30 some years later Anthony Alexander dominates its niche consumer industry.

So he just put together a mini fashion show video and is seeing great success distributing it so I popped the sucker on Google video and YouTube for him. Check it out. It even features Trish from ‘The Bachelor’! (The one that got kicked out and stormed in on the bachelor and his date while they had dinner).

All those years of soldering metal parts, running a leather press, and glueing parts as a kid paid off. My dad is the primary reason I quit my 6 figure salary to start my own business. The best part is having a go-to guy for basic business advice. Thanks daddy!

Categories: Anthony Alexander Tags:

Empty Wordpress categories don’t show up in the sidebar navigation

May 5th, 2006 tony 6 comments

I’ve been playing with Wordpress this week for a new feature for my Raleigh, NC and ran into this issue. If a category doesn’t have any posts in it, it will not show up in the sidebar navigation. Even worse, if it is a parent category Wordpress will not show the children categories even if they aren’t empty. I dug into the source code and found that the function responsible for retrieving the category list is wp_list_cats() and by default most themes pass no parameters to it. However, it is capable of accepting a large range of settings including one to fix our problem.

In your sidebar.php file replace this:

<?php wp_list_cats(); ?>

with this:

<?php
	$settings = "hide_empty=0";
	wp_list_cats($settings);
?>

Now all of your categories will show up even if they don’t have any posts in them. Unfortunately clicking on those empty categories results in “Sorry, no posts matched your criteria.”. You can change this by adding a category.php and writing your own content for the scenario where the category is empty.

Categories: Wordpress Tags:

Torque

October 3rd, 2002 tony 2 comments

Well I’m working on a new project and I thought I would test out the Jakarta project Torque for persistence layer. The setup was pretty easy although it took me a little longer to figure out how to configure it with Resin and db pooling.

You use XML to define your objects like so:

< table name="author" description="Author Table">

< column

name=”author_id”

required=”true”

primaryKey=”true”

type=”INTEGER”

description=”Author Id”/>

< column

name=”first_name”

required=”true”

type=”VARCHAR”

size=”128″

description=”First Name”/>

< column

name=”last_name”

required=”true”

type=”VARCHAR”

size=”128″

description=”Last Name”/>

< /table>

Once you setup your schema the coding is easy peasy:

INSERT

Book book = new Book();

book.setTitle(title);

book.setISBN(isbn);

book.save();

SELECT

Criteria crit = new Criteria();

crit.add(BookPeer.title, “Thinking in Java”);

List list = BookPeer.doSelect(crit);

There are ant tasks defined for creating the database, generating the tables, pre-populating tables, and generating your source code. It has transactional support, object and method caching, and a variety of methods of db pooling built in. It also can perform cascading deletes.

Another cool thing is that you can create criteria to use SQL joins to get an object and its foreign key objects thereby elimating multiple selects for an object.

Pretty cool. I’m anxious to see how it performs under a load.

Categories: Code Tags: