Archive

Archive for the ‘WEB TOOLS’ Category

Google launches Google Drive, upgrades Gmail to 10 GB for all users

April 26, 2012 Leave a comment

Google has launched Google Drive, a cloud storage service where users can upload and access all of their files, including videos, photos, Google Docs, PDFs and beyond. The service is offering new users 5GB of storage for free with upgrades starting at 25GB for $2.49/month, 100GB for $4.99/month or even 1TB for $49.99/month. Google also increased the free storage in Gmail from the existing 7.5 GB to 10 GB to all users.

“Drive is built to work seamlessly with your overall Google experience. You can attach photos from Drive to posts in Google+, and soon you’ll be able to attach stuff from Drive directly to emails in Gmail. Drive is also an open platform, so we’re working with many third-party developers so you can do things like send faxes, edit videos and create website mockups directly from Drive. To install these apps, visit the Chrome Web Store—and look out for even more useful apps in the future,” Sundar Pichai, SVP, Chrome and Apps, Google has said.

Advantage of jQuery over JavaScript Tools

March 29, 2012 Leave a comment

There are many ways in building an Ajax based application. Developers who are proficient in JavaScript can directly write the code and weave it with HTML and XML to build a good looking website. Those who are not familiar with JavaScript could go for frameworks to easily build an application with the programming language they are familiar with.

There are also JavaScript developers who have opted in using these frameworks to build lightweight yet highly interactive online applications.

One of the well known tools in building an efficient Ajax based application is jQuery. This programming language is often used in developing plug-ins for JavaScript and Ajax based applications. This language has been very successful in its role as a plug-in development tool that it can be used to build an entirely new JavaScript or Ajax based applications.

There are other tools that are similar to jQuery but it has stood out in its performance for varying reasons.

Prototype and mooTools are libraries that provide usable functions in JavaScript applications. However, these libraries often slow down the application if they are not properly tested. The global namespace of the application isn’t properly distributed most of the time.

This is due to the fact that these libraries aim to be as exact as possible. As a result, they would limit certain functions from extending their use. JQuery tackles this problem by extending the functions of JavaScript. Since the coding is local, it will never be shared to other languages.

jQuery is also recognized to be an improvement when developers transfer their functions from YUI to jQuery. Yahoo’s framework for developers has its advantages. Developers could easily build an Ajax and JavaScript plug-ins with the help of easy to use interface of YUI. However, the application is too simple for additional developments. Developers will be greatly limited on what they could do in a plug-in.

You’ll also be forced to use YAHOO.util.Dom.getElementsByClassName() which is very limiting since the server will be focused on processing data and Yahoo will take care of the functions. Although Yahoo is reliable, it can’t be counted for faster and more interactive applications.

jQuery is also better when compared to Dojo. But that doesn’t mean that Dojo is bad in itself. This highly powerful framework could build highly interactive Ajax based applications in no time. The functions are very extensive and once the developer is familiar with Dojo, the options are almost unlimited.

However, mastering Dojo is like mastering a brand new programming language. It would usually take months before a decent application is built with the help of Dojo. jQuery on the other hand, is originally an easy to use plug-in tool. Developers could easily build an application with the help of jQuery in days only. jQuery also offers almost the same functionality and options as Dojo.

If you’re planning to build a highly interactive application, jQuery should be one of your choices. It’s easy to use and easy to figure out and will ultimately have the same effect compared to other tools for Ajax development.

Displaying Latest Twitter Feeds

March 29, 2012 1 comment

PHP Function to Displaying Latest Twitter Feeds

<?php

