User:Mpaa

From Wikisource
Jump to navigation Jump to search
Awards for participation
Proofread of the Month
November 2011

Special: Validation month
Proofread of the Month
November 2012

Special: Validation month
Proofread of the Month
January 2013

Short works (8 completed)
Proofread of the Month
November 2013

Special: Validation month
Proofread of the Month
December 2013 (Third work)
How to Play Chess
26 validated works
Proofread of the Month
November 2014

Special: Validation month
26 works
Proofread of the Month
November 2015

Special: Validation month
Proofread of the Month
November 2016

Special: Validation month

To
The Inhabitants of SPACE IN GENERAL
And H. C. IN PARTICULAR
This Work is Dedicated
By a Humble Native of Flatland
In the Hope that
Even as he was Initiated into the Mysteries
Of THREE Dimensions
Having been previously conversant
With ONLY TWO
So the Citizens of that Celestial Region
May aspire yet higher and higher
To the Secrets of FOUR FIVE OR EVEN SIX Dimensions
Thereby contributing
To the Enlargement of THE IMAGINATION
And the possible Development
Of that most rare and excellent Gift of MODESTY
Among the Superior Races
Of SOLID HUMANITY

TUSC

[edit]

I am now proud owner of a TUSC account!

Templates

[edit]

{{smaller block}} (less interline space)

{{hanging indent inherit}}

{{dropinitial}}

{{left margin}}

{{--}} mdash -> alt (num keypad) 0230

{{***}} * * *

{{Strike}} , better {{Bar}}

{{ShowTransclude}}: [[../Aphrodite|Aphrodite]]

{{linkable phrase start}} and {{linkable phrase end}}

Page status template in Swedish WS

Wikisource:Statistik in Swedish WS

Help

[edit]

Help:Editing poetry

Formula

Table

w:User:Dcljr/Tables

Help talk:Public domain Copyright and translations

Commons:Copyright_tags

w:Wikipedia:Non-U.S._copyrights

Special pages

[edit]

Special:MassDelete

Users

[edit]

User:Phe statistics tool

Useful things

[edit]

Footnotes

[edit]

Footnotes of foonotes

[edit]

From: User:Inductiveload

Replace the outer

<ref name="foo" group="bar" follow="ook">Footnote content</ref>

with

