AS2 Disable Underlying Buttons

Create a new movie clip to block the content underneath and apply the following ActionScript:

mc_target.onRollOver = function () {};
mc_target.useHandCursor = false;

Register the empty function so Flash will treat the movie clip like a giant button so that none of the underlying buttons will be active. Add the useHandCursor property to keep the pointer hand from showing up.

Finding Lattitude and Longitude on Google Maps

Here is an easy little trick to extrapolate the latitude and longitude coordinates from Google Maps. The coordinates reflect the center of the map so make sure that you have your location centered first. Once you have it all lined up, paste this code into the address bar of your browser:

javascript:void(prompt(”,gApplication.getMap().getCenter()));

Brilliant!

Links

www.tech-recipes.com/google_maps_get_latitude_longitude_values/

Adding <head> Files in a WordPress Template

Problem: want to create a WP Template that uses a different CSS file from the Theme CSS so that the HTML structure remains the same but the Template layout will be different, dictated by the CSS. It works to put a <link> to the CSS in the Template HTML but then it gets rendered in <body> instead of the <head>, which is a little wonky. How to get the CSS into the <head>?

Solution: Insert this PHP code into the beginning of your Template file before the get_header() call…

<?php
function mytemplate_head () {

echo ‘<link rel=”stylesheet” type=”text/css” href=”‘ . get_bloginfo(‘template_directory’) . ‘/mytemplate.css” />’;

}
add_action ( ‘wp_head’, ‘mytemplate_head’ );
?>

Links

get_bloginfo
add_action
get_header

Twitter Post Updates to your Facebook-ness

So after you login to your Facebook profile, if you click on the “Applications” tab in the bottom left corner of the screen on the bottom control bar, you see this page full of applications. Although none of them are flesh-eating reptiles, you can find a way to add your Titter updates to your Facebook shizzle. If you are still reading this, you may understand…

  • Facebook -> Applications -> Browse Applications
  • At the “Search Applications” field at the top right, enter “Twitter”
  • Add the top result application entitled “Twitter”
  • Add it, give your Twitter login, allow to access your profile, add the box, etc. money, to the from world is full of champagne and bacon.
  • Congrats, you survived.


Image Gallery Revamped

The image gallery has been revamped to fit into the new iframe structure of our version 3 site. To check it out, click on the “Archives” link, then “image” link in the sidebar nav.

The animations utilize the Javascript Motion Tween classes written by Philippe Maegerman from Brussels, Belgium. Thanks, Pim!

Links

jstween.blogspot.com

Some Good WordPress Hacks

Impact sent us a link to this article about some useful WordPress hacks:
http://www.smashingmagazine.com/2009/04/15/10-exceptional-wordpress-hacks/

The ninth entry, “Highlight Searched Text In Search Results” is a tiny code snippet god-send if you are regular expression illiterate like us:

<?php
$content = nl2br ( strip_tags ( get_the_content ( __( 'more…' ) ) ) );
$keys = explode ( " ", $s );
$content = preg_replace ( "/(" . implode ( "|", $keys ) . ")/iu",

'<strong class="search-excerpt">\0</strong>',
$content);

?>

Works like a champ!

There is also another helpful trick in this article. Up at number four, “Create A Maintenance Page For Your WordPress Blog”. This one is an .htaccess modification to keep visitors from seeing your site while you are making updates…

RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
RewriteRule $ /maintenance.html [R=302,L]

Replace the IP Address with yours and you’ll be able to see your pages but everyone else will get redirected to the maintenance.html page. Brilliant!