function display_latest_tweets(
$twitter_user_id, $cache_file = ‘./twitter.txt’,
$tweets_to_display = 100, $ignore_replies = false,
$twitter_wrap_open = ‘<h2>Latest tweets</h2><ul id=”twitter”>’,
$twitter_wrap_close = ‘</ul>’, $tweet_wrap_open = ‘<li><span class=”status”>’,
$meta_wrap_open = ‘</span><span class=”meta”> ‘, $meta_wrap_close = ‘</span>’,
$tweet_wrap_close = ‘</li>’, $date_format = ‘g:i A M jS’, $twitter_style_dates = false) {
// Seconds to cache feed (1 hour).
$cachetime = 60*60;

// Time that the cache was last filled.
$cache_file_created = ((@file_exists($cache_file))) ? @filemtime($cache_file) : 0;

// A flag so we know if the feed was successfully parsed.
$tweet_found = false;

// Show file from cache if still valid.
if (time() – $cachetime < $cache_file_created) {
$tweet_found = true;

// Display tweets from the cache.
@readfile($cache_file);
}
else {
// Cache file not found, or old. Fetch the RSS feed from Twitter.
$rss = @file_get_contents(‘http://twitter.com/statuses/user_timeline/&#8217;.$twitter_user_id.’.rss’);
if($rss) {
// Parse the RSS feed to an XML object.
$xml = @simplexml_load_string($rss);

if($xml !== false) {
// Error check: Make sure there is at least one item.
if (count($xml->channel->item)) {
$tweet_count = 0;
// Start output buffering.
ob_start();

// Open the twitter wrapping element.
$twitter_html = $twitter_wrap_open;

// Iterate over tweets.
foreach($xml->channel->item as $tweet) {
// Twitter feeds begin with the username, “e.g. User name: Blah”
// so we need to strip that from the front of our tweet.
$tweet_desc = substr($tweet->description,strpos($tweet->description,”:”)+2);
$tweet_desc = htmlspecialchars($tweet_desc);
$tweet_first_char = substr($tweet_desc,0,1);

// If we are not gnoring replies, or tweet is not a reply, process it.
if ($tweet_first_char!=’@’ || $ignore_replies==false) {
$tweet_found = true;
$tweet_count++;

// Add hyperlink html tags to any urls, twitter ids or hashtags in the tweet.
$tweet_desc = preg_replace(‘/(https?:\/\/[^\s”<>]+)/’,'<a href=”$1″>$1</a>’,$tweet_desc);
$tweet_desc = preg_replace(‘/(^|[\n\s])@([^\s”\t\n\r<:]*)/is’, ‘$1<a href=”http://twitter.com/$2″>@$2</a>&#8217;, $tweet_desc);
$tweet_desc = preg_replace(‘/(^|[\n\s])#([^\s”\t\n\r<:]*)/is’, ‘$1<a href=”http://twitter.com/search?q=%23$2″>#$2</a>&#8217;, $tweet_desc);

// Convert Tweet display time to a UNIX timestamp. Twitter timestamps are in UTC/GMT time.
$tweet_time = strtotime($tweet->pubDate);
if ($twitter_style_dates) {
// Current UNIX timestamp.
$current_time = time();
$time_diff = abs($current_time – $tweet_time);
switch ($time_diff) {
case ($time_diff < 60):
$display_time = $time_diff.’ seconds ago’;
break;
case ($time_diff >= 60 && $time_diff < 3600):
$min = floor($time_diff/60);
$display_time = $min.’ minutes ago’;
break;
case ($time_diff >= 3600 && $time_diff < 86400):
$hour = floor($time_diff/3600);
$display_time = ‘about ‘.$hour.’ hour’;
if ($hour > 1){ $display_time .= ‘s’; }
$display_time .= ‘ ago’;
break;
default:
$display_time = date($date_format,$tweet_time);
break;
}
}
else {
$display_time = date($date_format,$tweet_time);
}

// Render the tweet.
$twitter_html .= $tweet_wrap_open.$tweet_desc.$meta_wrap_open.'<a href=”http://twitter.com/&#8217;.$twitter_user_id.'”>’.$display_time.'</a>’.$meta_wrap_close.$tweet_wrap_close;
}

// If we have processed enough tweets, stop.
if ($tweet_count >= $tweets_to_display) {
break;
}
}

// Close the twitter wrapping element.
$twitter_html .= $twitter_wrap_close;
echo $twitter_html;

// Generate a new cache file.
$file = @fopen($cache_file, ‘w’);

// Save the contents of output buffer to the file, and flush the buffer.
@fwrite($file, ob_get_contents());
@fclose($file);
ob_end_flush();
}
}
}
}

// In case the RSS feed did not parse or load correctly, show a link to the Twitter account.
if (!$tweet_found) {
echo $twitter_wrap_open.$tweet_wrap_open.’Oops, our twitter feed is unavailable right now. ‘.$meta_wrap_open.'<a href=”http://twitter.com/&#8217;.$twitter_user_id.'”>Follow us on Twitter</a>’.$meta_wrap_close.$tweet_wrap_close.$twitter_wrap_close;
}
}

display_latest_tweets(‘<twitter-username>’);

?>

Will IE9 change the way we use the web?

September 20, 2010 Leave a comment

Microsoft’s newest web browser, Internet Explorer 9, sees the technology giant wrest some of the initiative from its rivals

The internet of the future is likely to look very different from the distinct pages and sites we visit today – that was the message as Microsoft launched the latest version of their much-maligned Internet Explorer web browser. And while every major manufacturer always claims that theirs is a revolutionary product, the company that remains best known for Windows and Office might just be on the right track this time. Headlines around the world greeted IE9 as Microsoft’s most ambitious yet, while others called it revolutionary. Respected British website Techradar.com went so far as to call it “ie-mazing”.

Almost since it launched Internet Explorer in 1995, the browser has been troublesome for Microsoft. Even when it was in use by 95 percent of all web users in 2002, a tech-savvy audience maintained that it was not the best option available. Firefox, the now-defunct Netscape Navigator and more recently Google Chrome have set the pace for speed and ease of use. With usage now down to less than two-thirds of the online population Microsoft has staged a fightback that, for once, appears to be winning many experts round, even if browsers are all starting to look more similar anyway.

At the heart of IE9, however, are two key features: the first is a bid to make websites more like applications, which means that the depth of features of, say Microsoft Word, could also be available to any site where developers have sufficient resources. In practice a chunk of that is largely cosmetic, but it’s a visual change that makes a genuine difference to the way people use the web. In the words of Microsoft’s Leila Martine, head of Windows in the UK, “it’s making web pages first class citizens”. Given that users spend around half their time using a computer online, some might argue this is rather overdue.

Secondly, however, is the integration between hardware and software: with the advance of new web programming language HTML5, Microsoft is now able to offload much of the burden of processing graphics onto computer hardware that’s built for the job, the graphics processing unit (GPU). This means that web pages are rendered at significantly greater speed – in a demo, the company showed IE9 to be at least five times quicker than Google Chrome.

It’s the combination of these two features, primarily, that Microsoft hopes will have a transformative effect on the internet: the download site for IE9 is called “beautyoftheweb.com“, and in some of the company’s demos there clearly are new possibilities. Amazon, for instance, has built a site called Bookshelf, which combines the best bits of browsing in a bookshop – looking at covers, getting a sense of what else is around – with providing useful additional information about titles and genres. The effect is genuinely unlike anything else that other browsers can produce successfully.

All this is not to say, however, that the web will change instantly. And anyway, Google, Firefox and other browsers are all heading in the same direction. But what’s certain is that the development of applications, both for the web and for the iPhone and other mobile devices, has made many companies notice that the internet on a desktop or laptop PC was starting to feel strangely limited: Microsoft has tried to solve this by tightly integrating IE9 with Windows 7, as Google will when it launches its equivalent Chrome operating system. What that means is that, in future, the line between being online and simply using a computer may become indistinguishable – but broadband, mobile phone and wifi providers will have to sort out getting us all connected first.

PHP 4 and MySQL 4 End of Life Announcement

July 31, 2010 Leave a comment

WordPress has always been to make it run on common server configurations. WordPress has want users to have flexibility when choosing a host for their precious content. Because of this strategy, WordPress runs pretty much anywhere. Web hosting platforms, however, change over time, and occasionally are able to reevaluate some of the requirements for running WordPress. Now is one of those times. You probably guessed it from the title — we’re finally ready to announce the end of support for PHP 4 and MySQL 4!

First up, the announcement that developers really care about. WordPress 3.1, due in late 2010, will be the last version of WordPress to support PHP 4.

For WordPress 3.2, due in the first half of 2011, we will be raising the minimum required PHP version to 5.2. Why 5.2? Because that’s what the vast majority of WordPress users are using, and it offers substantial improvements over earlier PHP 5 releases. It is also the minimum PHP version that the Drupal and Joomla projects will be supporting in their next versions, both due out this year.

The numbers are now, finally, strongly in favor of this move. Only around 11 percent of WordPress installs are running on a PHP version below 5.2. Many of them are on hosts who support PHP 5.2 — users merely need to change a setting in their hosting control panel to activate it. We believe that percentage will only go down over the rest of the year as hosting providers realize that to support the newest versions of WordPress (or Drupal, or Joomla), they’re going to have to pull the trigger.

In less exciting news, we are also going to be dropping support for MySQL 4 after WordPress 3.1. Fewer than 6 percent of WordPress users are running MySQL 4. The new required MySQL version for WordPress 3.2 will be 5.0.15.

WordPress users will not be able to upgrade to WordPress 3.2 if their hosting environment does not meet these requirements (the built-in updater will prevent it). In order to determine which versions your host provides, wordpress created the Health Check plugin. Right now, Health Check will only tell you if you’re ready for WordPress 3.2. In a future release it will provide all sorts of useful information about your server and your WordPress install, so hang on to it!

In summary: WordPress 3.1, due in late 2010, will be the last version of WordPress to support PHP 4 and MySQL 4. WordPress 3.2, due in the first half of 2011, will require PHP 5.2 or higher, and MySQL 5.0.15 or higher.

WordPress 3.0.1

July 31, 2010 Leave a comment

After nearly 11 million downloads of WordPress 3.0 in just 42 days, releasing WordPress 3.0.1. The requisite haiku:

Three dot oh dot one
Bug fixes to make you smile
Update your WordPress

This maintenance release addresses about 50 minor issues. The testing many of you contributed prior to the release of 3.0 helped make it one of the best and most stable releases.

Download 3.0.1 or update automatically from the Dashboard > Updates menu in your site’s admin area.

WordPress 3.0 Release Candidate


First release candidate (RC1) for WordPress 3.0 is now available. What’s an RC? An RC comes after beta and before the final launch. It means we think we’ve got everything done: all features finished, all bugs squashed, and all potential issues addressed. But, then, with over 20 million people using WordPress with a wide variety of configurations and hosting setups, it’s entirely possible that we’ve missed something. So! For the brave of heart, please download the RC and test it out (but not on your live site unless you’re extra adventurous). Some things to know:

  • Custom menus are finished!
  • Multi-site is all set.
  • The look of the WordPress admin has been lightened up a little bit, so you can focus more on your content.
  • There are a ton of changes, so plugin authors, please test your plugins now, so that if there is a compatibility issue, we can figure it out before the final release.
  • Plugin and theme *users* are also encouraged to test things out. If you find problems, let your plugin/theme authors know so they can figure out the cause.
  • There are a couple of known issues.

If you are testing the RC and come across a bug, you can:

Download WordPress 3.0 RC1

Source: WordPress.org

Secure File Permissions Matter

April 26, 2010 Leave a comment

Summary: A web host had a crappy server configuration that allowed people on the same box to read each other’s configuration files, and some members of the “security” press have tried to turn this into a “WordPress vulnerability” story.

WordPress, like all other web applications, must store database connection info in clear text. Encrypting credentials doesn’t matter because the keys have to be stored where the web server can read them in order to decrypt the data. If a malicious user has access to the file system — like they appeared to have in this case — it is trivial to obtain the keys and decrypt the information. When you leave the keys to the door in the lock, does it help to lock the door?

A properly configured web server will not allow users to access the files of another user, regardless of file permissions. The web server is the responsibility of the hosting provider. The methods for doing this (suexec, et al) have been around for 5+ years.

I’m not even going to link any of the articles because they have so many inaccuracies you become stupider by reading them.

If you’re a web host and you turn a bad file permissions story into a WordPress story, you’re doing something wrong.

WordPress 3.0, Beta 1

April 8, 2010 1 comment

This is an early beta. This means there are a few things we’re still finishing. We wanted to get people testing it this weekend, so we’re releasing it now rather than waiting another week until everything is finalized and polished. There’s a ton of stuff going on in 3.0, so this time we’re giving you a list of things to check out, so that we can make sure people are testing all the things that need it.

You Should Know:

  • The custom menus system (Appearance > Menus) is not quite finished. In Beta 2, the layout will be different and a bunch of the functionality will be improved, but we didn’t want to hold things up for this one screen. You can play with making custom menus, and report bugs if you find them, but this is not how the final screen will look/work, so don’t get attached to it.
  • The merge! Yes, WordPress and WordPress MU have merged. This does not mean that you can suddenly start adding a bunch of new blogs from within your regular WordPress Dashboard. If you’re interested in testing the Super Admin stuff associated with multiple sites, you’ll need some simple directions to get started.
  • We’re still fiddling with a few small things in the UI, as we were focused on getting the more function-oriented code finished first. For example, we’re getting a new icon for the Super Admin section.

Things to test:

  • Play with the new default theme, Twenty Ten, including the custom background and header options.
  • Custom Post Type functionality has been beefed up. It’s really easy to add new types, so do that and see how it looks!
  • WordPress MU users should test the multiple sites functionality to make sure nothing broke during the merge.

Already have a test install that you want to switch over to the beta? Try the beta tester plugin.

Testers, don’t forget to use the wp-testers mailing list to discuss bugs you encounter.

We hope you like it! And if you don’t, well, check back when beta 2 is ready. :)

Download the WordPress 3.0 Beta 1 now!