19th March 2008

Dashboard Widget (Without Controls) Sample Plugin

Posted by Lester Chan at 01:46 in Sample Plugins

WordPress 2.5 has the ability to customize your administration dashboard with the help of widgets.

After poking around WordPress 2.5 codes, I have come out with this Dashboard Widget Sample Plugin. BUT do note that this plugin does not include Dashboard Widget Controls. If I have the time, I will add that in or perhaps I will create another plugin called “Dashboard Widget (With Controls) Sample Plugin”.

To get a clearer picture of what this sample plugin does, here is a screenshot of the Dashboard Widget (Without Controls) Sample in action.

Here comes the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/*
Plugin Name: Dashboard Widget (Without Controls) Sample
Plugin URI: http://lesterchan.net
Description: A sample on how to add widgets on your dashboard easily.
Version: 0.01
Author: Lester 'GaMerZ' Chan
Author URI: http://lesterchan.net
*/
 
/*
 
Replace all instances of PLUGINNAME with your nice plugin name something like "polls" or "ratings (without the quotes)
 
*/
 
### Function: Register Dashboard Widget
add_action('wp_dashboard_setup', 'PLUGINNAME_register_dashboard_widget');
function PLUGINNAME_register_dashboard_widget() {
	wp_register_sidebar_widget('dashboard_PLUGINNAME', __('Sample Dashboard Widget', 'PLUGINNAME'), 'dashboard_PLUGINNAME',
		array(
		'all_link' => 'Full URL For "See All" link', // Example: 'index.php?page=wp-useronline/wp-useronline.php'
		'feed_link' => 'Full URL For "RSS" link', // Example: 'index.php?page=wp-useronline/wp-useronline-rss.php'
		'width' => 'half', // OR 'fourth', 'third', 'half', 'full' (Default: 'half')
		'height' => 'single', // OR 'single', 'double' (Default: 'single')
		)
	);
}
 
### Function: Add Dashboard Widget
add_filter('wp_dashboard_widgets', 'PLUGINNAME_add_dashboard_widget');
function PLUGINNAME_add_dashboard_widget($widgets) {
	global $wp_registered_widgets;
	if (!isset($wp_registered_widgets['dashboard_PLUGINNAME'])) {
		return $widgets;
	}
	array_splice($widgets, sizeof($widgets)-1, 0, 'dashboard_PLUGINNAME');
	return $widgets;
}
 
### Function: Print Dashboard Widget
function dashboard_PLUGINNAME($sidebar_args) {
	global $wpdb;
	extract($sidebar_args, EXTR_SKIP);
	echo $before_widget;
	echo $before_title;
	echo $widget_name;
	echo $after_title;
	echo 'YOUR CONTENT GOES IN HERE';
	echo $after_widget;
}
?>

You can also download the file by clicking the link below:

  Dashboard Widget (Without_Controls) Sample Plugin (873.0 bytes, 756 hits)

Hope this helps some of you guys. =)

Tags: , , ,

Email This Post Email This Post Print This Post Print This Post

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

18th March 2008

WordPress 2.5 RC 1

Posted by Lester Chan at 15:27 in Site, WordPress

The time I have been waiting for to test my plugins on WP 2.5 is finally here.

Some features in WordPress 2.5 taken from WordPress.org:

A customizable dashboard, multi-file upload, built-in galleries, one-click plugin upgrades, tag management, built-in Gravatars, full text feeds, and faster load times.

Do take a look at WordPress.org’s blog - Sneak Peak on WordPress 2.5.

Download: WordPress 2.5 Release Candidate 1

*UPDATE* Just updated this site to WordPress 2.5 RC1, apparently all my plugins seems to be working fine. Just that some alignment and colour scheme maybe a little off. I will try to fix it latest during my summer holidays.

Tags: ,

Email This Post Email This Post Print This Post Print This Post

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

WordPress 2.5 Release Date

Posted by Lester Chan at 09:45 in WordPress

Accordingly to Lorelle, WordPress 2.5 will be released before WordCamp Dallas.
As taken from WordCamp Dallas website:

The Dallas 2008 WordCamp spans two days, with the first day focusing primarily on general user topics and the second day primarily on developer topics, with some overlap.

In this case, WordPress 2.5 should be out on either 28th March 2008 or 29th March 2008.

Tags: , ,

Email This Post Email This Post Print This Post Print This Post

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

12th March 2008

WordPress 2.5 Delayed

Posted by Lester Chan at 15:50 in WordPress

WordPress 2.5 has been delayed till 17th March 2008 tentatively. I find the development cycle for WordPress 2.5 is a little weird.

