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):

22 January 2018

     22:08  User:Ting Wang‎ (diff | hist) . . (+882). . Ting Wang (talk | contribs)

 m   20:23 

CHEM-ENG590E:Wiki Textbook‎‎ (5 changes | history) . . (+56). . [Sarah L. Perry‎ (5×)]

 m   

20:23

(cur | prev) . . (+15). . Sarah L. Perry (talk | contribs) (Chapter 5 - Valving)

 m   

20:16

(cur | prev) . . (+14). . Sarah L. Perry (talk | contribs) (Chapter 2 - Soft Lithography)

 m   

19:46

(cur | prev) . . (0). . Sarah L. Perry (talk | contribs)

 m   

19:40

(cur | prev) . . (+38). . Sarah L. Perry (talk | contribs) (Chapter 7 - Separations)

 m   

19:40

(cur | prev) . . (-11). . Sarah L. Perry (talk | contribs)

     19:58 

(Upload log). .

[Sarah L. Perry‎; Carey Dougan‎ (2×)]

     

19:58

. . Sarah L. Perry (talk | contribs) uploaded a new version of File:CHEM ENG590E Schedule.pdf

     

08:11

. . Carey Dougan (talk | contribs) uploaded a new version of File:Microscopy Guidelines 2.pdf

     

08:09

. . Carey Dougan (talk | contribs) uploaded File:Microscopy Guidelines 2.pdf

     19:57  CHEM-ENG590E:Schedule‎ (diff | hist) . . (0). . Sarah L. Perry (talk | contribs)
N    13:52  Getting reimbursed for travel and conferences‎ (diff | hist) . . (+2,251). . Reicker1 (talk | contribs) (How to get reimbursed for travel and conferences)

     13:38 

Endy:Back Door‎‎ (2 changes | history) . . (+12). . [Reicker1‎ (2×)]

     

13:38

(cur | prev) . . (+20). . Reicker1 (talk | contribs) (How to Get reimbursed, ship materials to other institutions, and other FAQs)

     

13:31

(cur | prev) . . (-8). . Reicker1 (talk | contribs) (How to Get reimbursed, ship materials to other institutions, and other FAQs)

     13:15  Endy Lab‎ (diff | hist) . . (+3). . Reicker1 (talk | contribs) (News)
     11:56  Natalie Kuldell‎ (diff | hist) . . (+39). . Nkuldell (talk | contribs) (Contact Information)

     08:13 

Peyton:Internal‎‎ (2 changes | history) . . (+82). . [Carey Dougan‎ (2×)]

     

08:13

(cur | prev) . . (-1). . Carey Dougan (talk | contribs) (Protocols)

     

08:07

(cur | prev) . . (+83). . Carey Dougan (talk | contribs) (Protocols)

21 January 2018

     20:56 

CHEM-ENG590E:People‎‎ (2 changes | history) . . (+325). . [Sarah L. Perry‎ (2×)]

     

20:56

(cur | prev) . . (+207). . Sarah L. Perry (talk | contribs)

     

14:55

(cur | prev) . . (+118). . Sarah L. Perry (talk | contribs)

     20:52 

(Upload log). .

[Sarah L. Perry‎ (4×)]

     

20:52

. . Sarah L. Perry (talk | contribs) uploaded File:Eric Ying.png

     

17:30

. . Sarah L. Perry (talk | contribs) uploaded a new version of File:CHEM ENG590E Syllabus.pdf

     

14:51

. . Sarah L. Perry (talk | contribs) uploaded File:ChemEng590E 2017-2.png(Class photo from 2017 (2 of 2))

     

14:50

. . Sarah L. Perry (talk | contribs) uploaded File:ChemEng590E 2017-1.png(Class image from 2017 (1 of 2))

     17:29  CHEM-ENG590E:Syllabus‎ (diff | hist) . . (0). . Sarah L. Perry (talk | contribs)

     14:49 

CHEM-ENG590E‎‎ (3 changes | history) . . (+2). . [Sarah L. Perry‎ (3×)]

 m   

14:49

(cur | prev) . . (-1). . Sarah L. Perry (talk | contribs)

 m   

