User:Mpaa

From Wikisource
Jump to: navigation, search
Awards for participation
Featured article star - check.svg
Proofread of the Month
November 2011

Special: Validation month
Featured article star - check.svg
Proofread of the Month
November 2012

Special: Validation month
Featured star 8.png
Proofread of the Month
January 2013

Short works (8 completed)
Featured article star - check.svg
Proofread of the Month
November 2013

Special: Validation month
Football field 105x68.PNG
Proofread of the Month
December 2013 (First work)
Association Football
Chess king render.jpg
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


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

Users[edit]

User:Inductiveload

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]

From: User:Inductiveload

Page 1
 {| table styling
 | col1 || col2 || col3 
 |-
 <noinclude>|}</noinclude> <---this is the footer of the page
Page 2
 <noinclude> {| table styling (same as page 1)
|-
</noinclude> <---this is the header
 {{nop}}
 | col1 || col2 || col3
 |-
 <noinclude>|}</noinclude> <---this is the footer of the page
Page 3
 <noinclude> {| table styling (same as page 1)
|-
</noinclude> <---this is the header
 {{nop}}
 | col1 || col2 || col3
 |}

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!"

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]

$.getScript( 'http://meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/TemplateScript/dev.js&action=raw&ctype=text/javascript');
<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. }}


Useful links[edit]

IRC[edit]

Help:

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

ANSI CODES and characters[edit]

HTML Code

Browser View

HTML Code

Browser View

HTML Code

Browser View

HTML Code

Browser View

HTML Code

Browser View

&copy; © &#33; ! &#95; _ &#157; &#219; Û
&reg; ® &#34; " &#96; ` &#158; ž &#220; Ü
&nbsp;   &#35; # &#97; a &#159; Ÿ &#221; Ý
&quot; " &#36; $ &#98; b &#160;   &#222; Þ
&amp; & &#37; % &#99; c &#161; ¡ &#223; ß
&lt; < &#38; & &#100; d &#162; ¢ &#224; à
&gt; > &#39; ' &#101; e &#163; £ &#225; á
&Agrave; À &#40; ( &#102; f &#164; ¤ &#226; â
&Aacute; Á &#41; ) &#103; g &#165; ¥ &#227; ã
&Acirc; Â &#42; * &#104; h &#166; ¦ &#228; ä
&Atilde; Ã &#43; + &#105; i &#167; § &#229; å
&Auml; Ä &#44; , &#106; j &#168; ¨ &#230; æ
&Aring; Å &#45; - &#107; k &#169; © &#231; ç
&AElig; Æ &#46; . &#108; l &#170; ª &#232; è
&Ccedil; Ç &#47; / &#109; m &#171; « &#233; é
&Egrave; È &#48; 0 &#110; n &#172; ¬ &#234; ê
&Eacute; É &#49; 1 &#111; o &#173; ­ &#235; ë
&Ecirc; Ê &#50; 2 &#112; p &#174; ® &#236; ì
&Euml; Ë &#51; 3 &#113; q &#175; ¯ &#237; í
&Igrave; Ì &#52; 4 &#114; r &#176; ° &#238; î
&Iacute; Í &#53; 5 &#115; s &#177; ± &#239; ï
&Icirc; Î &#54; 6 &#116; t &#178; ² &#240; ð
&Iuml; Ï &#55; 7 &#117; u &#179; ³ &#241; ñ
&ETH; Ð &#56; 8 &#118; v &#180; ´ &#242; ò
&Ntilde; Ñ &#57; 9 &#119; w &#181; µ &#243; ó
&Otilde; Õ &#58; : &#120; x &#182; &#244; ô
&Ouml; Ö &#59; ; &#121; y &#183; · &#245; õ
&Oslash; Ø &#60; < &#122; z &#184; ¸ &#246; ö
&Ugrave; Ù &#61; = &#123; { &#185; ¹ &#247; ÷
&Uacute; Ú &#62; > &#124; | &#186; º &#248; ø
&Ucirc; Û &#63; ? &#125; } &#187; » &#249; ù
&Uuml; Ü &#64; @ &#126; ~ &#188; ¼ &#250; ú
&Yacute; Ý &#65; A &#127; ? &#189; ½ &#251; û
&THORN; Þ &#66; B &#128; &#190; ¾ &#252 ü
&szlig; ß &#67; C &#129; &#191; ¿ &#253; ý
&agrave; à &#68; D &#130; &#192; À &#254; þ
&aacute; á &#69; E &#131; ƒ &#193; Á &#255; ÿ
&aring; å &#70; F &#132; &#194; Â    
&aelig; æ &#71; G &#133; &#195; Ã    
&ccedil; ç &#72; H &#134; &#196; Ä    
&egrave; è &#73; I &#135; &#197; Å    
&eacute; é &#74; J &#136; ˆ &#198; Æ    
&ecirc; ê &#75; K &#137; &#199; Ç    
&euml; ë &#76; L &#138; Š &#200; È    
&igrave; ì &#77; M &#139; &#201; É    
&iacute; í &#78; N &#140; Œ &#202; ?    
&icirc; î &#79; O &#141; &#203; Ë    
&iuml; ï &#80; P &#142; Ž &#204; Ì    
&eth; ð &#81; Q &#143; &#205; Í    
&ntilde; ñ &#82; R &#144; &#206; Î    
&ograve; ò &#83; S &#145; &#207; Ï    
&oacute; ó &#84; T &#146; &#208; Ð    
&ocirc; ô &#85; U &#147; &#209; Ñ    
&otilde; õ &#86; V &#148; &#210; Ò    
&ouml; ö &#87; W &#149; &#211; Ó    
&oslash; ø &#88; X &#150; &#212; Ô    
&ugrave; ù &#89; Y &#151; &#213; Õ    
&uacute; ú &#90; Z &#152; ˜ &#214; Ö    
&ucirc; û &#91; [ &#153; &#215; ×    
&yacute; ý &#92; \ &#154; š &#216; Ø    
&thorn; þ &#93; ] &#155; &#217; Ù    
&yuml; ÿ &#94; ^ &#156; œ &#218; Ú    
dummydummy