{{#tag:ref|Footnote content|name=foo|group=bar|follow=ook}}

but leave the inner one alone.

For example, this text contains a footnote that itself contains a footnote.[outer 1]

  1. This is the outer footnote.[inner 1]
  1. This is the inner footnote


Footnotes on more than one page

[edit]

If the note is carried over on more than one print page, the solution is to use a named reference <ref name="pageno"> on the first page, and on subsequent pages containing the footnote use the syntax <ref follow="pageno"> (use same name).

Notes at the end of a work

[edit]

Have a look what I have done with {{IrishBio ref}}, which is built upon another of my creations {{authority reference}}. If there are only a smaller number to do for the work, we can use the latter template directly, if you have quite a few references, then we can build a template specifically for the work, like I did. On the authorities page on the work (your link) we would add wrap each authority in a section tag, with an anchor outside of that. — billinghurst sDrewth 00:45, 8 January 2012 (UTC)

Default layouts

[edit]

From: User:Inductiveload

To use it, you have to add the following to your JS:

importScript('User:Inductiveload/layout_override.js');

On the the page that you wish to set a default layout, you simply add the following template:

{{default layout|Layout 2}}

where "Layout 2" is the desired layout name (as specified in MediaWiki:Common.js).

This overrides the user's cookie (which is how the layout persists normally) for that page only. If the next page the user views has no {{default layout}} template, the layout reverts to the user's cookie-stored layout (which is "Layout 1" for people who haven't changed it).

Indexes

[edit]

From: User_talk:Cygnis_insignis#Indexes

[[A Book of Myths/{{subst:#ifexpr:{{{1}}}<11|Prometheus and Pandora|
 the title/substitute a page number with a link to that page, in that section

repeated for each section of the work. If the number it is wrapped around was less than 11, it would create a link [[A Book of Myths/Prometheus and Pandora#9|9]]

[[A Book of Myths/{{subst:#ifexpr:{{{1}}}<11|Prometheus and Pandora|{{subst:#ifexpr:{{{1}}}<16|Pygmalion|{{subst:#ifexpr:{{{1}}}<26|Phaeton|{{subst:#ifexpr:{{{1}}}<31|Endymion|{{subst:#ifexpr:{{{1}}}<42|Orpheus|{{subst:#ifexpr:{{{1}}}<46|Apollo and Daphne|{{subst:#ifexpr:{{{1}}}<69|Psyche}}}}}}}}}}}}}}#{{{1}}}|{{{1}}}]]

How to apply, e.g. in a table: |some text |align=right|{{subst:User:xxx/test|17}}, {{subst:User:xxx/test|42}}, {{subst:User:xxx/test|53}}, {{subst:User:xxx/test|57}} |- When saved, text is replaced.


How to split a table across many Page: pages so they transclude neatly into one

[edit]

See Help:Page_breaks#Tables_across_page_breaks

Collapsible Tables

[edit]
 {| ... class="collapsible collapsed" border-collapse="collapse" cellspacing="0" ...
 !...
 ...
 |}

Indent tables

[edit]
{| style="margin-left: 20px;"

List of Illustrations

[edit]

Example: Page:Things_Seen_In_Holland_(1912).djvu/17

Commons tools

[edit]

IA import tool, uploaded by commons:User:IaUploadBot

Outdent

[edit]

{{overfloat left|align=right|depth=1em|"}}{{di|H|margin-left=1em}}ANDS UP!"

"HANDS UP

HaithiTrust

[edit]

Queries

[edit]

http://en.wikisource.org/w/api.php?action=query&list=backlinks&bltitle=Popular_Science_Monthly/Volume_42/January_1893/Marriage_and_Kinship_Among_the_Ancient_Israelites&bllimit=5&blfilterredir=redirects

http://en.wikisource.org/w/api.php?action=query&list=backlinks&bltitle=Popular_Science_Monthly/Volume_42&bllimit=500

http://en.wikisource.org/w/api.php?action=query&generator=backlinks&gbltitle=Popular_Science_Monthly/Volume_42&gbllimit=500

http://en.wikisource.org/w/api.php?action=query&generator=backlinks&gbltitle=Popular_Science_Monthly/Volume_42&gbllimit=500&list=backlinks&bllimit=5&blfilterredir=redirects

http://en.wikisource.org/w/api.php?action=query&titles=User:Mpaa&prop=revisions&rvprop=content&rvsection=2

http://en.wikisource.org/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:Popular%20Science%20Monthly%20Volume%201&gcmlimit=5000&prop=categories&cllimit=5000

PSM

[edit]

Multi_part_articles

Wikisource:WikiProject Popular Science Monthly/Unrelated duplicate article titles

Drop initial with "

{{overfloat left|align=right|depth=-1em|"}}{{di|I|margin-left=1em}}

Python

[edit]

Authors

[edit]

All authors script: User:Visviva/authors.py

add text

[edit]

python ..\pywikipedia\pagefromfile.py -file:Filename.xml -safe -notitle -pt:90

python ..\pagefromfile.py -file:redirect.xml -safe -notitle

flags

[edit]

-pt:90 prevents overflow of recent changes


Extended query

[edit]

User:Phe/Scripts/query_ext.py

Javascript

[edit]

Pathoschild

[edit]
/**
 * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
 * @see https://meta.wikimedia.org/wiki/TemplateScript
 * @update-token [[File:pathoschild/templatescript.js]]
 */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js');

<inductiveload> add that to your JS
<inductiveload> then add the functions and setup lines from my regex script (add to your common.js, or a sub-script like mine)

User:Inductiveload/Regexp_toolbar.js

JSON

[edit]
I use Firefox and Firebug. It's a simple combo, but sometimes like today I have only a locked-down computer with an old IE on it.
As for the JS used to process an API call to MediaWiki, if you have jQuery (which you will have on WMF sites) you use the getJSON function. The following code looks at a page, gets all the transcluded Page pages, and adds the title of each page to the top of the current HTML document with the first category that Page: page is in:
$.getJSON(
    'http://en.wikisource.org/w/api.php?action=query&titles=Hudibras/Part%201/Canto%201&generator=templates&gtllimit=500&gtlnamespace=104&prop=categories&cllimit=500&format=json&callback=?',
    function(data) {

        $.each(data['query']['pages'], function(i, item){
            $('body').prepend(item['title'] + ' is in ' + item['categories'][0]['title'] + '<br/>');
        });
    }
)

See also http://pastebin.com/kxzKCj9e.

http://api.jquery.com can tell you the jQuery functions purposes better than I can. The API URL is constructed thusly:

  • http://en.wikisource.org/w/api.php - path to the WS API interface
  • action=query - we wish to run a query on the database
  • titles=Hudibras/Part%201/Canto%201 - title of the page you are interested in
  • generator=templates - we are looking for transcluded pages, which are equivalent to templates for this purpose
  • gtllimit=500 - template generator limit of 500, the maximum for a non-bot user. It is very unlikely that you will exceed this on a single mainspace page, but it is likely you will exceed it if you try to find all the page in an index
  • gtlnamespace=104 - template generator namespace = 104 = Page:
  • prop=categories - we are interested in the categories of the transcluded pages
  • cllimit=500 - category limit = 500, max, etc
  • format=json - return the data in JSON (JS data format), as opposed to XML
  • callback=? - this is needed to allow the program to receive the data and process it

I have used an anonymous functions to process the data to keep it all inline, you can use named functions to keep larger code in order. This is not the simplest JS in the world, but it is not too bad. Just keep building up from small blocks into larger ones. Hope that helps, Inductiveloadtalk/contribs 00:48, 15 November 2011 (UTC)

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://jquery.com/files/social/js/jquery.tabs.js"></script>

Warnings

[edit]

test edit

[edit]

<div class=mw-warning> A {{#if:|[{{{edit}}} contribution]|contribution}} from this account or IP address, which appeared to be a test edit, was removed or reverted. Please use [[Wikisource:Sandbox|the sandbox]] for this purpose. The [[Wikisource:Community Portal|community portal]] has information on contributing to this library.</div>

Block

[edit]

{{ambox | image = [[file:Stop hand.svg|48px|Short-term block]] | style = border:1px solid #c0c090; background-color:#FEC; | text = You have been blocked {{block info}} from editing for a short time in accordance with [[Wikisource:Blocking policy|Wikisource's blocking policy]] for abuse of editing privileges. If you wish to make useful contributions, you are welcome to do so after the block expires. }}


[edit]

IRC

[edit]

Help:

  • /msg chanserv help
  • /msg nickserv help
  • /msg memoserv help
  • /me action

ANSI CODES and characters

[edit]