14:49

(cur | prev) . . (+2). . Sarah L. Perry (talk | contribs)

     

14:48

(cur | prev) . . (+1). . Sarah L. Perry (talk | contribs)

20 January 2018

     22:38 

User:Victoria L. Wei‎‎ (2 changes | history) . . (-243). . [Victoria L. Wei‎ (2×)]

     

22:38

(cur | prev) . . (+12). . Victoria L. Wei (talk | contribs)

     

22:38

(cur | prev) . . (-255). . Victoria L. Wei (talk | contribs) (Blanked the page)

     16:10 (User creation log) . . User account Sbware (talk | contribs) was created by Yar (talk | contribs) and password was sent by email ‎

19 January 2018

     15:35 

User:Maya Nagasawa‎‎ (5 changes | history) . . (+178). . [Maya Nagasawa‎ (5×)]

     

15:35

(cur | prev) . . (-1). . Maya Nagasawa (talk | contribs) (Publications)

     

15:33

(cur | prev) . . (+6). . Maya Nagasawa (talk | contribs) (Publications)

     

15:33

(cur | prev) . . (-7). . Maya Nagasawa (talk | contribs) (Publications)

     

15:32

(cur | prev) . . (-2). . Maya Nagasawa (talk | contribs) (Publications)

     

15:32

(cur | prev) . . (+182). . Maya Nagasawa (talk | contribs) (Publications)

     15:17 

Endy:Stanford Lab Meetings‎‎ (3 changes | history) . . (-32). . [Endy‎ (3×)]

     

15:17

(cur | prev) . . (+8). . Endy (talk | contribs)

     

15:17

(cur | prev) . . (+4). . Endy (talk | contribs)

     

15:06

(cur | prev) . . (-44). . Endy (talk | contribs) (Endy Lab Meetings Spring 2017)

N    14:53  Get reimbursed for Travel‎ (diff | hist) . . (+49). . Reicker1 (talk | contribs) (Created page with "This is a second test because nothing is working.")

     14:49 

Endy:Back Door‎‎ (3 changes | history) . . (+8). . [Reicker1‎ (3×)]

     

14:49

(cur | prev) . . (0). . Reicker1 (talk | contribs) (How to Get reimbursed, ship materials to other institutions, and other FAQs)

     

14:47

(cur | prev) . . (+1). . Reicker1 (talk | contribs) (How to Get reimbursed, ship materials to other institutions, and other FAQs)

     

13:50

(cur | prev) . . (+7). . Reicker1 (talk | contribs) (Reimbursements & Stuff: How Tos and FAQs)

N    14:18  Get reimbursed fo Travel‎ (diff | hist) . . (+52). . Reicker1 (talk | contribs) (Created page with "This is a test because I can't seem to save my page.")
N    14:09  Send my research materials to someone at another research institution?‎ (diff | hist) . . (+2,187). . Reicker1 (talk | contribs) (Created page with "'''How to: get reimbursed for travel and conferences?''' First and foremost:''' You must book your travel with an airline from the ''Fly America Act'' list. Stanford does n...")

N    13:44 

How do I...get reimbursed-Travel‎‎ (2 changes | history) . . (+2,295). . [Reicker1‎ (2×)]

     

13:44

(cur | prev) . . (+29). . Reicker1 (talk | contribs)

N    

13:30

(cur | prev) . . (+2,266). . Reicker1 (talk | contribs) (Created page with "'''Getting reimbursed for travel and conferences''' '''First and foremost: You must book your travel with an airline from the Fly America Act list.''' Stanford does not rei...")

     13:19 

10K Genes/Submission Documentation‎‎ (4 changes | history) . . (+398). . [Koeng‎ (4×)]

     

13:19

(cur | prev) . . (-6). . Koeng (talk | contribs) (Genbank files)

     

13:19

(cur | prev) . . (-1). . Koeng (talk | contribs) (Genbank files)

     

13:19

(cur | prev) . . (+7). . Koeng (talk | contribs)

     

13:18

(cur | prev) . . (+398). . Koeng (talk | contribs)


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