Michael Heilemann.
If you have Dunstan's Time Since installed, this plugin uses it for the title="" attributes on the comments and posts. (For WordPress 1.5) Author: Brian Meidell Author URI: http://meidell.dk/ Version 1.5: Now works without LOCK TABLE and CREATE TEMPORARY TABLE priviledges. Version 1.5.1: Can't remember what I did here Version 1.5.2: Fixed count select statement to not include spammy comments Version 1.5.3: Properly excludes track- and pingbacks Version 1.5.4: Excludes posts that are not published, even if they have comments Version 1.5.5: Fade old comments, fixed bug that wreaked havoc with Time Since Version 1.5.6: Bugfix from Jonas Rabbe (http://www.jonas.rabbe.com/) pertaining to timesince Version 1.5.7: Bugfix so old colors can be darker than new colors (stupid oversight), thanks to http://spiri.dk for spotting it. Bugfix where single digit hex would cause invalid colors, thanks to http://www.wereldkeuken.be/ for the fix. Version 1.5.8: Updated to work with WordPress 2.1 alpha by M. Heilemann. */ function blc_latest_comments($num_posts = 5, $num_comments = 6, $hide_pingbacks_and_trackbacks = true, $prefix = "
  • ", $postfix = "
  • ", $fade_old = true, $range_in_days = 10, $new_col = "#444444", $old_col = "#cccccc") { global $wpdb; function clamp($min, $max, $val) { return max($min,min($max,$val)); } $usetimesince = function_exists('time_since'); // Work nicely with Dunstan's Time Since plugin (adapted by Michael Heilemann) // This is compensating for the lack of subqueries in mysql 3.x // The approach used in previous versions needed the user to // have database lock and create tmp table priviledges. // This uses more queries and manual DISTINCT code, but it works with just select privs. if(!$hide_pingbacks_and_trackbacks) $ping = ""; else $ping = "AND comment_type<>'pingback' AND comment_type<>'trackback'"; $posts = $wpdb->get_results("SELECT comment_post_ID, post_title FROM ($wpdb->comments LEFT JOIN $wpdb->posts ON (comment_post_ID = ID)) WHERE comment_approved = '1' AND $wpdb->posts.post_status='publish' $ping ORDER BY comment_date DESC;"); $seen = array(); $num = 0; if($fade_old) { $max_time = $range_in_days * 24 * 60 * 60 ; $r_new = hexdec(substr($new_col, 1, 2)); $r_old = hexdec(substr($old_col, 1, 2)); //$r_min = min($min, $max); //$r_max = max($min, $max); $r_range = ($r_old-$r_new); $g_new = hexdec(substr($new_col, 3, 2)); $g_old = hexdec(substr($old_col, 3, 2)); //$g_min = min($min, $max); //$g_max = max($min, $max); $g_range = ($g_old-$g_new); $b_new = hexdec(substr($new_col, 5, 2)); $b_old = hexdec(substr($old_col, 5, 2)); //$b_min = min($min, $max); //$b_max = max($min, $max); $b_range = ($b_old-$b_new); } // print "ranges: $r_range, $g_range, $b_range
    "; // print "r: ".(0.5*$r_range+$r_new)."
    "; foreach($posts as $post) { // The following 5 lines is a manual DISTINCT and LIMIT, // since mysql 3.x doesn't allow you to control which way a DISTINCT // select merges multiple entries. if(array_key_exists($post->comment_post_ID, $seen)) continue; $seen[$post->comment_post_ID] = true; if($num++ > $num_posts) break; $commenters = $wpdb->get_results("SELECT *, UNIX_TIMESTAMP(comment_date) AS unixdate FROM $wpdb->comments WHERE comment_approved = '1' AND comment_post_ID = '".$post->comment_post_ID."' $ping ORDER BY comment_date DESC LIMIT $num_comments;"); $count = $wpdb->get_var("SELECT COUNT(comment_ID) AS c FROM $wpdb->comments WHERE comment_post_ID = $post->comment_post_ID AND comment_approved = '1' ".$ping); $i = 0; $link = get_permalink($post->comment_post_ID); if($usetimesince) $title = " title=\"Last comment was ".time_since($comment->unixdate)." ago\""; else $title = ""; echo $prefix."".stripslashes($post->post_title). "  ".$count."
    \n"; foreach($commenters as $commenter) { if($usetimesince) $title = " title=\"Posted ".time_since($commenter->unixdate)." ago\""; if($fade_old) { $diff = time() - $commenter->unixdate; $r = round($diff/$max_time*($r_range))+$r_new; $r = clamp(min($r_new, $r_old), max($r_new, $r_old), $r); $g = round($diff/$max_time*($g_range))+$g_new; $g = clamp(min($g_new, $g_old), max($g_new, $g_old), $g); $b = round($diff/$max_time*($b_range))+$b_new; $b = clamp(min($b_new, $b_old), max($b_new, $b_old), $b); $r_hex = str_pad(dechex($r), 2, '0', STR_PAD_LEFT); $g_hex = str_pad(dechex($g), 2, '0', STR_PAD_LEFT); $b_hex = str_pad(dechex($r), 2, '0', STR_PAD_LEFT); $colstr = " style=\"color: #".$r_hex.$g_hex.$b_hex.";\""; } if($i++ > 0) echo ", "; echo "comment_ID."\"$title>".stripslashes($commenter->comment_author).""; } if($count > $num_comments) echo " [...]"; echo "".$postfix."\n"; } } ?> Waking Up to The American Dream | Pluranomics.com

    Small silhouette of Doug Wolkon WELCOME TO PLURANOMICS, THE ECONOMICS OF MANY.

    Waking Up to The American Dream

    The American Dream once strongly stood for ideal freedom. For as a child in America, we are so fortunately nagged about what we want to be when we grow up: a fireman? an astronaut? or how about an entrepreneur? The American Dream meant career choices for everyone in America!

    But somehow our freedom of choice that once so clearly encompassed the American Dream changed. Not sure when or how, but it clearly changed. For as I grew older, the American Dream became all about owning a home. What house, in what neighborhood, with how many bedrooms was all that we seemed to dream about. But then suddenly, the dream became a nightmare. 

    It has always been kind of a weird dream anyway. These are the biggest assets in our possession by far, yet we don’t really own them. The vast majority of us do not have $20,000 for the car we drive or $300,000 for the house we live in. Instead, we borrow the money to use them. Basically “I’ll pay ya later!” became the status quo.

    The nightmare seems to last longer now than it did just a month ago or even a week ago. Houses and cars continue to sit empty while more are still being built and others are being defaulted on. Inventories are still increasing as supply and demand run further away from meeting each other. Commercial real estate is the next big shoe to drop as hyper-deflation kicks in at the asset level across all property types. It will be a falling knife, so I would not try to catch it.

    So what happens? Does the nightmare continue or can we get back to dreaming about freedom? Well you remember the old motto, “you’re throwing away money paying rent”. Or, “it’s much better to own a home than to rent one”. Well, that is a fallacy in the face of the “Credit Crisis”; as credit to buy things has gone the way of the absence of trust that once reinforced it. Just like low mortgage rates and appreciating home prices ignited home ownership; now with real mortgage rates on the rise and prices falling, renting is and will be the default currency of choice.

    Cash will be king and the ability to pay anything today, as opposed to promise to pay tomorrow, will rule the day. Current “For Sale” signs will convert to “For Rent” signs as previous sellers rationally decide to get what they can by renting. When they will sell again, nobody knows. All we do know is that if you want to make something, anything of that vacant property, you better get somebody to rent it. 

    So in a depreciating real estate environment (i.e. falling rents), there are a lot more landlords than “credit”-worthy tenants. As a result, landlords better cozy up to any and all quality renters, because the savviest renters are now in charge.

    Waking up from The American Dream will not be easy for everyone. But those that figure out how to take advantage of rents that seem to be in a perpetual free fall will be the next big economic opportunists (hint: renewable energy utilities).

    But just as the economic game has changed, so has the dream. Things that used to seem so expensive like education will suddenly seem free (think internet not college); while suddenly other items like food and electricity will get relatively more expensive, but worth it at any cost (like in most other countries where food typically comprises at least 70% of living costs). So when dreaming about what you want to be when you grow up, focus on such essential items that are vital to power the sustainable cities and towns of the future.

    I assure you that The American Dream is certainly alive and well, it just may take time to get back to sleep after this nightmare. 

    Now let me go back to dreaming about what I want to be when I grow up.


    Related Posts

    comment_status) && ('open' == $post->ping_status)) : // Comments and trackbacks open ?> comment_status) && ('open' == $post->ping_status)) : // Only trackbacks open ?> comment_status) && !('open' == $post->ping_status)) : // Only comments open ?> comment_status) && !('open' == $post->ping_status)) : // Comments and trackbacks closed ?> ", ""); ?>

    2 Comments so far      Post a Comment

    1. Excellent article and awesome points, especially about renting vs. buying. We are currently renting and do not have plans to buy unless we can actually afford to do so (i.e. not doing what everyone else did in recent history).

      The American Dream has moved from the intangible to the tangible, and I think this was inevitable. As Americans, we like to see things with our own two eyes and hold things with our own two hands. We also like to impress others and will do anything to get the approval of strangers and family. The Dream is alive and well, but as you said, it just may take some time to get back to sleep after this nightmare.

      Again, excellent read!

    2. The argument for renting versus buying has been going on in the hallways of affordable housing programs and within organizations like HUD for the last 30 years. What I think is important to note is the differences in more evolved or mature housing markets in comparison the US. Europe has approximately 90% home ownership, but looking at the amount of time that it has taken to accomplish that versus the recent history of the US is the relevant point. In the US we are currently at approximately 65% home ownership, so the real question is “What is the correct % of home ownership we as a country should be shooting for, and by when” When you take the time to look at what the greatest generator of wealth has been for the American family, over multiple generations it is the ability to own a home. It is also one of the greatest feelings of pride, sense of place, upward economic mobility, and socio-economic foundations. When you put someone in a home and teach them how to stay in that home you can pry them out. I certainly know that even if short term it was the better decision economically to rent I would always aspire to own a home. Presuming you can afford it, there is no real debate against the concept of home ownership for all of the pluses that it brings.
      The problems that we are experiencing with the current slew of foreclosures are caused by two main failures of the system. The first failure is business models of lenders that focused on originations and then using the CMBS market as a disposition method. This encouraged lenders to put people in a house that did not know how to “stay in the house” because they lacked the necessary financial discipline or education to handle their credit based on their ability to service their debts. Our credit system is designed to take advantage of people in this way and even educated business owning “responsible people” have fallen prey to the seduction of money. On a more philosophical level that is more of a human condition that opens up a much larger conversation. As Jack Kemp, Moon Landrieu, Henry Cisneros, and Alphonso Jackson (all fmr secretary of the united states department of housing and urban development) all agree, putting people in houses is not and never will be the problem, teaching them how to stay in houses is where we fall woefully short.
      The second failure is related to human ability to choose self preservation over excessive greed. Alan Greenspan believed that the value of self preservation would override the opportunity for a company to make short term gains. It certainly makes sense, if you know that making a business transaction with drug dealers might cost you your life but you will make a huge sum of money then most people would opt to not participate in this type of self destructive activity. Unfortunately what we and Mr. Greenspan have learned is that once again there is a place for government and regulation because excessive greed seems to always win. When the underpinning of the CMBS market is tainted by “Liar Loans” “Stated Income- Zero Doc” loans, you can only create an environment of opportunistic undisciplined business practices and unfortunately, as always, it starts at the top. Please don’t misunderstand, I believe greed is not bad, it is a motivator, a driver, and is essential to a functional economic meritocracy. The history is now clear we had an interwoven web of liabilities that were misrepresented and underreported underpinning a 100 trillion dollar derivative market.
      In conclusion, I firmly believe in homeownership and that it is fundamentally an important piece to our socio-economic growth and the arguments are clear in that regard. I also believe that homeownership is not for everyone and we must get back to fundamentals. Unfortunately from a free market perspective this is going to come with new costly regulation and oversight and I wish I could make an argument against it, but history proves that I can’t.

    Post a Comment

    Your email is never published nor shared.
    All comments are held for approval and will not appear immediately.
    Links and paragraphs are formatted automatically.
    Some HTML is allowed… <a>, <strong>

    (will not be published)
    (optional)

    Subscribe to Comments