Archive for May, 2010

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!

PHP Web Hosting Explained

What is PHP?

PHP is short for ‘PHP Hypertext Preprocessor’ (an intentionally self-referencing looped term). PHP is a very widely used, server-side web programming language, designed from the ground up as a free platform for developing efficient dynamic web pages.

Advantages of PHP

PHP gained massive popularity over its first decade due in part because it was made available for free but mostly because of the many features and benefits PHP scripting language provided.

PHP is open source and therefore free to use under the terms of its license, including both personal and commercial use. Because PHP is an open source language, there is a huge community available for online assistance and learning. The large PHP community working on and contributing to the PHP project makes for a very secure and trustworthy application over all. PHP’s ever growing popularity ensures this trend will continue for years to come.

PHP is very easy to use and runs fast. Even a brand new or currently inexperienced web developer can learn the basics of PHP development in a very short period of time. PHP is very simple. HTML coders can integrate PHP programming straight into their existing pages. Also, if you are an experienced programmer, you can utilize some of the more advanced features of PHP to create powerful Web 2.0 websites.

MySQL

Arguably the greatest advantage of PHP is its ability to interact with MySQL databases. MySQL is used by popular web applications like, WordPress, osCommerce and PHP-BB, to name just a few. PHP is ideal for interfacing with MySQL. MySQL is used with PHP as server-side tool, thus PHP and MySQL make a fantastic team for webmasters wishing to automate their dynamic web sites.

What is PHP Web Hosting?

As the name suggests, PHP Web Hosting refers to a type of web hosting service that provides support for the PHP programming language. Make sure your web hosting company offers full PHP and MySQL support at a minimum of version 5 for both.

The best web hosting companies offer PHP hosting services as there is a lot of demand for the technology. When registering a hosting service, it is necessary to en sure that you will be provided with the latest version of the PHP and MySQL. Newer versions regularly appear and each time a new version comes, you want to be using a host that is keeping up with the play. Keeping u with the latest stable version of PHP is also important for ensuring you have the most secure systems available to you.

Affordable PHP Web Hosting

If you search the various options online, you will find that PHP hosting is in general much more affordable compared to other web hosting solutions. This is mainly PHP is an open source language and it therefore itself free. And it usually comes along with the popular database, MySQL, which is also free. The provider need only ensure the configuration of the software complies with state-of-the-art security methods.

What is cPanel?

cPanel is arguably the most heavily used and widely implemented all-in-one, high security PHP/MySQL supporting system available on the net today. When configured correctly, cPanel ensures that all system software, including PHP and MySQL and all supporting environments are maintained at the very latest, stable and secure versions. The cPanel goes further to provide extensive state-of-the art firewall and HTTP URL anti-hacker filtering to prevent attacks such as MySQL injection so that even poorly written PHP/MySQL websites receive relatively good security right at the front door. Whilst not recommended as a complete solution, these additional protections are indispensable for website developers who are more focussed on design than the detailed ins and outs of tight code security.

If you want your website to be safely protected, demand cPanel and ensure your provider keeps their system regularly updated at the latest, stable versions of all system software.

Ideal PHP Web Hosting

When you are looking for a host for your website, you need to know three basic things:

First, ensure the service has enough bandwidth to meet your website requirement.

Second, there should be enough disk space available for not just your current needs, but also your future development. Most providers allow you to start small and grow as your needs expand.

And third, the hosting package should provide you with sufficient databases for your web site requirements. Most sites require only one database, but if you intend running several different applications on your domain, you may need more.

NZ Hosting is a leading New Zealand web hosting company, who offers REAL 24/7 support via email and live-chat for client’s satisfaction. We never overload our server. All of our plans include the latest industry features available on the market. We cater for the personal blog as well as the multiple websites for large business group. Our packages are equipped with the features needed to meet all of your requirements.

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