User:Austin J. Che/Extensions/Recentchangesfilter

From OpenWetWare
Jump to: navigation, search

Special:Recentchanges Filtering

The standard recent changes list can be overwhelming on a large site with the number of changes. This extension allows users to track a subset of changes that they are interested in and allows users to set preferences for the default filters to use when displaying the recent changes list.

General Usage

The key to using this extension is to create desired filters. A filter is used in several possible ways. The filter can be passed as parameters at the end of the URL as extra path info, e.g. /wiki/Special:Recentchanges/parameters. They can also be passed with the real script path as in /index.php?title=Special:Recentchanges&filter=parameters. A URL created in this manner can be either bookmarked in a browser, linked from a wiki page, or directly included within another wiki page (see below).

Logged in users also have the ability to set their preferences (with help from the PreferencesExtension). When that extension is also installed, several additional options are added under the recent changs tab of a user's preferences. The enable filtering option turns on or off default filtering. With this option off, when the recent changes page is accessed without a filter in the URL, a normal recent changes page is returned (all results). If this option is enabled, then the other options determine the behavior of the Special:Recentchanges page when accessed without a filter. The filter list is of the form [name1]filter1...;[name2]filter2...;[name3]filter3 for as many filters as one would like to define. The [name] part is optional but if not specified, the default name will be the filter number. The last preference allows specifying the default filter (by number, with the first filter numbered 0). When a user access the recent changes page, the default filter will be used if no other filter is given. In addition, the page will contain easy links to switch between all the filters listed on their filter list. An empty filter will always match everything and it is probably a good idea to always include this somewhere in one's list.

Filter Specification

The filter is specified as a boolean statement in disjunctive normal form (groups of expressions ANDed together that are then all ORed together).

Expression

The general form for an expression is <match type>=<match pattern>.

Match types are 1 or 2 letter codes and specify how the match pattern should be used in selecting items to display in the recent changes list. The basic types and their meaning:

  • b: titles that begin with the pattern
  • e: titles that end with the pattern
  • c: titles that contain the pattern
  • m: titles that match where the match expression can contain any number of the '%' character to represent a wildcard character that matches any number of charaters. This is a more general version of the b, e, and c types.
  • n: The match pattern should be either a number corresponding to a namespace or the name of a namespace. This matches all pages that are in the given namespace. The main namespace has number 0 and doesn't have a name so you have to use the number. For other namespaces, you can use the name (e.g. 'User talk') or you can find the number by selecting the namespace in the dropdown list of the recent changes page, click go, and look at the URL to determine the namespace to number mapping. There's also a namespace called 'Special' with number -1 that includes pages like the upload log.
  • u: match changes that were done by the given user
  • w: match changes for pages on your (or whoever's currently logged in) watchlist. The match pattern is ignored so it can just be set to 1 or left off completely.

All of the above types have a negated version with an extra n in front, i.e. nb, ne, nc, etc. For example, nb=foo will match all pages that don't begin with foo.

If no match type is specified (there is no equals sign), then the matching will be done with the default type of b.

Note that for the purpose of selecting pages by titles, it is necessary to be clear which namespace a page is in. For example, the page User:Austin is not a page titled User:Austin but rather a page titled Austin in the namespace User. Thus, b=User won't match this page but either b=Austin or n=User would. Pages like Knight:Contact are in the main namespace so b=Contact wouldn't match this whereas b=Knight would.

Joining Expressions

'^' is used to represent AND and ',' (comma) is used to represent OR. Expressions are assumed to be in disjunctive normal form so there's an intrinsic parenthesis order (and no way to change this order). This means that all the ANDs have higher precedence than the ORs.

Examples

Including within another page

The special page can be included using the standard {{Special:Recentchanges/parameters)}} syntax. This allows including a select list of changes on a page. For example, here's a live demo showing the last 5 changes of articles in the main namespace that do not have a ':' in their name (uncategorized/general pages):

19 April 2018

     08:40  Taylor:Publications‎ (diff | hist) . . (+18). . Lynne S. Taylor (talk | contribs) (PUBLICATIONS)
     07:22  Lee:JC‎ (diff | hist) . . (+166). . Wooin Lee (talk | contribs) (Lab meeting schedule)

