[Home]Functions

UseModWiki | RecentChanges | Preferences

UseModWiki/Documentation: Functions - GlobalVariables - DataBase - Actions

Subroutine Listings

This is some incomplete documentation about the various subroutines which make up wiki.cgi.

There are several broad types of functions in wiki.cgi These can usually be identified by the name of the function...

Calc routines
CalcDay
CalcDayNow
CalcTime?

Create dir routines
CreateDir
CreatePageDir?
CreateUserDir

Do routines
DoBrowseRequest
DoCacheBrowse
DoEdit
DoEditBanned?
DoEditLinks?
DoEditLock?
DoEditPrefs?
DoEnterLogin?
DoHistory
DoIndex?
DoLinks
DoLogin?
DoMaintain?
DoNewLogin
DoOtherRequest
DoPageLock?
DoPost?
DoRandom
DoRc
DoSearch?
DoShowVersion
DoUnlock?
DoUpdateBanned?
DoUpdateLinks?
DoUpdatePrefs?
DoWikiRequest

Get routines
Get link routines
GetAuthorLink?
GetEditLink
GetFullLinkList
GetHistoryLink?
GetOldPageLink
GetPageLink
GetPageLinkText
GetPageLinks
GetPageOrEditLink
GetPrefsLink?
GetRandomLink?
GetSearchLink
GetSlashPageLink
ISBNLink (should be GetISBNLink?)
InterPageLink? (should be GetInterPageLink?)
RFCLink (should be GetRFCLink?)
UrlLink? (should be GetUrlLink?)
Script link routines (should be Get Script link routines)
ScriptLink
ScriptLinkDiff?
ScriptLinkDiffRevision?
ScriptLinkTitle?
SlashScriptLink
Get file routines
GetHtmlCacheFile
GetLockedPageFile?
GetPageFile
KeepFileName (should be GetKeepFile?)
UserDataFilename (should be GetUserDataFile)
GetBracketUrlIndex?
GetCacheDiff
GetCommonFooter
GetDiff?
GetDiffHTML?
GetFooterText
GetFormCheck?
GetFormStart
GetFormText?
GetGotoBar
GetHeader
GetHiddenValue
GetHistoryLine
GetKeptDiff?
GetNewUserId?
GetPageCache
GetPageDirectory
GetParam
GetRcHtml
GetRedirectPage
GetRemoteHost?
GetSearchForm
GetSiteUrl
GetTextArea?
AllPagesList (should be GetAllPagesList?)

Init routines
InitCookie
InitLinkPatterns
InitRequest

Open routines
OpenDefaultText
OpenKeptList
OpenKeptRevision
OpenKeptRevisions
OpenNewPage
OpenNewSection
OpenNewText
OpenPage
OpenSection
OpenText
LoadUserData (should be OpenUserData?)

Print list routines
PrintLinkList
PrintPageList?

Read routines
ReadFile
ReadFileOrDie

Rename routines
RenameKeepText?
RenamePage?
RenameTextLinks?

Save routines
SaveDefaultText?
SaveKeepSection
SavePage?
SaveSection
SaveText?
SaveUserData

Store routines
StoreBracketInterPage?
StoreBracketLink?
StoreBracketUrl?
StoreHref?
StoreISBN?
StoreInterPage?
StorePageOrEditLink?
StorePre?
StoreRFC?
StoreRaw
StoreUrl?

Substitute routines
SubFreeLink?
SubWikiLink?
SubstituteTextLinks?

Update routines
UpdateDiffs?
UpdateHtmlCache?
UpdateLinksList
UpdatePageVersion
UpdatePrefCheckbox?
UpdatePrefNumber?

User routines
UserCanEdit
UserIsAdmin
UserIsAdminOrError?
UserIsBanned?
UserIsEditor
UserIsEditorOrError?

Write routines
WriteDiff?
WriteRcLog?
WriteStringToFile?
AppendStringToFile?

Wiki routines
WikiHeading?
WikiLinesToHtml
WikiToHTML

Lock routines
DoEditLock?
DoPageLock?
DoUnlock?
ForceReleaseLock?
GetLockedPageFile?
ReleaseCacheLock?
ReleaseDiffLock?
ReleaseIndexLock?
ReleaseLock?
ReleaseLockDir?
RequestCacheLock?
RequestDiffLock?
RequestIndexLock?
RequestLock?
RequestLockDir?

Cache routines
DoCacheBrowse -- display page from cache if we can
GetHtmlCacheFile - gets cache html filename for an id
GetCacheDiff
GetPageCache
SetPageCache
RequestCacheLock?
ReleaseCacheLock?
UpdateHtmlCache?
UnlinkHtmlCache?
NewPageCacheClear?

Misc (unsorted) routines
BuildLinkIndex?
BuildLinkIndexPage?
GenerateAllPagesList?
BrowsePage
ReBrowsePage
ColorDiff
CommonMarkup
DeletePage
DiffToHTML?
EditRecentChanges?
EditRecentChangesFile?
EmailNotify
ExpireKeepFile?
FreeToNormal
QuoteHtml?
ReportError
SearchBody
SearchTitleAndBody
SendEmail
SpaceToLine?
SplitUrlPunct?
StripUrlPunct?
TimeToText?
UnlinkHtmlCache?
UpdateEmailList
ValidId
ValidIdOrDie


Reminds me of Wiki:HyperPerl. Nifty. That would be a cool addition here. Maybe I'll spend some time to see if I can figure that out. -- ChrisFedde

Perl has got an 'Literate Programming' kind of Documentation: POD. You should not re-invent the wheel. But perhaps we can have a special kind of page where the source is not 'usemod-language' but 'perl with pod'. You can edit this just like another wiki page. But if you read it you will see only the POD. Perhaps with links if you use them in the pod. So you will be able to create a program in a wiki but normal users of this program may also take perldoc to read the doc. --ThomasBayen

I'm glad you said 'kind of'. See [POD is not Literate Programming] by MarkJasonDominus. --DavidWall


Check out WikiDemo? v0.92subs (currently at http://river.redbricks.org.uk/WikiDemo/v0.92subs but up to date link on RiVer/WikiDemo page) for a listing of each sub in its own file, just as it is in the v0.92 release. I hope this will make a useful complement to the work that is being done on this page here.

Thanks for the good work you have been doing getting info on these functions set up.

Maybe it would be even more useful when you do some more to make them subpages of this page, then it would be easy to come back to this page between looking at each one.

Please don't take this as a complaint, I would much rather have the stuff you have done than not have it at all!

The issue is not clear cut either - an advantage of the way things are now is that when we mention sub names in passing they become WikiLinks - it would be a pain to have to prefix each one with Functions/...

And is there so much already on the various pages it would be too much work now to go over to subpages?

Hmmm, a thought that started out as Thanks plus polite request has now demoted itself in my mind to Thanks plus a vague suggestion...

--RiVer


For those wanting a template to use for functions: Function template

UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited August 27, 2013 7:57 pm by JuanmaMP (diff)
Search: