Qlik for Wordpress Plugin


The Qlik for Wordpress plugin gives basic syntax highlighting of QlikView and Qlik Sense script and expressions contained within Wordpress pages and posts. It is based on Qlik Syntax Highlighter for the Web.


The syntax highlighting that is provided is an approximation of what you would get in QlikView's or Qlik Sense's Edit Script dialog. It currently supports the following features:
  • Highlighting of all QlikView v11.20+ and Qlik Sense functions
  • Highlighting of all QlikView v11.20+ and Qlik Sense keywords and statements
  • Highlighting of line comments (//) and block comments (/* */ and REM ; )
  • Highlighting of variable definitions (SET and LET)
  • Highlighting the usage of variable within dollar-sign expansion $( )
Additionally you can add any Qlik icons to your WordPress posts and pages. All icons are vector font based and so can be coloured and styles to fit your purpose.


If you find any issues, including missing keywords or functions, then please let me know using the "Contact Me" page and I'll add them to the next release.

This plugin is also featured on the Wordpress.org Plugin Directory to allow automatic installation and update notifications.

Installation

Here are the steps to get it installed and working yourself:
  1. Login to your WordPress Admin Portal.
  2. On the left hand navigation panel, select "Plugins". 
  3. Towards the top of the plugins list, click the "Add New" button.

  4. In the search box towards the right hand side, type "Qlik" and hit enter to search.

  5. The Qlik for WordPress plugin is currently one of only two results returned, alongside the above mentioned Qlik Sense plugin. Click the "Install Now" button next to it.


  6. WordPress will then download and install the plugin for you. Once complete, click the "Activate" button to complete the installation.


  7. The plugin is now installed and the shortcode is ready to use.


Upgrading

Assuming you have used the above installation method, like other WordPress plugins, you will be notified when a new version of the Qlik for WordPress plugin is available. Follow the prompts within the notification to upgrade to the latest stable release.

How to Configure

The plugin has a dedicated settings page where optional features can be turned on or off.
  1. Login to your WordPress Admin Portal.
  2. On the left hand navigation panel, select "Qlik". 
Each setting has a clear description of what it does.


How To Use

The plugin utilises WordPress shortcodes to apply the highlighting and insert icons.

Syntax highlighting

Simply wrap any Qlik code blocks within the [qlikview] ... [/qlikview] shortcode tags. By default, the plugin will assume that the code contained in the tags is Qlik script and will highlight it accordingly. You can specify an alternative code type using the type parameter within the opening tag. For example:

[qlik-code type="exp"]=num(MyField)[/qlikview]

Alternatively, the shortcode can be entered using the button within the Wordpress text or visual post/page editor. In the text editor, select the block of code within the post or page, then click the Qlik Code button on the editor menu. You will be prompted for what language code block should be highlighted as. Once complete, click OK and the shortcode will be added around the code block for you.


In the WordPress visual editor, the process is very similar. Select the block of code within the post or page, then click the Qlik Code button on the editor menu. You will be prompted for what language code block should be highlighted as. Once complete, click OK and the shortcode will be added around the code block for you.


It currently supports the following code types:
  • "qvs" - Qlik Script
  • "exp" or "qve" - Qlik Expression
  • "sql" - SQL
  • "vbscript" - Visual Basic Script
  • "javascript" - Java Script
Syntax highlighting will then be automatically applied to the block when the page is viewed.

Icons

Simply place the shortcode tag [qlik-icon icon=""] in your post or page where you wish the icon to appear. You can specify the icon you wish to use within the icon parameter of the tag. For example 
[qlik-icon icon="qicon-qlik"] will insert the Qlik logo. Possible icons and their related codes can be found within the Qlik for WordPress settings page in the WordPress Admin Portal.

Alternatively, the shortcode can be entered using the buttons within the WordPress text and visual post/page editors. Place the cursor within the post or page where you wish the icon to be placed, then click the Qlik Icon button on the editor menu. You will be prompted for the icon code for the icon you wish to insert. Once complete, click OK and the shortcode will be added for you.

Localisation

The Qlik for WordPress plugin already available in several languages. If are fluent in another language and would be willing to spend 10 minutes translating the plugin into another language, you can join the POEditor project.

A huge thanks goes out to the following people who have helped to translate the plugin so far:
Olivia Wassén, Vinicius Dalsasso, Stefan Stoichev, Juraj Misina, Héctor Muñoz

Disclaimer

This plugin is provided free of charge, as is, with no warranties or guarantees. Neither Datoniq Limited or QlikViewAddict.com (including any of it's contributors) accept any liability for problems or loss resulting from it's use.

3 comments:

  1. Hi Matt,
    I noticed that the wordpress plugin is not handling variable declarations containing punctuation mark (.) correctly. Only the text before the first punctuation will render as grey.


    [qlikview type="qvs"]
    SET vL.ImportData = $(vG.ImportPath);
    SET vL.Measure.X = 'sum(Data_X)';
    [/qlikview]

    Cheers
    Vegar Lie Arntsen

    ReplyDelete
    Replies
    1. This has been corrected in the forthcoming release

      Delete
  2. Hi Vegar

    Good spot. I'll get it added in the next release!

    Regards
    Matt

    ReplyDelete