All Projects → carlcs → craft-elementstats

carlcs / craft-elementstats

Licence: other
Element Stats widget for Craft CMS

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to craft-elementstats

smartdown.craft-plugin
Bringing the unbridled joy of Markdown Extra and Smartypants to your Craft websites.
Stars: ✭ 26 (+73.33%)
Mutual labels:  craftcms, craft-plugin
Seo
SEO utilities including a unique field type, sitemap & redirect manager
Stars: ✭ 210 (+1300%)
Mutual labels:  craftcms, craft-plugin
Minify
DEPRECATED A simple plugin that allows you to minify blocks of HTML, CSS, and JS inline in Craft CMS templates
Stars: ✭ 111 (+640%)
Mutual labels:  craftcms, craft-plugin
Craft Asset Rev
A Craft CMS plugin to help with cache busting
Stars: ✭ 109 (+626.67%)
Mutual labels:  craftcms, craft-plugin
Craft Embedded Assets
Manage YouTube videos, Instagram photos, Twitter posts and more as first class assets in Craft CMS
Stars: ✭ 165 (+1000%)
Mutual labels:  craftcms, craft-plugin
Plugins
The master list of Craft 3-compatible plugins
Stars: ✭ 111 (+640%)
Mutual labels:  craftcms, craft-plugin
Craft Fieldlabels
Override Craft CMS field labels and instructions in the field layout designer
Stars: ✭ 128 (+753.33%)
Mutual labels:  craftcms, craft-plugin
Instantanalytics
DEPRECATED Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce.
Stars: ✭ 103 (+586.67%)
Mutual labels:  craftcms, craft-plugin
Retour
DEPRECATED Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding & restructuring a website.
Stars: ✭ 172 (+1046.67%)
Mutual labels:  craftcms, craft-plugin
Spoon
Spoon plugin for Craft CMS - Enhance your Matrix fields with groups, tabs and more!
Stars: ✭ 82 (+446.67%)
Mutual labels:  craftcms, craft-plugin
Commerce
Fully integrated ecommerce for Craft CMS
Stars: ✭ 144 (+860%)
Mutual labels:  craftcms, craft-plugin
craft3-sitecopy
With this plugin you can copy the content of an entry to another site.
Stars: ✭ 22 (+46.67%)
Mutual labels:  craftcms, craft-plugin
Craft Quick Field
Create fields on the fly while designing field layouts
Stars: ✭ 104 (+593.33%)
Mutual labels:  craftcms, craft-plugin
Simplemap
A beautifully simple map field type for Craft CMS.
Stars: ✭ 136 (+806.67%)
Mutual labels:  craftcms, craft-plugin
Craft Preparse Field
Field type that parses twig when an element is saved.
Stars: ✭ 103 (+586.67%)
Mutual labels:  craftcms, craft-plugin
Craft Seomatic
SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
Stars: ✭ 135 (+800%)
Mutual labels:  craftcms, craft-plugin
Buttonbox
A collection of utility field types for Craft
Stars: ✭ 94 (+526.67%)
Mutual labels:  craftcms, craft-plugin
Guest Entries
Accept anonymous entry submissions with Craft.
Stars: ✭ 100 (+566.67%)
Mutual labels:  craftcms, craft-plugin
Craft Imageoptimize
Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like Imgix, with zero template changes.
Stars: ✭ 227 (+1413.33%)
Mutual labels:  craftcms, craft-plugin
buffer
DEPRECATED Send social updates to Twitter, Facebook, etc. through Buffer.com via Twig templates, URLs, and plugins.
Stars: ✭ 43 (+186.67%)
Mutual labels:  craftcms, craft-plugin

Element Stats widget for Craft CMS

Element Stats

Installation

The plugin is available on Packagist and can be installed using Composer. You can also download the latest release and copy the files into craft/plugins/elementstats/.

$ composer require carlcs/craft-elementstats

Configuration

To configure the plugin you need to create a file named elementstats.php in the craft/config/ folder. This is where you configure the stats available in your widgets.

Place all of your stats configurations in a nested array with the key stats. The configurations themselves have to be arrays with an unique array key which will be used to identify the stat. Within that array you can use the following stat config settings:

  • name – What the stat will be called in the widget.
  • link – Where the link in your widget will lead. The setting expects a Control Panel URI.
  • elementType – What element type to fetch elements.
  • criteria – An array of element criteria parameters used to filter the elements.
  • dateColumn – What database column should be used for the time axis in the chart.
  • total – Allows you to manually set the value returned to the widgets.
  • numberFormat – How the value should be formatted in the widgets.

Element Stats widget comes with an example configuration file to give you a better idea of what types of data you can use and how to configure the stats configurations.

Here’s a very basic example:

return [
    'stats' => [
        'all-entries' => [
            'name'        => 'All Entries',
            'link'        => 'entries',
            'elementType' => 'Entry',
        ],
        'sports-news' => [
            'name'        => 'Sports News',
            'link'        => 'entries/news',
            'elementType' => 'Entry',
            'criteria'    => [
                'section' => 'news',
                'type'    => 'sports',
            ],
        ],
    ],
];

Requirements

  • PHP 5.4 or later
  • Craft CMS 2.6 or later
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].