internal package Foswiki::Plugins::HttpsRedirectPlugin

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

internal package Foswiki::Plugins::HttpsRedirectPlugin

To interact with TWiki use ONLY the official API functions in the Foswiki::Func module. Do not reference any functions or variables elsewhere in TWiki, as these are subject to change without prior warning, and your plugin may suddenly stop working.

For increased performance, all handlers except initPlugin are disabled below. To enable a handler remove the leading DISABLE_ from the function name. For efficiency and clarity, you should comment out or delete the whole of handlers you don't use before you release your plugin.

NOTE: When developing a plugin it is important to remember that TWiki is tolerant of plugins that do not compile. In this case, the failure will be silent but the plugin will not be available. See System.Plugins#FAILEDPLUGINS for error messages.

NOTE: Defining deprecated handlers will cause the handlers to be listed in System.Plugins#FAILEDPLUGINS. See System.Plugins#Handlig_deprecated_functions for information on regarding deprecated handlers that are defined for compatibility with older TWiki versions.

NOTE: When writing handlers, keep in mind that these may be invoked on included topics. For example, if a plugin generates links to the current topic, these need to be generated before the afterCommonTagsHandler is run, as at that point in the rendering loop we have lost the information that we the text had been included from another topic.

initPlugin($topic, $web, $user, $installWeb) -> $boolean

  • $topic - the name of the topic in the current CGI query
  • $web - the name of the web in the current CGI query
  • $user - the login name of the user
  • $installWeb - the name of the web the plugin is installed in

REQUIRED

Called to initialise the plugin. If everything is OK, should return a non-zero value. On non-fatal failure, should write a message using Foswiki::Func::writeWarning and return 0. In this case
PluginErrors
TWikiCompatibilityPlugin
none
SpreadSheetPlugin
none
AutoViewTemplatePlugin
none
CommentPlugin
none
CompareRevisionsAddonPlugin
none
EditTablePlugin
none
HistoryPlugin
none
HttpsRedirectPlugin
none
InterwikiPlugin
none
JQueryCompatibilityModePlugin
none
JQueryLibPlugin
none
JQueryPlugin
none
JQueryTwistyPlugin
none
MailerContribPlugin
none
MathModePlugin
none
PreferencesPlugin
none
RenderListPlugin
none
SendEmailPlugin
none
SlideShowPlugin
none
SmiliesPlugin
none
TablePlugin
none
TinyMCEPlugin
none
TwistyPlugin
none
WysiwygPlugin
none
HandlerPlugins
afterCommonTagsHandlerTablePlugin
afterEditHandlerWysiwygPlugin
beforeCommonTagsHandlerEditTablePlugin
PreferencesPlugin
WysiwygPlugin
beforeEditHandlerTinyMCEPlugin
WysiwygPlugin
beforeMergeHandlerWysiwygPlugin
beforeSaveHandlerCommentPlugin
WysiwygPlugin
commonTagsHandlerSpreadSheetPlugin
CommentPlugin
CompareRevisionsAddonPlugin
EditTablePlugin
MathModePlugin
SlideShowPlugin
SmiliesPlugin
earlyInitPluginTWikiCompatibilityPlugin
finishPluginJQueryPlugin
initPluginTWikiCompatibilityPlugin
SpreadSheetPlugin
AutoViewTemplatePlugin
CommentPlugin
CompareRevisionsAddonPlugin
EditTablePlugin
HistoryPlugin
HttpsRedirectPlugin
InterwikiPlugin
JQueryCompatibilityModePlugin
JQueryLibPlugin
JQueryPlugin
JQueryTwistyPlugin
MailerContribPlugin
MathModePlugin
PreferencesPlugin
RenderListPlugin
SendEmailPlugin
SlideShowPlugin
SmiliesPlugin
TablePlugin
TinyMCEPlugin
TwistyPlugin
WysiwygPlugin
modifyHeaderHandlerWysiwygPlugin
postRenderingHandlerEditTablePlugin
MathModePlugin
PreferencesPlugin
WysiwygPlugin
preRenderingHandlerInterwikiPlugin
RenderListPlugin
SmiliesPlugin
TablePlugin
renderWikiWordHandlerTWikiCompatibilityPlugin
24 plugins

will indicate which plugins failed.

In the case of a catastrophic failure that will prevent the whole installation from working safely, this handler may use 'die', which will be trapped and reported in the browser.

You may also call Foswiki::Func::registerTagHandler here to register a function to handle variables that have standard TWiki syntax - for example, =%MYTAG{"my param" myarg="My Arg"}%. You can also override internal TWiki variable handling functions this way, though this practice is unsupported and highly dangerous!

Note: Please align variables names with the Plugin name, e.g. if your Plugin is called FooBarPlugin?, name variables FOOBAR and/or FOOBARSOMETHING. This avoids namespace issues.

 
This site is powered by FoswikiCopyright &© by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding UTfit? Send feedback