Archive for the ·

Open Source

· Category...

WordPress 2.9 notes

no comments

Batch Plug-in Update in Word Press

When Word Press introduced one click upgrade for pluggins, it was like Christmas in July. But this time maybe on the actual Christmas or perhaps slightly earlier with the release of Word Press 2.9, we will now be able to upgrade multiple pluggins with one click from our WordPress Admin Panel.

Optimize/Repair Database Functionality

WordPress has added a new feature to the core which allows you to repair and optimize your database. In order to activate this function, you will need to add this line in your wp-config.php

define(‘WP_ALLOW_REPAIR’, true);

Once you have added it, you will now be able to run the script which is located at this URL:

http://www.yoursite.com/wp-admin/maint/repair.php

WordPress Recycle Bin / Trash

One useful thing most desktop operating systems have is the trash bin or recycle bin. WordPress has now added similar functionality; instead of permanently deleting posts, pages, and the comments, you can now trash it and then later on empty the trash once you are completely done with what you were doing. By default WordPress will empty the trash every 30 days, but you can change the time limit by simply entering the following code in your wp-config.php:

define( ‘EMPTY_TRASH_DAYS’, 10 );

Image Editor

The image editor is something that a lot of users were waiting for and it is included in this release. This editor will let you make simple changes such as cropping, rotating, scaling, etc.

Ability to add Post Thumbnails

You have probably seen many sites displaying posts on the homepage with a post thumbnail. Or many sites having the post thumbnail next to each post in their index. Before version 2.9, it was done through custom fields. In this release, you can simply add the thumbnail when writing the post and displaying it in the template is even easier.

In order for you to have this functionality available in the admin panel, you must have a theme that supports this function. However, a quick way to add it now is to visit your theme’s functions.php and add the following code:

add_theme_support( ‘post-thumbnails’ );

Once you choose the thumbnail, you display it on the template using the following code:

<?php the_post_thumbnail( ‘thumbnail’ ); ?>

Extend User Contact Info

The WordPress user profile page is quite old and many new networks have gain popularity such as twitter and facebook. Prior to version 2.9, it was really hard to add a custom field in the contact area, but thanks to Joost De Valk for his contribution, now this feature is available.

Simply open your functions.php and add the following function:

<?php
function my_new_contactmethods( $contactmethods ) {
// Add Twitter
$contactmethods['twitter'] = ‘Twitter’;
//add Facebook
$contactmethods['facebook'] = ‘Facebook’;

return $contactmethods;
}
add_filter(‘user_contactmethods’,’my_new_contactmethods’,10,1);

?>

This will add extra fields in your user profile pages.

You can display these on author profile page by using the normal $curauth variable or the_author_meta variable.

New Excerpt Filter

Up till WordPress 2.8.6, if you added the_excerpt code in the loop, it would display content with a 55 word limit and once the word limit was reached, it would add [...]. With this new ability, You can now specify a function and control both excerpt word count, and the more text. Implement this by opening your theme’s function.php file and add the following code:

// Changing excerpt length

function new_excerpt_length($length) {
return 60;
}
add_filter(‘excerpt_length’, ‘new_excerpt_length’);

// Changing excerpt more
function new_excerpt_more($more) {
return ‘…’;
}
add_filter(‘excerpt_more’, ‘new_excerpt_more’);

All thanks goes to Ramiy for suggesting this feature.

oEmbed making Embedding Easier

Thanks to ViperBond007 that this feature was added to the core of WordPress 2.9. It is a specification that allows media providers like Flickr, YouTube and others to provide data for consumer applications like WordPress about media.

There are many many more features that are being included in this version. To see a full list check out version 2.9 page in the codex.

10 Easy Ways to Secure your WordPress Blog

no comments

With WordPress so popular these days, it’s becoming a bigger and bigger target for hackers, so securing your blog is more and more important. The catswhocode.com provide 10 Easy Ways to Secure your WordPress Blog.

They have a large array of useful WordPress tips and tricks, including another recent one about 10 awesome .htaccess hacks for WordPress.

Check Firefox Bookmarks

no comments

Up until recently there was not a single add-on available for the Mozilla Firefox 3 web browser that would check the bookmarks for invalid or duplicate entries. Several add-ons existed that were able to perform the checks in Firefox 2. The reason for this was a change in how the bookmark data was stored.

Check Places is the first Firefox 3 extension that can check all Firefox 3 bookmarks for duplications and invalid references aka dead pages. The experimental add-on can be downloaded right from the Mozilla website after logging in as a user. The new Check Places entry will be added by the Firefox add-on to the bookmarks menu. A click on that link will open a new window that the user can use to configure the scan behavior.

It is possible to scan all bookmarks or only selected folders. Exclusions can be made so that some bookmarks or folders will not be scanned in the process. The scan itself can check if the pages that the bookmarks point to exist and if it is stored more than once in the bookmarks.

Some extensions (such as Bookmark Duplicate Detector) could perform some of theses functions, but Check Places is the most comprehensive one (so far) for firefox 3.

Internet explorer losing ground to firefox and safari

no comments

Internet Explorer’s share of the browser market is dropping, with a significant drop of 7% market share in the past year (according to figures released by the internet metrics provider, Net Applications).

It looks like FireFox has grabbed the lion’s share of users from Microsoft’s browser, with a gain of just under 4% to 21.5% (FireFox first went over 20% in November). Safari has also gained on Internet Explorer, with a 2% increase (to 8.3%).

