C# Class WikiFunctions.TalkPages.TalkPageFixes

Datei anzeigen Open project: reedy/AutoWikiBrowser

Public Methods

Method Description
FormatDefaultSort ( string articleText ) : string

Formats the default sort: ensures in {{DEFAULTSORT:key}} format

ProcessTalkPage ( string &articleText, DEFAULTSORT moveDefaultsort ) : bool

Processes talk pages: moves any talk page header template, moves any default, adds a section heading if missing

WPBiography ( string articletext ) : string

Moves WPBiography with living=yes above any WikiProject templates per Wikipedia:TPL#Talk_page_layout Does various fixes to WPBiography en-wiki only

WPJazz ( string articletext ) : string

Does various fixes to WPJazz en-wiki only

WPSongs ( string articletext ) : string

Does various fixes to WPSongs en-wiki only

WikiProjectBannerShell ( string articletext ) : string

Performs fixes to the WikiProject banner shell template: Add explicit call to first unnamed parameter 1= if missing/has no value Remove duplicate parameters Moves any other WikiProjects into WPBS

Private Methods

Method Description
AddMissingFirstCommentHeader ( string articleText ) : string

Adds a section 2 heading before the first comment if the talk page does not have one

AddWikiProjectBannerShell ( string articletext ) : string

Adds WikiProject banner shell when needed (>= 3 WikiProject templates and no WikiProject banner shell)

MoveTalkTemplate ( string articleText, Regex r ) : string

Moves the input template to the top of the talk page

MoveTalkTemplates ( string articleText, Regex r ) : string

Moves the input templates to the top of the talk page

SetDefaultSort ( string key, DEFAULTSORT location, string articleText ) : string

Moves the default sort.

WriteHeaderTemplate ( string name, string &articleText ) : void

Writes the input template to the top of the input page; updates the input edit summary

Method Details

FormatDefaultSort() public static method

Formats the default sort: ensures in {{DEFAULTSORT:key}} format
public static FormatDefaultSort ( string articleText ) : string
articleText string /// The article text. ///
return string

ProcessTalkPage() public static method

Processes talk pages: moves any talk page header template, moves any default, adds a section heading if missing
public static ProcessTalkPage ( string &articleText, DEFAULTSORT moveDefaultsort ) : bool
articleText string The talk page text
moveDefaultsort DEFAULTSORT The action to take over any defaultsort on the page
return bool

WPBiography() public static method

Moves WPBiography with living=yes above any WikiProject templates per Wikipedia:TPL#Talk_page_layout Does various fixes to WPBiography en-wiki only
public static WPBiography ( string articletext ) : string
articletext string The talk page text
return string

WPJazz() public static method

Does various fixes to WPJazz en-wiki only
public static WPJazz ( string articletext ) : string
articletext string The talk page text
return string

WPSongs() public static method

Does various fixes to WPSongs en-wiki only
public static WPSongs ( string articletext ) : string
articletext string The talk page text
return string

WikiProjectBannerShell() public static method

Performs fixes to the WikiProject banner shell template: Add explicit call to first unnamed parameter 1= if missing/has no value Remove duplicate parameters Moves any other WikiProjects into WPBS
public static WikiProjectBannerShell ( string articletext ) : string
articletext string The talk page text
return string