Creating a custom block in Drupal 8

Block is a very basic building block of any site. Blocks in drupal 8 are very different from what we are using in d7. In D8 blocks are plugins (like ctool content type plugin) and also entity. One more major improvement from site builder is that now you can have more than one instance of a block on same page, all instances can have different configuration, which was nightmare in d7. In d7 to achieve this you have to use either use panels or delta + context modules. Even in this way you can’t have different configuration for each instance.

jqplot library

jqPlot is a plotting and charting plugin for the jQuery Javascript framework. jqPlot produces beautiful line, bar and pie charts with many features:

  • Numerous chart style options.
  • Date axes with customizable formatting.
  • Up to 9 Y axes.
  • Rotated axis text.
  • Automatic trend line computation.
  • Tooltips and data point highlighting.
  • Sensible defaults for ease of use.

Other Drupal Contributions

Beside of maintaining Webform reports and Read onlu mode module, I'm also contributing to few other modules.

1. NML Field : The National Center for Biotechnology Information (NCBI) of the National Library of Medicine (NLM) created the Journal Archiving and Interchange Tag Suite with the intent of providing a common format in which publishers and archives can exchange journal content. The Suite provides a set of XML schema modules that define elements and attributes for describing the textual and graphical content of journal articles as well as some non-article material such as letters, editorials, and book and product reviews. This module provides a series of field-types for storing NLM-DTD based data.

2. Panel Ajax Tabs : Provides the ability to have a tabbed panel-pane that displays mini-panels within it. It can pass context from the "master" panel to the mini-panels via AJAX.

Mango Linux

Mango Linux is the distro for mango people, build to provide best user experience with latest stable softwares.
Normally when we install new version of Linux, after installation we has to install additional packages, specially multimedia packages. Hence, I build a distro on top of OpenSuse, which contains additional packages, it will save time for searching and installing packages. It also includes the all updates available till build date.

It is based on OpenSuse 13.1 and it has some additional packages. Some important applications are

  1. Browser – Firefox, Opera, Chormium
  2. E-mail Client – Thunderbird
  3. Multimedia – VLC, Amarok with extra codecs from Packman repo, Handbrake Video converter
  4. Utilities – K3b, unrar
  5. Skype
  6. Dropbox, OwnCloud Client
  7. Wine – To windows applications
  8. All updates available till the build date

Webform reports - Drupal Module

This module provides reporting capabilities to web form module.

Using it site admin can see the charts for submission data for certain period. It uses JqPlot JQuery plugin to generate charts.

Installation:

  1. Download and copy module to sites/all/modules folder
  2. Download jqPlot jQuery plugin from http://www.jqplot.com/, extract the zip file.
  3. Rename extracted folder to jqplot, copy this folder inside js folder of webform_reports module folder.
  4. Assign permission "access all webform results" to the role for which you wan to allow to see webform reports.
  5. Goto /admin/reports/webform, select webform for which you want to see report and click submit to see reports.

Read only mode - Drupal Module

Read Only Mode provides an alternate to the built in Maintenance Mode in Drupal. Instead of displaying a static text file to users while the site is in maintenance mode, Read Only Mode will allow access (reading) of new content while preventing the addition of new content (posting / submitting forms / etc).

This allows the site to remain functional while maintenance is performed. This module also provides messaging to users and administrators to indicate that the site is in maintenance mode.

Color Manager

Color Manager is color palette management application. It very use for designers, especially web designers. It lets you create a Palette for each project. It stores data in an xml file. You need mono and gtk# to run this application. It is writte in C# and uses Gtk# for Gui.

Subscribe to OpenAhmed RSS