Title: Qlik for WordPress
Author: Matthew Fryer
Published: <strong>2014 年 10 月 15 日</strong>
Last modified: 2018 年 2 月 14 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/qlikview-syntax-highlighter/assets/icon-256x256.png?rev=1008267)

# Qlik for WordPress

 作者：[Matthew Fryer](https://profiles.wordpress.org/mattfryer/)

[下载](https://downloads.wordpress.org/plugin/qlikview-syntax-highlighter.2.0.zip)

 * [详情](https://cn.wordpress.org/plugins/qlikview-syntax-highlighter/#description)
 * [评价](https://cn.wordpress.org/plugins/qlikview-syntax-highlighter/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/qlikview-syntax-highlighter/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/qlikview-syntax-highlighter/#developers)

 [支持](https://wordpress.org/support/plugin/qlikview-syntax-highlighter/)

## 描述

This WordPress plugin provides automatic syntax highlighting of QlikView and Qlik
Sense script on any WordPress page or post. Additionally, it allows for easy addition
of QlikView and Qlik Sense user interface icons within pages and posts. It was developed
by Matt Fryer, a highly experienced Qlik consultant and author of the popular blog
[QlikViewAddict.com](http://www.qlikviewaddict.com).

### Features

It currently supports highlighting of the following Qlik script and expression elements:

 * Line comments //
 * Block comment /_.._/
 * REM comment REM…;
 * Most QlikView 11.20+ and Qlik Sense keywords, statements and functions (that 
   are permitted within the script or expressions)
 * Variable definitions (using SET and LET) and variable use (within $())
 * Field names in most common situations

Currently, all Qlik Sense Hub and Management Console icons are supported as well
as a small number of additional generic icons (eg. Qlik logo).

### 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 [qlik-code] … [/qlik-code] 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 [qlikview type
=”exp”]=num(MyField)[/qlikview]. Currently supported code types are “qvs”, “exp”(
or “qve”), “sql”, “vbscript” and “javascript”. If no code type is specified then“
qvs” will be assumed.

Alternatively, the shortcode can be entered using the buttons within the WordPress
text and visual post/page editors. 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
code type the block should be highlighted as. Once complete, click OK and the shortcode
will be added around the code block for you.

#### 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.

### Feedback

If you spot any issues or have any suggestions to improve the plugin, please let
me know either via the support tab here, or via a comment on [QlikViewAddict.com](http://www.qlikviewaddict.com/p/qlikview-wordpress-plugin.html).

### Credits

I’d like to thank Ivan Sagalaev and all the other contributors of Highlight.js which
this plugin is based upon.

## 屏幕截图

[⌊An example section of QlikView script showing the syntax highlighting provided
by this plugin.⌉⌊An example section of QlikView script showing the syntax highlighting
provided by this plugin.⌉[

An example section of QlikView script showing the syntax highlighting provided by
this plugin.

[⌊Includes a support for adding shortcode via the WordPress visual post/page editor.⌉⌊
Includes a support for adding shortcode via the WordPress visual post/page editor
.⌉[

Includes a support for adding shortcode via the WordPress visual post/page editor.

## 安装

There are 3 possible methods to install this plugin. We would highly recommend using
method 1 as this is the easiest and will give notification of future updates.

#### Method 1

 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. 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.

#### Method 2

 1. Download the plugin zip file by clicking the link above.
 2. Login to your WordPress Admin Portal.
 3. On the left hand navigation panel, select “Plugins”.
 4. Towards the top of the plugins list, click the “Add New” button. Note, if you have
    a previous version of this plugin installed it must be removed before proceeding.
 5. Again, towards the top, click the “Upload Plugin” button.
 6. Click the “Browse” button and navigate to the location where you saved the plugin
    zip file and select it.
 7. Click the “Install Now” button
 8. Once back on the plugins page, activate the “Qlik for WordPress” plugin.

#### Method 3

 1. Download the plugin zip file by clicking the link above.
 2. Extract the contents of the zip file to a folder on your computer.
 3. Upload the entire directory “/qlik-highlight/” and its contents from the .zip file
    to the “/wp-content/plugins/” directory of your Wordpess site. If a previous version
    of this plugin has been installed, overwrite the entire folder.
 4. Login to your WordPress Admin Portal.
 5. On the left hand navigation panel, select “Plugins”.
 6. Activate the “Qlik for WordPress” plugin.

## 常见问题

  Installation Instructions

There are 3 possible methods to install this plugin. We would highly recommend using
method 1 as this is the easiest and will give notification of future updates.

#### Method 1

 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. 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.

#### Method 2

 1. Download the plugin zip file by clicking the link above.
 2. Login to your WordPress Admin Portal.
 3. On the left hand navigation panel, select “Plugins”.
 4. Towards the top of the plugins list, click the “Add New” button. Note, if you have
    a previous version of this plugin installed it must be removed before proceeding.
 5. Again, towards the top, click the “Upload Plugin” button.
 6. Click the “Browse” button and navigate to the location where you saved the plugin
    zip file and select it.
 7. Click the “Install Now” button
 8. Once back on the plugins page, activate the “Qlik for WordPress” plugin.

#### Method 3

 1. Download the plugin zip file by clicking the link above.
 2. Extract the contents of the zip file to a folder on your computer.
 3. Upload the entire directory “/qlik-highlight/” and its contents from the .zip file
    to the “/wp-content/plugins/” directory of your Wordpess site. If a previous version
    of this plugin has been installed, overwrite the entire folder.
 4. Login to your WordPress Admin Portal.
 5. On the left hand navigation panel, select “Plugins”.
 6. Activate the “Qlik for WordPress” plugin.

  Is the syntax highlighting perfect?

The syntax highlighting is an approximation of the default highlighting within the
Qlik Edit Script dialogs. It is not a perfect replication.

  Does it check if my code is valid?

This plugin is not designed to validate your Qlik code. Just because it is highlighted
it doesn’t mean your code is valid. For example, the highlighting engine has no 
way of knowing if field names within an expression/measure are actually contained
within a QlikView or Qlik Sense data model.

  Can it highlight other languages?

As well as Qlik script and expressions/measures, it can currently highlight a handful
of other languages that are associated with Qlik products. These currently include
SQL, VBScript and JavaScript. If you think there is a need for it to support another
language, please let me know.

  Can I use it with another highlighting plugin?

The plugin has not been tested with any other highlighting plugins (syntax or otherwise)
and so it cannot be guaranteed to work alongside them, especially those also based
on highlight.js.

  How does it work?

It uses a custom build of highlight.js to provide the highlighting. The highlighting
is applied client-side using javascript when the page is loaded in the browser.

  Are the icons identical to Qlik?

All Qlik Sense icons are generated using the LeonardoUI vector based font that Qlik
Sense uses and so are identical to those seen in the Qlik Sense Hub and Management
Console. QlikView icons are approximate representations of the icons found in QlikView
desktop and web UI.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Qlik for WordPress」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Matthew Fryer ](https://profiles.wordpress.org/mattfryer/)

「Qlik for WordPress」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/qlikview-syntax-highlighter/contributors)
为本插件所做的贡献。

[帮助将「Qlik for WordPress」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/qlikview-syntax-highlighter)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/qlikview-syntax-highlighter/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/qlikview-syntax-highlighter/)，或
通过[RSS](https://plugins.trac.wordpress.org/log/qlikview-syntax-highlighter/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/qlikview-syntax-highlighter/)。

## 更新日志

#### 2.0

 * Added Qlik Sense connection string support
 * Added the missing keywords DERIVE and FLUSHLOG
 * Added support for DIRECT QUERY statements
 * Fixed issue with REM comments not supporting whitespace before them
 * Fixed issue with clicking cancel on shortcode prompts results in shortcode still
   being entered
 * Fixed issue with variable declarations containing a full stop (AKA period) not
   highlighting correctly
 * Fixed issue with backslash incorrectly operating as an escape character in strings
 * Other minor highlighting improvements
 * Significant speed improvements
 * Added custom vector font to allow insertion of some Qlik icons
 * Added the LUIicons vector font from LeonardoUI to allow insertion of all Qlik
   Sense UI icons
 * Added optional extra line numbers to code block (should be used with caution 
   as can prevent correct highlighting of code than spans multiple lines eg. /* */
   block comments)
 * Changes specific to Qlik for WordPress Plugin:
 * Changed [qlikview] shortcode to [qlik-code] to better represent Qlik Sense support.
   The old shortcode is still supported for backwards compatibility
 * Button “Qlik Code” added to text editor to insert shortcode
 * Visual editor button updated
 * Corrected issue with plugin clashing with some other shortcodes resulting in 
   incorrect display. Some Google Maps plugins were amongst those affected.
 * Rewritten core code to prevent code being loaded on all pages of a site irrespective
   of whether or not the shortcode is present
 * Added admin settings page allowing turning on/off features and detailing icon
   codes
 * Ability to load CSS and JS files from the a CDN instead of the local webserver
 * Added new shortcode [qlik-icon] to allow insertion of new vector font icons.

#### 1.2

 * Updated the highlight.js core to resolve a known bug.

#### 1.1

 * Added correct identification of set analysis and its composite parts within expressions
   allowing highlighting of items within it.
 * Corrected list of functions within expressions as not all functions are possible
   in both script and expressions.
 * Corrected an issue with the incorrect shortcode being added by the TinyMCE button.
 * Added highlighting of format specification within a “LOAD…FROM…” statement in
   QlikView script.
 * Updated the Highlight.js core.

#### 1.0

 * General code improvements.
 * Corrected issue with $() variable use within a load statement not being highlighted
   correctly.
 * Corrected issue with nesting of interpretation functions (those ending with a#)
   and those functions for which a keyword exists with the same name.
 * Added highlighting of field names in most common situations.

#### 0.2

 * Added support for highlighting QlikView expressions
 * Added the ability to hightlight a handful of other languages that are related
   to QlikView.
 * Added variable definition and use support (SET, LET and $()).
 * Fixed issue with interpretation functions (those ending with a #) not being highlighted
   correctly.
 * Corrected an issue where the if function is confused with the IF statements causing
   incorrect highlighting.
 * Fixed issue where keywords were highlighted within SQL statements.
 * Added button to TinyMCE to insert the shortcode within the visual editor

#### 0.1

 * Initial pre-release.

## 额外信息

 *  版本 **2.0**
 *  最后更新：**8 年前**
 *  活跃安装数量 **20+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  语言
 * [English (UK)](https://en-gb.wordpress.org/plugins/qlikview-syntax-highlighter/)
   和 [English (US)](https://wordpress.org/plugins/qlikview-syntax-highlighter/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/qlikview-syntax-highlighter)
 * 标签
 * [Highlight](https://cn.wordpress.org/plugins/tags/highlight/)[qlik](https://cn.wordpress.org/plugins/tags/qlik/)
   [syntax](https://cn.wordpress.org/plugins/tags/syntax/)
 *  [高级视图](https://cn.wordpress.org/plugins/qlikview-syntax-highlighter/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/qlikview-syntax-highlighter/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/qlikview-syntax-highlighter/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/qlikview-syntax-highlighter/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/qlikview-syntax-highlighter/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/qlikview-syntax-highlighter/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/qlikview-syntax-highlighter/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/qlikview-syntax-highlighter/reviews/)

## 贡献者

 *   [ Matthew Fryer ](https://profiles.wordpress.org/mattfryer/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/qlikview-syntax-highlighter/)