VOOZH about

URL: http://symphonyextensions.com/extensions/dashboard/

⇱ Dashboard — Provide a Dashboard summary screen with configurable panels — Symphony CMS Extensions


Symphony Extensions

Symphony CMS

Follow @symextensions for updates to the 412 extensions that we track. What is this?

What is symphonyextensions.com?

Symphony Extensions tracks Symphony CMS extensions that are hosted on Github.

How do I submit an extension?

Host your extension on Github and make sure the repository has a good README and an extension.meta.xml file. Then sign in to this site using your GitHub profile where you will see a list of your public repositories. Pick one, and add it to the site. When you make changes, just update the XML file in your repository and we do the rest.

What is an extension.meta.xml file?

It is an XML file that you add to your repository to describe your extension. You can include a name and description, developer contact details, version history, changelog, dependencies and more. Please read the documentation for a full list. You can use the lint tool to check your XML against the schema before submitting your extension to the site.

Who runs this site?

This site is now run by the community @symextensions. The site was created by nickdunn. Contact him at @nickdunn

Found a bug?

Please report it here.

2.1.0releasedDashboard

Provide a Dashboard summary screen with configurable panels

Clone URLhttps://github.com/symphonists/dashboard.git

Add as a submodulegit submodule add https://github.com/symphonists/dashboard.git extensions/dashboard --recursive

Download
.tar.gz, .zip
Links
Github, Issues, Wiki
Translations
de, ru

👁 symphonists
Symphony Communitysymphonists86 extensions

Compatibility

2.x.x2.1.x2.2.x2.3.x2.4.x2.5.x2.6.x2.7.02.7.12.7.22.7.32.7.42.7.52.7.62.7.72.7.82.7.92.7.10
No1.41.5.21.8.0No2.1.02.1.02.1.02.1.02.1.02.1.02.1.02.1.02.1.02.1.02.1.02.1.02.1.0
Symphony VersionExtension version
2.7.102.1.0
2.7.92.1.0
2.7.82.1.0
2.7.72.1.0
2.7.62.1.0
2.7.52.1.0
2.7.42.1.0
2.7.32.1.0
2.7.22.1.0
2.7.12.1.0
2.7.02.1.0
2.6.x2.1.0
2.5.x2.1.0
2.4.xNo
2.3.x1.8.0
2.2.x1.5.2
2.1.x1.4
2.x.xNo

Readme

Dashboard

Purpose

To provide a Dashboard summary screen for users. Dashboard "panels" can contain any information. This extension provides the framework for building a Dashboard, and provides four basic panel types. Other extensions can provide their own panel types.

Installation

  1. Upload the 'dashboard' folder in this archive to your Symphony 'extensions' folder
  2. Enable it by selecting "Dashboard" in the list, choose Enable from the with-selected menu, then click Apply
  3. Navigate to the Dashboard from the "Dashboard" link in the primary navigation

Setting the Dashboard as the user's default

Once installed "Dashboard" will appear in the "Default area" dropdown when you create a new author. If you choose this, the author will be shown the dashboard when they log in.

Core panel types

There are five core panel types:

  • Datasource to Table takes a Symphony Data Source and attempts to render it as an HTML table. This works best with basic fields such as Text Input, Checkboxes and Dates. The first column will link to the entry itself.
  • HTML Block allows you to specify the URL of a page that outputs a chunk of HTML (a <div /> perhaps) to include in the panel.
  • Markdown Text Block allows you to add Markdown-formatted text to include in the panel.
  • RSS Feed Reader parses an RSS feed and renders the summary. Useful for latest news or updates.
  • Symphony Overview renders basic statistics about your installation such as version number and total number of entries.

Extensions that provide panels

The delegates that Dashboard provides means that other extensions can supply their own dashboard panels. These include:

  • Tracker panel shows summary of all author and developer activity within Symphony
  • Search Index panel shows a list of recent searches
  • Sections Panel shows latest entries from a section (without creating a data source)
  • Health Check shows test results against your server to determine the best permissions for your environment.
  • Google Analytics allows you to create panels that displays Google Analytics Charts.

Creating your own panel types

