npTips plugin

About this plugin

With this easy to use plugin you can shown to your publication users a fully personalized Tips Of The Day dialog which can include useful tips in order to make a better use of your publication.

You can specify the Tips adding items separatelly or loaded all from a file. HTML is available, and also CSS style to be applied to this HTML. The Tips dialog can be translated to other languages too.

Thirparty

This plugin are imposible without the aid of this people:

Thanks a lot!

Plugin actions index

npTipsShow

Show the Tips window using the previously set content, style, options, language, etc. Note you need to add some tips before to use this action. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

The "Show at start" variable have two uses. Before the dialog is shown their value determine if the "Show at start" checkbox are checked or not. After the dialog is shown the plugin fill this variable with "True" if the referred checkbox are checked or "False" if the user uncheck it.

↑↑

npTipsShowAt

Show the Tips window with the specified Tip using the previously set content, style, options, language, etc. Note you need to add some tips before to use this action. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

The "Show at start" variable have two uses. Before the dialog is shown their value determine if the "Show at start" checkbox are checked or not. After the dialog is shown the plugin fill this variable with "True" if the referred checkbox are checked or "False" if the user uncheck it.

↑↑

npTipsClose

Close a previously shown Tips dialog. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npTipsStyle

Specify the CSS style that you want to apply in the tips HTML content. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npTipsAddItem

Add a new Tip specifying their HTML content. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npTipsLoadFromFile

Load the Tips (one per line) from the specified file. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npTipsOptions

Specify some general options for the Tips dialog. The available options are listed here:

Note that "ShowLeftPanel" determine the behaviour of "IconPath" and "ShowNumbers", in other words, if "ShowLeftPanel" is "False", then the others elements are not shown. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npTipsLanguage

Use this action to translate the Tips dialog to your desired language. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npOnTipsShow

Specify a subroutine to be executed when the Tips dialog are shown to the user. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npOnTipsClose

Specify a subroutine to be executed when the Tips dialog are closed by the user. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npOnTipsLinkClick

Specify a subroutine to be executed when a Tip HTML link are clicked by the user. The Href variable store the string placed in the "href" attribute of the HTML link, which not necessarily need to be a URL, but can be just an identifier that you can recognize. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

Action errors subroutine

All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.

But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:

Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:

:OnNeoPluginActionError
  AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]"
Return

Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.

↑↑