You are viewing Revision 1 of APIs_RegSpecialPage

This page is registered as a special page, however you are viewing a previous revision of the page. As such, the special page function will not be triggered.

Subroutine Name

RegSpecialPage

Syntax

RegSpecialPage(PageName, Subroutine)

Options

PageName - This is a required option. Pass the name of a page here, or optionally you can use a regex here to match all pages with a certain pattern.

Subroutine - This should be the subroutine that is called when the page name you specify is loaded. Must be entered in this format: \&SubroutineName

Examples

These are actual examples from the Aneuch source code:

RegSpecialPage('RecentChanges', \&DoRecentChanges);
This registers the page 'RecentChanges', and will call the subroutine DoRecentChanges every time the page is loaded.

RegSpecialPage("$DiscussPrefix*", \&DoDiscuss);
This registers any page which begins with $DiscussPrefix, which defaults to 'Discuss_', and will call the subroutine DoDiscuss every time one of these pages is loaded.