18 April 2018

     20:43 

X-Lab‎‎ (4 changes | history) . . (0). . [ChanEngr‎ (4×)]

     

20:43

(cur | prev) . . (0). . ChanEngr (talk | contribs)

     

20:38

(cur | prev) . . (0). . ChanEngr (talk | contribs)

     

20:36

(cur | prev) . . (0). . ChanEngr (talk | contribs)

     

20:35

(cur | prev) . . (0). . ChanEngr (talk | contribs)

 m   16:47 

User:Korey Griffin‎‎ (2 changes | history) . . (+32). . [Korey Griffin‎ (2×)]

 m   

16:47

(cur | prev) . . (-47). . Korey Griffin (talk | contribs) (Contact)

 m   

11:03

(cur | prev) . . (+79). . Korey Griffin (talk | contribs) (Empirical Resources)

     15:21 

User:Johannes Stuttmann‎‎ (3 changes | history) . . (+4,407). . [Johannes Stuttmann‎ (3×)]

     

15:21

(cur | prev) . . (+1,692). . Johannes Stuttmann (talk | contribs)

     

14:42

(cur | prev) . . (+2,470). . Johannes Stuttmann (talk | contribs)

     

13:09

(cur | prev) . . (+245). . Johannes Stuttmann (talk | contribs)

     13:02  Hydrochloric acid‎ (diff | hist) . . (+1). . Yar (talk | contribs) (typing error from user email)

     12:52 

(User creation log). .

[Yar‎ (2×)]

     

12:52

. . User account Ally B (talk | contribs) was created by Yar (talk | contribs) and password was sent by email ‎

     

12:52

. . User account Jakob (talk | contribs) was created by Yar (talk | contribs) and password was sent by email ‎

N    12:46 

BIOL478/S18:Microarray Data Analysis‎‎ (24 changes | history) . . (+34,776). . [Kam D. Dahlquist‎ (24×)]

     

12:46

(cur | prev) . . (-70). . Kam D. Dahlquist (talk | contribs) (Gridding and Generating Intensity Data: remove old Brightspace link)

     

12:45

(cur | prev) . . (+1). . Kam D. Dahlquist (talk | contribs) (GenePix Pro Protocol (Steps 1-3): fix Brightspace link to raw data)

     

12:16

(cur | prev) . . (+1,241). . Kam D. Dahlquist (talk | contribs) (Before We Begin: add section on lab notebook)

     

12:04

(cur | prev) . . (0). . Kam D. Dahlquist (talk | contribs) (Background: fix list formatting)

     

12:03

(cur | prev) . . (+108). . Kam D. Dahlquist (talk | contribs) (Background: add GRNsight)

     

12:02

(cur | prev) . . (+3,845). . Kam D. Dahlquist (talk | contribs) (Identifying regulatory transcription factors responsible for observed changes in gene expression (step 10): paste in GRNsight instructions)

     

12:00

(cur | prev) . . (+3,072). . Kam D. Dahlquist (talk | contribs) (Identifying regulatory transcription factors responsible for observed changes in gene expression (step 10): paste in protocol from Biomath modeling, modify for HMO1)

     

11:56

(cur | prev) . . (+114). . Kam D. Dahlquist (talk | contribs) (Clustering and GO Term Enrichment with stem (steps 7-8): add section for step 10)

     

11:55

(cur | prev) . . (-751). . Kam D. Dahlquist (talk | contribs) (Clustering and GO Term Enrichment with stem (steps 7-8): delete comment, emphasize to unzip)

     

11:52

(cur | prev) . . (0). . Kam D. Dahlquist (talk | contribs) (Modified t test for each timepoint: fix formula)

     

11:29

(cur | prev) . . (+52). . Kam D. Dahlquist (talk | contribs) (Sanity Check: Number of genes significantly changed: add label to link)

     

11:29

(cur | prev) . . (+29). . Kam D. Dahlquist (talk | contribs) (Sanity Check: Number of genes significantly changed: add link to xkcd comic)

     

11:25

(cur | prev) . . (-360). . Kam D. Dahlquist (talk | contribs) (replace opi1 with hmo1)

     

11:24