For WordPress 2.3 and other previous versions of WordPress, betas and RCs are released first. For example, WP 2.3: Beta 1, WP 2.3: Beta 2, WP 2.3: Beta 3 and lastly WP 2.3: RC 1 are released first before WP 2.3 went gold.

For WordPress 2.5, there are so such releases (I am not talking about SVN nightly) and apparently the upcoming WP 2.5 will be the first and gold release.

Personally, I think they should release the betas and RCs officially first before releasing the gold version to the public.

But I still hope it get further delayed till my summer holidays so I can release it together with my plugins as I am too busy with school that I could not even take any time off to do my plugins.

Tags: , ,

Email This Post Email This Post Print This Post Print This Post

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

28th February 2008

WordPress 2.5 Thoughts

Posted by Lester Chan at 09:49 in WordPress

As we are getting nearer and nearer towards WordPress 2.5 release date on 10th March 2008, at the same time, my school work is also piling up.

I am looking forward to the redesigned administration backend. All my plugins should work just fine for WordPress 2.5. The only change at the moment that I need to make is to my WP-Sticky to make use of the add_meta_box() instead of the DBX box.

Here are some links related to WordPress 2.5:

Tags: ,

Email This Post Email This Post Print This Post Print This Post

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

5th February 2008

WordPress 2.3.3

Posted by Lester Chan at 14:43 in Site, WordPress

WordPress 2.3.3 has been released and this release includes a security fix (xmlrpc.php) and 3 minor bug fixes.
3 bug fixes as follows (Ctrl C + Ctrl V from WordPress Trac):

  • gettext fails to determine byteorder on 64bit systems with php5.2.1
  • some registration emails fail in 2.3.1 b/c of “callout verification”
  • maybe_create_table call to config.php issue

5 files changed (Thanks to whooami):

  • /wp-admin/install-helper.php
  • /wp-includes/gettext.php
  • /wp-includes/pluggable.php
  • /wp-includes/version.php
  • /xmlrpc.php

Get WordPress 2.3.3 now.

Tags: ,

Email This Post Email This Post Print This Post Print This Post

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

29th January 2008

Lester Chan’s WordPress Plugins Facebook Page

Posted by Lester Chan at 15:42 in Plugins, WordPress

If you like my WordPress plugins, perhaps you can become a fan on my Lester Chan’s WordPress Plugins Page in Facebook.

Thanks =D

Tags:

Email This Post Email This Post Print This Post Print This Post

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

24th January 2008

Happy 5th Birthday WordPress

Posted by Lester Chan at 16:10 in WordPress

Today is the 5th Birthday Of WordPress and that makes my WordPress plugins about the same age and my plugins grew together with WordPress.

I didn’t except some of my plugins to make it into books and blogs of those big corporations. Thank you guys for supporting my plugins =)

Tags:

Email This Post Email This Post Print This Post Print This Post

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

6th January 2008

GMnext’s Blog WordPress Plugins

Posted by Lester Chan at 17:26 in WP-EMail, WP-PostRatings, WP-Print, WordPress

Matt has reported that General Motors has chosen Wordpress for its GMnext’s Blog and upon checking out the blog, I realized that it is using 3 of my plugins namely, WP-Print, WP-Email and WP-PostRatings. Cool!

Tags: ,

Email This Post Email This Post Print This Post Print This Post

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

30th December 2007

WordPress 2.3.2

Posted by Lester Chan at 19:13 in Site, WordPress

WordPress 2.3.2 has been released and this release includes a number of changes including one security fix.

  • Performance improvements for post sanitization when raw content is required.
  • Changes to is_admin() to ensure that it is only true for admin pages thereby protecting against exposing draft posts.
  • Suppression of database errors unless WP_DEBUG is true.
  • Check for valid database connection information during install and display and error if the install fails due to database rights.
  • Support for a custom database down page to be displayed on database connection errors.
  • Changes to make sure we are more selective in what we make clickable, this introduces different rules for different uri types.
  • Changes to wp-mail.php to escape the error messages when displaying them to avoid a possible XSS attack.
  • Changes to ensure that the post password is only exposed by the xmlrpc method metaWeblog.getRecentPosts to users with rights to edit a post.
  • Changes to the information exposed the wp.getAuthors xmlrpc method to reduce the information exposed and add a capabilites check.
  • Addition of extra capabilites checks to xmlrpc methods.
  • Addition of extra capabilites checks to APP server.
  • Changes to validate_file() to improve its traversal attempt detection when running on windows.

Get yours today.

Tags: ,

Email This Post Email This Post Print This Post Print This Post

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

 

Page 4 of 18« First...«3456»...Last »