Archive for the ‘Uncategorized’ Category

WordPress 3.0 Havok

Sunday, June 20th, 2010

Just a quick update; my site has been flickering because of some permalink issues owing to WordPress 3.0.

What’s worse is that I upgraded my local copy of WordPress 3.0- and accidentally deleted every single file of my theme for this site, so I have to start over. Oh well, I guess its an excuse to build it better.

What do you want to see in bsFunctions?

Wednesday, December 23rd, 2009

Hey, kids! bsFunctions hosts lots of features (1) but we are looking to program EVEN MORE! What do you want to have implemented in bsFunctions? Comment for new features!

WP_list_taxonomies

Thursday, December 17th, 2009

NOTE: Bad error fixed.
Current item used to be defined as tax_item_#current_item instead of tax_item_# current_item.
Bad CSS error; also modified the output from tax_item_# to display current taxonomy name, as well as added a new class with (taxonomy name)_item. Should make it easier to theme.

WordPress is very, very powerful, but there are a few things its lacking. Namely, listing the items of things other than pages & categories in nice little lists.

Now, I could wait until the guys at WordPress came and made a function, or I could program one myself… Which one do you think I did?

BSFunctions 1.1

This may or may not be the beginning of the BS WordPress collection, so download it and see!

To call this function, just type in <?php bs_list_taxonomies(‘taxonomy_name_here’,'extra_args_here’) ?>

Please use this wherever, I want to see my work out!

Modify, modify, modify as well but PLEASE leave the author statement intact, add yourself as a second author if you want.

/**
* @author Ben Stolovitz <ben@stolovitz.com>
*
* @uses wp_parse_args
* @uses get_terms
* @uses get_bloginfo
*
* @param string $taxonomy Required. The taxonomy you want to list.
* @param array $args Optional. Override default arguments.
* @return string Returns an HTML list of items in a taxonomy.
*/
function bs_list_taxonomies($taxonomy, $args=”) {
$defaults = array(
‘title_li’ => ucfirst($taxonomy),
‘echo’ => 1,
‘tack_on’ => 1,
‘no_value’ => ‘None’,
‘no_value_link’ => ”
);
$r = wp_parse_args( $args, $defaults );
$term = get_terms($taxonomy);
$output = ‘<li> ‘ . $r['title_li'] . ‘ <ul>’;
if ( $r['tack_on'] ) {
foreach ($_GET as $key => $value) {
if ($key != “C” && $key != $taxonomy) {  // We don’t want duplicates of our taxonomy
if ( $querystring ) $querystring .= ‘&’;
$querystring .= $key.”=”.$value;
}
}
}
if ( ! $_GET[$taxonomy] ) {$a = ‘current_item’;} else {$a = ”;}
if ( $querystring ) {
$output .= ‘<li><a title=”‘ . $r['no_value'] . ‘” href=”‘ . get_bloginfo(url) . ‘/?’ . $querystring . ‘”>’;
} else {
$output .= ‘<li><a title=”‘ . $r['no_value'] . ‘” href=”‘ . get_bloginfo(url) . ‘/’ . $r['no_value_link'] . ‘”>’;
}
$output .= $r['no_value'] . ‘</a></li>’;
foreach ($term as $current) {
if ( $_GET[$taxonomy] == $current ) {$a = ‘ current_item’;} else {$a = ”;}
if ( $querystring ) {$b = ‘&’; } else {$b = ”;}
$output .= ‘<li><a title=”‘ . $current->name . ‘” href=”‘ . get_bloginfo(url) . ‘/?’ . $querystring . $b . $current->taxonomy . ‘=’ . $current->slug . ‘”>’;
$output .= $current->name;
$output .= ‘</a></li>’;
}
$output .= ‘</ul></li>’;
// $output=apply_filters( whatever_you_want, $output);
if ( $r['echo'] ) {
echo $output;
} else {
return $output;
}
}

Last Sunlight (on DeviantART)

Thursday, December 17th, 2009

Here‘s a wee little pencil drawing that I made and posted on DeviantART

Delays, Delays, and a Site in a Week

Saturday, December 5th, 2009

Ugggh…

I just switched to a new computer, just got a notification that PerfectPonchos is due in a week, and – in short- will not be able to finish Ben.Stolovitz.com for a few weeks….

Ben.Stolovitz.com

Wednesday, November 18th, 2009

Why is my site in the title? Hmm…
(more…)

Michelle Piano

Saturday, November 7th, 2009

Ignoring the annoying hiss and the  slight cutoff of loud noises, its actually a mildly decent recording of Michelle by The Beatles.

It is a study of the rule of distribution for piano (as you know the real song has no piano).

Listen now!

Michelle (Piano ver. of Beatles song _Michelle_)

The Underappreciated Winner: In Praise of Humble Windows

Saturday, October 31st, 2009

Windows XP came out in 2001, to much of the same criticisms as Windows Vista. Its “new and revolutionary” interface was criticized as being clutterful and having LUA (Least User Access) bugs. Windows XP was loathed when it came out. It was hated for being too different from the norm, for forcing users to change how they looked at a computer, for simplifying the desktop. But there is a strange familiarity that echoes through the “horrible” OS whenever I boot it up, just as there is for most people. There are reasons that I will never completely leave Windows for Mac or Ubuntu.

(more…)

Michelle

Saturday, October 10th, 2009

Michelle, ma belle, sont les mots qui vont tres bien ensemble, tres bien ensemble.

Video coming!

Windows cannot find ‘God’

Sunday, September 27th, 2009

Windows Cannot Find God

I think it speaks for itself.