Google’s new addition to the ‘browser wars’ has just over 1% of the market, with Opera’s share dropping to .7%.

For what its worth, Internet Explorer, FireFox and Safari still command over 97% of the browser share.

Greasefire Finds Greasemonkey Scripts for the Site You’re Visiting

no comments

One of the problems with using the Greasemonkey extension for firefox is knowing what scripts are available for the site you are visiting. Greasefire is a companion extension designed to help you customize your web browsing by finding user scripts for any page you’re currently visiting.
Once installed, the extension automatically searches the Greasemonkey script repository Userscripts.org for scripts related to the site you’re visiting. If a script is available, the Greasemonkey icon in your Firefox status bar will display a fiery background to indicate that it found matches.

Why does Software Piracy hurt FOSS ?

1 comment

jason stirk tweeted about an interesting article about the interaction and semantics, I suppose, of Usage and Piracy of Software, and it’s effect on Open Source Software.

The point to draw from it is that software piracy, while not giving cash to the software company, still provides support for them. The example used in the Adobe Photoshop range of products.

…even if something better becomes available, people will still be using Adobe, because it’s the industry’s standard. Most of my student friends were using pirated versions of Photoshop at home because they couldn’t afford the real thing, and because it was what they were learning to use in class. I showed a few of them the benefits of using GIMP instead, and the response was total rejection of GIMP. It was unfamiliar, it had no perceived benefits over Photoshop, and most of all, it wasn’t even any cheaper than a pirated version of Photoshop.

Bluntly, if you download a pirated copy of MS-Office instead of Open Office, then OOo’s developers have lost a user, lost a supporter (and possibly, lost a contributor), and you are reinforcing the Microsoft hold on Office Software.

Stanford offers free CS, robotics courses

1 comment

Stanford University has launched a series of 10 free, online computer science (CS) and electrical engineering courses. The courses span an introduction to computer science and an introduction to artificial intelligence and robotics, among other topics.

The free courses are being offered “to students and educators around the world” under the auspices of Stanford Engineering Everywhere (SEE). Each course comprises downloadable video lectures, handouts, assignments, exams, and transcripts.

The courses are nearly identical to what’s offered to enrolled Stanford students, according to the University. However, those taking courses through SEE are not eligible to receive Stanford credit for them.

Course participants do not register, and have no direct contact with Stanford instructors or professors. They do, however, have the ability to communicate online with other SEE students. A detailed SEE FAQ is available here.

The University says SEE’s initial courses include “one of Stanford’s most popular engineering sequences: the three-course Introduction to Computer Science taken by the majority of Stanford undergraduates, and seven more advanced courses in artificial intelligence and electrical engineering.”

SEE users may pick and choose the materials that best meet their needs and interests. Want a refresher course on a particular programming concept? View a video lecture that covers the basics. Are you a programming novice? Spend several weeks viewing lectures, reading course materials and tackling class assignments. Test your knowledge by taking quizzes and exams.

As an example, here’s the first lecture in the Machine Learning course, taught by Professor Andrew Ng:

Useability: Linux / Unix v Closed Software

no comments

A tweet from Linda Eastin pointed me at this old blog entry from Daring Fireball on Linux and Spray-on Useability, that takes aim at the Eric Raymond rant on Linux usability (the one where he can’t get CUPS working).

There’s an old engineering adage: “Fast, good, cheap: pick two.” (Where
“fast” regards development time, not performance.) Desktop Linux
software is cheap (free) and fast (release early, release often), but
it’s not good.

Or, perhaps one could argue that it is cheap, and eventually it’s going
to be good, but it’s getting there very slowly.

Windows and Mac OS, on the other hand, are fast and good. For the sake
of this discussion, it doesn’t matter which is better and which is
improving faster. What matters is that neither is cheap. It’s very
difficult to beat the fast/good/cheap rule.

For example, look at how much Mac OS X has improved in the last three
years alone. Even if desktop Linux is improving — and I do think it is
— it’s improving at a much slower pace than Mac OS X.

…..

More often than not, you get what you pay for.

Make Gmail the default Firefox 3 Mail Client

4 comments

If you rely on online mail clients such as Gmail then you might like the following tip coming directly from the official Gmail blog that describes how to to make Gmail the default Firefox 3 Mail client (i.e. the mail client that is loaded whenever a mailto link is clicked in Firefox 3.

You’ll need to complete the following steps.

  1. Head over to Gmail and sign in as usual.
  2. Once that is done paste the following line of Javascript code into the location bar of Firefox 3 and hit enter. This will add Gmail as one additional protocol handler for the mailto protocol:javascript:window.navigator.registerProtocolHandler("mailto","https://mail.google.com/mail/?extsrc=mailto&url=%s","Gmail")
  3. A line will appear on top of the screen asking if you want to add Gmail as an application for mailto links. A click on Add Application adds the handler, a click on the X button closes the request and changes nothing.
  4. Now head over to Tools > Options > Applications in Firefox 3 and filter for the mailto protocol.
  5. Use the drop down menu on the right side to select Gmail as the default client for mailto links and make sure to hit ok to confirm the change.

Congratulations, you just added Gmail as the default Firefox 3 Mail Client.

what is the firefox about: protocol ?

no comments

Many firefox users know that typing about:config in the location bar provides access to user preferences, that can’t be changed any other way.Some fun and useful (occassionally, anyway) Firefox about: links.

Either type the links in your firefox location bar or selct the links if you are curious about their purpose.