(cur | prev) . . (+18). . Kam D. Dahlquist (talk | contribs) (replace wt with dHMO1)

     

11:22

(cur | prev) . . (+36). . Kam D. Dahlquist (talk | contribs) (Modified t test for each timepoint: replace wt with dHMO1)

     

11:20

(cur | prev) . . (-22). . Kam D. Dahlquist (talk | contribs) (Looking at the raw data: fix links to SGD)

     

11:18

(cur | prev) . . (+3). . Kam D. Dahlquist (talk | contribs) (Downloading the Data: change to hmo1)

     

11:07

(cur | prev) . . (+35). . Kam D. Dahlquist (talk | contribs) (Statistical Analysis (Step 6): change to delta-hmo1)

     

10:35

(cur | prev) . . (+61). . Kam D. Dahlquist (talk | contribs) (GenePix Pro Protocol (Steps 1-3): note that this will be demo'd, change opi1 to hmo1)

     

10:33

(cur | prev) . . (+27). . Kam D. Dahlquist (talk | contribs) (Background: steps 1-3 done for you)

     

10:32

(cur | prev) . . (+74). . Kam D. Dahlquist (talk | contribs) (Background: add link for YEASTRACT)

     

10:30

(cur | prev) . . (+15). . Kam D. Dahlquist (talk | contribs) (change dates, mention of Windows 10)

     

10:26

(cur | prev) . . (+27,230). . Kam D. Dahlquist (talk | contribs) (paste in from S18)

N    

10:26

(cur | prev) . . (+18). . Kam D. Dahlquist (talk | contribs) (create page with under construction flag)

     10:27  Dahlquist:Protocols‎ (diff | hist) . . (+152). . Kam D. Dahlquist (talk | contribs) (Dry Lab Protocols: create link to BIOL 478 Spring 2018 protocol)

     09:43 

Crosby:Lab Members‎‎ (2 changes | history) . . (+41). . [Mohammad H. Dezfulian‎ (2×)]

     

09:43

(cur | prev) . . (+71). . Mohammad H. Dezfulian (talk | contribs) (Recent Alumni)

     

09:41

(cur | prev) . . (-30). . Mohammad H. Dezfulian (talk | contribs) (Graduate Students)

     08:35  CAMRI:SeminarSeries‎ (diff | hist) . . (+62). . Lexi E. Crommett (talk | contribs)
     08:00 (Upload log) . . Reinca (talk | contribs) uploaded File:FinalView2.JPG
     01:58  User:Timothee Flutre‎ (diff | hist) . . (+141). . Timothee Flutre (talk | contribs) (Links: add open data repos)

17 April 2018

     23:41  BME100 s2018:Group7 W1030 L6‎ (diff | hist) . . (+454). . Dragos (talk | contribs) (Intro to Computer-Aided Design)

     23:23 

BME100 s2018:Group8 W0800 L6‎‎ (3 changes | history) . . (+601). . [Leaverjill‎ (3×)]

     

23:23

(cur | prev) . . (+293). . Leaverjill (talk | contribs) (Feature 2: Hardware - PCR Machine & Fluorimeter)

     

23:20

(cur | prev) . . (+1). . Leaverjill (talk | contribs) (Bayesian Statistics)

     

23:19

(cur | prev) . . (+307). . Leaverjill (talk | contribs) (Feature 2: Hardware - PCR Machine & Fluorimeter)

     23:22  BME100 s2018:Group1 W1030 L6‎ (diff | hist) . . (+8). . Erik Halsband (talk | contribs) (Intro to Computer-Aided Design)
     23:18 (Upload log) . . Erik Halsband (talk | contribs) uploaded a new version of File:ClosedFlourimeter.JPG(Re-rendered with updated walls.)

Installation/MediaWiki compatibility

More than most extensions, this one depends heavily on the internals of MediaWiki. Much of the code from wfSpecialRecentchanges is directly copied into this extension and updates to MediaWiki will require the corresponding update to this code. The current version of the code has been updated to work with the MediaWiki 1.6. An older version that works with MediaWiki version 1.5 is also available in the source directory.


Send bugs and comments to Austin Che. Other extensions including sources can be found at User:Austin J. Che/Extensions.