WordPress 2.5 RC1

Posted on 2008.03.18
Categories: PHP; Tagged with: , , , , , , , ,

This is probably the one piece of major open source news right now. WordPress has released a Release Candidate of WordPress 2.5, which has been highly anticipated by the blogging community. Everyone and every blog is talking about it, even the WordPress Podcast.

If you’re looking for some fantastic new features and a great new appearance, you can wait until the WordPress 2.5 Stable release, or you can download the RC1 now. I am currently sticking with WordPress 2.3.3; you can’t expect me to try EVERY beta and release candidate of all the open source projects! (I did experiment with Joomla! 1.5 RC1, and am currently playing with Firefox 3.0 Beta 4 and Safari 3.0.4 for Windows.)

Great new appearance:

Write Post page of WordPress 2.5

Navigation header

New dashboard

All these new features make WordPress 2.5 closer to the experience of using a hosted service like Blogger, except with much more control over your own site.

You can get WordPress 2.5 RC1 now.

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 3.4 out of 5)
Loading ... Loading ...

Anticipating WordPress 2.5

Posted on 2008.03.16
Categories: PHP; Tagged with: , , , ,

The WordPress Planet has been posting recently about a silently-delayed release of WordPress 2.5, a huge step up from WordPress 2.3.3. It was supposed to have been released March 10, 2008. It is now March 16, 2008.

Similar to the hype with the long-awaited release of Joomla! 1.5 Stable, people all around the world are anticipating WordPress 2.5, which is said to have a much nicer admin backend, a changed plugins system, and dozens of other features.

WordPress logo

The difference between waiting for Joomla! 1.5 Stable and waiting for WordPress 2.5 is that WordPress is used by a huge number of active bloggers around the world. It is said that tens of millions of people read blogs powered by WordPress every day; this is no overestimate. Whether it’s an average Joe blogging about his life, or Yahoo! talking about their latest developments, or even eBay, WordPress is suitable for everyone.

Joomla! is a CMS, and large corporations build their own CMS’s. But WordPress was intended to be a blogging / content platform, and it has been used as that (and many more things) because it’s simply easy to use.

I await WordPress 2.5 as eagerly as anyone else. Sure, the new source code can be obtained via SVN, or the nightly builds, but I’ll wait until the stable.

Get WordPress for your own site, or create a free WordPress blog at PersonalLog.

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 3.4 out of 5)
Loading ... Loading ...

Compressing JavaScript, CSS, and plain HTML using zlib.output_compression in PHP

Posted on 2008.02.17
Categories: PHP; Tagged with: , , , , ,

Today, a newly-registered user “jcapshaw” noted (on an older blog post about using zlib for output compression in PHP) that he wanted to send JavaScript, CSS, and HTML files through PHP for gzip compression. Clearly, as I pointed out in that blog post, the PHP developers prefer zlib.output_compression over the ob_start(’ob_gzhandler’) method, even though the zlib.output_compression method takes more work to set up. Why shouldn’t we apply it to other text-based files as well?

On one of my developments, RHHSMusic.com, I use several optimization methods recommended by the Yahoo! Developer Network, including:

  • CSS sprites (combining navigational images into one larger file and using CSS to show only part of the image)
  • Expires header (telling the browser how long the file would be valid, and for how long it wouldn’t need to re-fetch the file)
  • Gzipping components of the site, including normal PHP/XHTML documents, ALL CSS stylesheets, and most JavaScript files
  • Placing stylesheets in the <head> section
  • Placing JavaScript includes at the very bottom of the page, just before </body>
  • Not including site-wide CSS & JS in the HTML page
  • Using multiple hostnames (javascript.rhhsmusic.com and media.rhhsmusic.com) to encourage parallel downloading
  • Using ETags to identify when a file has changed

The majority of the above are accomplished through PHP; whether it’s PHP includes, PHP classes, or using PHP to gzip CSS & JS.

This article discusses how that is accomplished.

(more…)

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...

When to use JavaScript, when to use PHP

Posted on 2008.02.13
Categories: Web Development; Tagged with: , , , , , , ,

As the number of Web 2.0 sites and networks increases significantly the latter part of this decade, we are seeing increased use of technologies like AJAX, JSON, and XML-based data interchanges. This necessitates certain programming to handle data and user interaction, but it’s often debated whether client-side scripting like JavaScript should be used so extensively.

This article will discuss the simpler aspects of using JavaScript, the simpler aspects of using PHP, and will discuss when to use one or the other.

(more…)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

How to make a post on WordPress

Posted on 2008.02.02
Categories: Web Development; Tagged with: , , ,

It’s really quite simple to make posts on WordPress blogs. Geekie.org endorses the PersonalLog free blog hosting service run by our organization.

The following video is a simple demonstration and walkthrough of making a post on a WordPress ยต blog hosted on PersonalLog. (The demo post’s result — slightly modified — can be viewed at http://demo.personallog.org/demo-category/3.demo-post.demo.)

[flash http://personallog.org/demos/post/post.swf w=400 h=378]

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

PHP coding shortcut: the ternary operator

Posted on 2008.01.28
Categories: PHP; Tagged with: , , , , ,

Many of us coding or able to code in PHP often take the long route to do a simple task. Some completely “reinvent the wheel” with custom string handling functions. Others use complex while loops with simple tasks.

Most use the classic if… (then)… else… style conditional statement. Things such as the following:

<?php
if($_SERVER['REQUEST_URI']=='/index.php') {
	echo('Hello World!');
} else {
	echo('This is some other page');
}
?>

Some may have moved beyond such rudimentary coding to blocks like the following:

<?php
$request_uri = $_SERVER['REQUEST_URI'];
switch($request_uri) {
	case '/index.php':
		echo('Hello World!');
		break;
	default:
		echo('This is some other page');
}
?>

Clearly, the second takes more work. Given something as simple as echo-ing a phrase like “Hello World!” or “This is some other page”, using the switch-case syntax simply doesn’t make sense. Even the if-else syntax is a bit overkill.

That’s why programmers and coders who perform simple tasks should use the ternary operator (available in PHP and JavaScript):

<?php
echo ($_SERVER['REQUEST_URI']=='/index.php') ? 'Hello World!' : 'This is some other page';
?>

Simple, right? Right.

It follows the pattern of (expression 1) ? (expression 2) : (expression 3) where this statement evaluates to expression 2 if expression 1 returns TRUE and the statement will evaluate to expression 3 if expression 1 returns FALSE.

For more information, consult the PHP manual.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3 out of 5)
Loading ... Loading ...