• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

XenWord Dashboard

This entry is part of a series of entries "December 2016 - XenWord Development Log"
programming.jpg


There are 24 files included in the Widget System. Several have not been touched in months, others are using procedural calls, and others are using poor code to pull threads. Two files regarding XenReviews will be deprecated soon.

Work on widgets continued tonight:
  1. All of the widget file names were redone by stripping out the -xf- prefix.
  2. Widgets task chart was developed in Google Docs
  3. XenWord_Dashboard class created and file developed
Widget File & Class Names
The widget files included an -xf- prefix. This was stripped out. This is to help match file names and class names. For example, xenword-xf-topposters-widget.php is now named
xenword-top-posters-widget.php. The class name will change to XenWord_Top_Posters_Widget.

Widget Task Chart
I created a quick document to keep the tasks organized and to help me keep track of which widget is finished.

Widget Task Chart.png


XenWord Dashboard
The dashboard file was changed to a class. I was stuck for a bit on the register_xenword_dashboard_widget method. Changing the third line in the wp_add_dashboad_widget fixed the challenge to getting the widget to load.

PHP:
public function hook() {
   add_action( 'wp_dashboard_setup', array( $this, 'register_xenword_dashboard_widget' ) );
}

public function register_xenword_dashboard_widget() {
   wp_add_dashboard_widget(
      'xenword_dashboard_widget',
      'Community Statistics',
      array( $this,'xenword_dashboard_widget_display'
      ) );
}

Incomplete

Work is incomplete on this file. There are many options available in the XenWord settings for board statistics to include select XenForo addons such as Article Management System, User Blogging System, Media Gallery, and XenForo Resource Management. These board totals are not included in the dashboard yet.
Next entry in series Forum List By Category
Previous entry in series Google Integration

Blog entry information

Author
LPH
Views
2,025
Comments
1
Last update

More entries in Technology

More entries from LPH

Top