Archive for the ‘ Uncategorized ’ Category

Bring back ‘pop-ups’ for Share and Follow plug-in

Making sharing sane again

Yes, it CAN be done I think

.
Share and Follow — a great WordPress plug-in! Let’s make it better :-)

As we all know, recent browsers make doing ‘pop-ups’ difficult. So we’ve had to fall back on accepting entire new tabs opening for sharing stuff, when a nice ‘pop-up’ like the good old days would be sooo much nicer.

Well, fear not … I believe I’ve found the solution — and without using code injection for simulated windows or anything else complicated and troublesome like that.

The trick is to use the ‘modal=yes’ flag. Like so …

window.open('http://some.url','shareme','height=480,width=600,modal=yes,alwaysRaised=yes');

… and viola! It seems to work on all modern browsers. (You’ll need to test that yourself of course.)

See here for my example of the current plug-in (functions.php) modified to ‘pop up’ — well not quite. There’s a subtle difference! This doesn’t get caught/blocked by pop-up blockers (and shouldn’t ever) and doesn’t end up in a new tab either …

if($twitter=='yes')
{
 if ($css_images=='yes'){$html .="<li class=\"".$list_style."\"><a rel=\"nofollow\" target=\"_blank\" class=\"twitter\" href=\"#\" onClick=\"var shareWin=window.open('http://twitter.com/home/?status=".urlencode($page_link)."','share','height=480,width=600,modal=yes,alwaysRaised=yes'); shareWin.focus(); return false;\" title=\"".sprintf(__('Tweet this %s - %s','share-and-follow'),pagepost($page_id),$page_title)."\"><span class=\"head\">".stripslashes  ($twitter_share_text)."</span></a></li>";
}
if ($css_images=='no')
{
 $html .="<li class=\"".$list_style."\"><a rel=\"nofollow\" target=\"_blank\" href=\"#\" onClick=\"var shareWin=window.open('http://twitter.com/home/?status=".urlencode($page_link)."','share','height=480,width=600,modal=yes,alwaysRaised=yes'); shareWin.focus(); return false;\" title=\"".sprintf(__('Tweet this %s - %s','share-and-follow'),pagepost($page_id),$page_title)."\"><img src=\"".WP_PLUGIN_URL."/share-and-follow/default/$size/twitter.png\" height=\"".$size."\"  width=\"".$size."\" /> <span class=\"head\">".stripslashes  ($twitter_share_text)."</span></a></li>";}
}

I’ve got this working on this site presently for Facebook and Twitter. Give it a go! If it doesn’t work for you, please let me know what browser you are using. Thanks!

Free games for my kids?

A friend of mine was recently bemoaning to be about the cost of gaming consoles and his kids wanting this and that and how the winter season here in New Zealand is just going to make finding things for his kids to do more challenging… and all that good parenting stuff.

He needed some info, so I did what I always do… I told him to Google for info on ‘games for kids’. We straight away found the coolest site, www.gameforkids.info, which I have to admit, I got so totally addicted to myself that I stayed up late playing and got for myself the meanest headache the next day for the late late night! Doh! Maybe the site should be GameForDads.info! LOL

Being a Gen-X, having grown up through the 70′s and 80′s,  I was amazed that all these games that required the latest game consoles or fastest computers when I was a kid are now so easily playing inside a Flash(tm) window in your web browser!

I personally especially like the following three games on gameforkids.info

So yeah — with 100 plus games to choose from and every one free, I reckon me mates kids will have plenty to keep them occupied on wet wintery days. That is, if their dad will let them near the computer once he starts playing Bloxorz! hehe