To provide panels your extension needs to implement (subscribe to) two delegates:

public function getSubscribedDelegates() {
 return array(
 array(
 'page' => '/backend/',
 'delegate' => 'DashboardPanelRender',
 'callback' => 'render_panel'
 ),
 array(
 'page' => '/backend/',
 'delegate' => 'DashboardPanelTypes',
 'callback' => 'dashboard_panel_types'
 ),
 );
}

There are two additional delegates to provide UI for panel settings, and its validation:

array(
 'page' => '/backend/',
 'delegate' => 'DashboardPanelOptions',
 'callback' => 'dashboard_panel_options'
),
array(
 'page' => '/backend/',
 'delegate' => 'DashboardPanelValidate',
 'callback' => 'dashboard_panel_validate'
),

These are optional unless your panel configuration requires user input.

DashboardPanelTypes

The callback function should return the handle and name of your panel(s) by adding a new key to the types array:

public function dashboard_panel_types($context) {
 $context['types']['my_dashboard_panel'] = 'My Amazing Dashboard Panel';
}

This will define a panel of type my_dashboard_panel. Make this name as unique as possible so it doesn't conflict with others.

DashboardPanelOptions

Each panel has a configuration screen. There are default options for all panels ("Label" and "Position"), but you can add additional elements to the configuration form using the DashboardPanelOptions delegate:

public function dashboard_panel_options($context) {
 // make sure it's your own panel type, as this delegate fires for all panel types!
 if ($context['type'] != 'my_dashboard_panel') return;

 $config = $context['existing_config'];

 $fieldset = new XMLElement('fieldset', NULL, array('class' => 'settings'));
 $fieldset->appendChild(new XMLElement('legend', 'My Panel Options'));

 $label = Widget::Label('Option 1', Widget::Input('config[option-1]', $config['option-1']));
 $fieldset->appendChild($label);

 $context['form'] = $fieldset;

}

The above code creates a fieldset which will be appended to the panel configuration form. The fieldset contains a single textfield with the label "Option 1". The $config array contains existing saved options, so you can pre-populate your form fields when editing an existing panel.

Upon saving, all form fields named in the config[...] array will be saved with this panel instance, and provided to the panel as an array when it renders.

DashboardPanelRender

Subscribe to the DashboardPanelRender delegate to render your panel on the dashboard.

public function render_panel($context) {
 if ($context['type'] != 'my_dashboard_panel') return;

 $config = $context['config'];
 $context['panel']->appendChild(new XMLElement('div', 'The value of Option 1 is: ' . $config['option-1']));
}

First check that you should output your own panel. $context['panel'] contains an XMLElement that is an empty panel container to which you can append children. The saved configuration for the panel is presented in the $context['config'] array.


Known issues

  • adding Markdown panels using different versions of the Markdown formatter will cause an error. Be sure to always use the same Markdown formatter for all panels

Version history

2.1.022 January 2019

Symphony 2.5.0 to 2.x.x

  • Add PHP version to the Symphony Overview #22

2.0.201 June 2018

Symphony 2.5.0 to 2.x.x

  • Fix latest version broken parsing

2.0.122 March 2017

Symphony 2.5.0 to 2.x.x

  • Supported on PHP 7
  • Clean serialized value

2.0.031 July 2015

Symphony 2.5.0 to 2.6.x

  • Symphony 2.6 compatibility
  • Added 'label' and 'id' values in delegates

1.8.016 January 2015

Requires Symphony 2.3.x

  • Symphony 2.5 compatibility

1.7.008 August 2014

Requires Symphony 2.3.x

  • Updated to new Github API
  • Add Russian Language
  • Various fixes for the drawer and implementation

1.6.009 March 2012

Requires Symphony 2.3.x

  • Fully updated for Symphony 2.3, not compatible with Symphony 2.2

1.5.201 November 2011

Symphony 2.2 to 2.2.5

  • Generic bug fixes

1.5.101 June 2011

Symphony 2.2 to 2.2.5

  • Removed redundant styles and fixed various CSS bugs
  • Removed deprecated JS & CSS accessors

1.415 May 2011

Requires Symphony 2.1.x