NotOneBit Blog

Get started today on your next web project with NotOneBit
We've been doing web development before you were born *

Two WordPress Plugins To Improve Your User Management Page (Part 2)

In the second part of this post I’ll show you how you can add a column that lists the total number of pages for a user with a break out of the drafts, pending private, and published. Each element is linked to the respective list of pages. Note that this modification removes the Posts column from the user page, however if you wish to retain it, remove the first five lines (the notonebit_modify_user_columns and the associated add_filter call).

wp-users

The following code would be added to your theme’s functions.php file.

Continue reading “Two WordPress Plugins To Improve Your User Management Page (Part 2)”

Two WordPress Plugins To Improve Your User Management Page

This is a two-part post that will give you the code for plugins that will modify your WordPress user management page with some useful additional information

wp-users

This post will give you the code for the highlighted area on the left. This code adds two bits of information for every user, their last login date and time, and the last date and time they were active. When you hover over the “Last login” and “Last active” text the tooltip shows you the exact date and time info. Continue reading “Two WordPress Plugins To Improve Your User Management Page”

Looking for feedback on a WordPress dashboard plugin

I’ve developed a WordPress dashboard plugin and would like some feedback on it. If you’re interested, hit me up with your contact information. Oh, and it’s a simple to-do widget. You can see the plugin at https://wordpress.org/plugins/to-do-dashboard-widget/  Continue reading “Looking for feedback on a WordPress dashboard plugin”

PHP Pagination Class – Version 3

It’s been a while since the popular PHP pagination class has received any of my attention, so a few months ago I set out to re-write the class to be more up to date. This version takes advantage of both code and security updates as well as updates to PHP and MySQL. I’m also planning on moving the code over to GitHub where it should be easier to manage.

Here is the new and improved PHP pagination class for your enjoyment:

Download

See the example files for how to use. I’ll create step-by-step instructions shortly.

Demo

Note that the demo uses MySQL’s free “world” database available at http://dev.mysql.com/doc/index-other.html

  • Example 1 (basic paginated database result set)
  • Example 2 (Form variables passed via pagination class)

PHP Pagination Class Updated – Version 2

Based on feedback (and the long time between updates), I’m releasing an updated version of the PHP pagination class.

Changes

  • No more SQL errors if using the class on a query with no results (although I fail to see the point of using it on an empty query anyway, but the bug is fixed)
  • When selecting ‘ALL’ only one page is displayed, and if you are using the display_items_per_page drop-down menu, ‘ALL’ is now selected as well.
  • If a page less than page one, or greater than the total number of pages is requested, no results are displayed and the appropriate prevous/next links are disabled
  • The items per page array that populates the display_items_per_page drop-down menu is now an option that can be configured when instantiating the class. Previously this was hard-coded to the class.
  • The $high option has been removed from the class (it was never used).

Note that if you receive a PHP notice about undefined indexes that you should turn down your error reporting. This notice may be displayed when loading the page for the first time when no $_GET variables are present. The class accounts for this, however PHP throws a notice about it.

Examples

I’ve also added license info at the head of the class (CC Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)).

Download