- Friday the 13
- Real Homes of Genius: Today we salute you Compton and Pasadena. Construction Quality and Location Actually Matter for the Economy.
- Left 4 Dead PC Game Download $25
– Cheap price if you haven’t picked this up yet. - Hey Obama, subsidize my rent, too!
– “The subsidy would allow servicers to adjust the loan terms without having the mortgage’s investors take a loss, which should make them more open to the loan modification.” – So instead we the tax payer get stuck with the loss because of someone’s greedy irresponsibility. - American Recovery and Reinvestment Act of 2009 Highlights
- userfriendly : 12 feb 2009 (12412)
- State of the State: California Budget and Housing Situation. Backroom Deals, Screaming for Paulson, and Understanding Revenues.
- userfriendly : 11 feb 2009 (12411)
- Commentary Online
– Despite Franklin Roosevelt’s aggressive spending, unemployment reached 25 percent in 1933, fell only to 14 percent by 1937, and was back up to 19 percent in 1939. In the end, the New Deal did little or nothing to resuscitate the economy. - Ruin Your Health With the Obama Stimulus Plan
– “The issue is too important to be stalled by Senate protocol.”
Show AdSense to Google Search visitors in WordPress
I put AdSense ads on my WordPress plugin pages since the donation button wasn’t exactly raking in the dough. I inserted my AdSense code straight into these pages’ content. Looking through some of my stats I noticed a few of my posts got lots of hits from Google Search that would be good for ads. I didn’t want to show ads to my friends and normal readers so I went looking for a simple solution.
I borrowed some of the code used in this post, http://www.scratch99.com/2008/01/shylock-adsense-plugin-hack-to-avoid-adsense-smart-pricing/. One template function checks the referrer, if it returns true then you display your AdSense code in your post template, single.php in my case. This goes in your functions.php:
function scratch99_fromasearchengine(){
$ref = $_SERVER['HTTP_REFERER'];
$SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');
foreach ($SE as $source) {
if (strpos($ref,$source)!==false) return true;
}
return false;
}
and this goes in your post template where you want the ads to be displayed:
<?php if (function_exists('scratch99_fromasearchengine')) {
if (scratch99_fromasearchengine()) { ?>
INSERT YOUR ADSENSE CODE HERE
<?php } } ?>
And that’s it. Visitors coming in from Google and some other search engines will have whatever ad you want displayed. There are plugins that will do this all for you, but this is simple enough to build straight into your theme. The only downside is if you are using caching, but odds are only your older posts are going to be getting hits from Google. If a page happened to get cached with the AdSense code inserted then everyone will see the ads. Not really a big deal to me, but just something to be aware of.
Blog CSS makeover
Did a little work on my blog’s theme to bring it up to speed with WordPress 2.7. Been using the same theme with a few modifications since WP 1.5 so it was time for a little refresh. List of changes:
- New font and font sizes.
- Reset all padding and margins. This made it easy to get consistent spacing across the entire site using margins only.
- New comments output with gravatar support. Using the new wp_list_comments function with a custom callback to separate trackbacks.
- Moved header text down so the tails of the Y’s go into the background of the main column, that’s the extent of my creativity.
- Category and tag pages only show excerpts now.
- Edited robots.txt and sitemap.xml to avoid Google indexing duplicate content on archive pages.
- Increased total container width to 895px, my stats show only about 1.2% of people who visit my blog are on 800 x 600 so there’s no point in designing for them anymore.
- Added code to show Google AdSense to visitors coming straight from a Google search. Did that about a month ago, I’ve made $7 in February so far.
New Nikon 35mm f/1.8 AF-S DX lens
Nikon just announced the AF-S DX NIKKOR 35mm f/1.8G this week. I promptly placed a preorder at Amazon.
If you own a D40/D40x/D60 then this little $200 lens should be on your list. Previously the 50mm f/1.8 was the only affordable way to get a fast prime from Nikon, but without the AF-S you don’t get autofocus on these cheaper cameras. Also, on the DX cameras, the 50mm becomes 75mm which is a bit long. The 35mm becomes a 52.5mm which is much closer to the traditional “normal” 50mm on a film camera.
This lens focuses closer than the 50mm (less than 1ft vs about 1.5ft) and should be noticeably wider. Looking forward to its release in March.
Shared Google Reader Items #10
- The era of greed is over, right?
- The Problem with Bailouts and “Stimulation”
- The End of the 6% Commission: Examining the National Association of Realtors and why Agents and Lenders are Going the way of the Travel Agent.
– Real Estate agents could easily go the way of the travel agent if they don’t. Seriously, what do you need a fully commissioned agent for anymore. Zillow and Redfin FTW. - Blair Holt's Firearm Licensing Legislation
– And the gun restriction legislation begins, this is only the beginning folks, bans will follow. The licensing system in H.R. 45 makes our already restricted rights in California look lavish. If you own a qualifying gun (any handgun or semi-auto with magazine) you pretty much have to pay the government and jump through hoops to avoid becoming a FELON. - $15,000 Homebuyer Tax Credit
- Obama's Spinning on Stimulation Plan?
- Make Homemade Vanilla Extract
– Mmmm I love vanilla, might have to try this with rum. - Furniture Ad Win