User:Martha Forsyth/Mom's Code-samples

LINKS

''Note: putting text ABOVE any headers keeps it at the top of the page, but it doesn't get in the TOC; current code puts it in TOC, but it doesn't have its own separate "edit" tab - think we can live with that (just "edit" the whole page)! Also note the command; its (vertical) placement affects where the TOC box shows up.''

 Links to my sub-pages

Misc cool pieces o' code:
whatever you want big quotation marks around
 * whatever you want big quotation marks around gives:


 * Also look at Template:Rquote, gives (oops…keep the TOC "hidden" to see this decently!)


 * HTML-to-Wiki-table converter


 * compare features in various wiki programs (as of 21:14, 14 March 2008 (UTC))


 * Some wikitricks, at User:Peteforsyth --17:51, 22 June 2007 (UTC), updated 02:21, 12 March 2008 (UTC)


 * "Stub" pictures, e.g.:
 * (boy did I wrestle with THIS simple format!! Problem was where to put "center" in
 * [[Image:Flag map of Bulgaria.svg|100px|thumb|center|Bulgaria]] )  --Martha 20:04, 19 October 2007 (UTC)


 * Commons Atlas of Bulgaria
 * User:TodorBozhinov/Bulgaria free image resources - wow, usable images - plus what licensing code to use for each of his sources!!


 * Get statistics on # of viewers of a page (However, you have to go to this link, and put the page-name and the year/month code (one of those listed) into the address bar, not into the search-box, that doesn't work.)


 * "Blockquote" gives a nice box! within which you can define colors, border size, etc. Here is one example:

  This material… This material is enclosed in a "blockquote".
 * Or:

 something like this:  (and remember !)
 * OR: A "simple box"!
 * Border, color, etc., could be changed?? (and note that it has a "blockquote" [whose parameters could also be changed] inside it):


 * See Quotation templates (TONS of 'em!)

REFERENCES and LINKS:
 Most Extraordinarily Useful Tool!!! Reference Generator makes all kinds of refs, using correct template! (How do they do it?!) More tools available at Citing sources (But now there's this "Templates" dropdown, upper left, which is often all I need. 17:48, 21 September 2011 (UTC))
 * Citing sources
 * Citation templates of ALL sorts
 * Footnotes
 * Note refs at Chelopech - by using code:
 * the next time the same ref comes up, all you have to put is:  
 * Duh! Peter told me this several months ago! including warning me about the "trailing slash", see below in . (There's gotta be a way to make a reference to a section WITHIN the same page....another new frontier, some other day!) --  01:59, 12 March 2008 (UTC)
 * Ha! I got it!    gives: !  -- 02:16, 12 March 2008 (UTC)
 * but  References  References is cleaner! — 22:44, 6 December 2010 (UTC)
 * but  References  References is cleaner! — 22:44, 6 December 2010 (UTC)


 * Interesting style! — combines "References" and "Bibliography" so the page-refs can be precise! (I like this!)


 * CSS Zen Garden

Redirect
First "create redlink" around the relevant word (put  ). Then click on it and, when I get to the non-existent page, put in this code (with relevant content!):
 * #REDIRECT Sliven Province

Wikipedia How-to

 * Userboxes! --Martha 18:22, 6 January 2007 (UTC)
 * Note particularly Userbox sampling templates
 * (external link) The Super-Simple Userbox Maker - External tool that outputs userboxes in wiki markup. With built-in color schemes.
 * Wikipedia templates
 * Wikipedia:Manual of Style is a treasure-trove! and leads to more
 * Wikipedia:Layout (guide to layout)
 * Wikipedia:How to edit a page
 * Help:Contents/Links
 * Annotated article
 * Picture tutorial has almost everything I ever wanted to know about images and image placement!
 * Tools — lots o' stuff, including:
 * Finding the responsible editor:
 * WikiBlame – searches for given text in versions of article
 * User:AmiDaniel/WhodunitQuery – Windows application that identifies the edit and user who added a specific word or phrase

("Advanced" topics?)
 * Mediawiki Help:Templates (how to create) and meta:Help:Parser function (what the heck is a "Parser function"?! Peter suggested both of these)

MAP stuff

 * Template:Location map+ - Map with locater mark (go to the template page for full code). Same for all.
 * Template:Infobox Settlement
 * Template:Infobox Lake
 * Template:Location map
 * Template:Geobox/type
 * Experimenting with these templates, it seems it doesn't matter what order you put the fields, they'll come out in the predicted places in the box. (Why would the order change?  If, e.g., you've deleted some, or they aren't there, and you want to add 'em back in, you don't have to worry about WHERE you add 'em, just formulate them correctly and they'll come out OK.  I wrestled for a long time with the box on Chelopech, it can give me some reminders.
 * See, though, for some important information!


 * WikiProject Maps has a lot of promising info/links.
 * Satellite photos! NASA, so copyright-free (few exceptions)

<--: (Placeopedia), "Connecting WIkipedia articles with their locations". Runs on open-source software (non-commercial website).-->

Ah, IMAGES!

 * e.g., [[Image:Icône_étoile_d'or_à_cinq_branches.svg|20px]] - find 'em at, e.g., Wikimedia Commons (this one specifies "star" - dunno how to search for these yet! but note how to size them; leaving out |thumb| gets rid of the arrow AND the border seen above) - and oh wowza, [[Image:SVG exact five-armed star filled.svg|100px]]
 * Image copyright tags will help figure out which one is appropriate!


 * IMAGE PLACEMENT:


 * There's a great page with almost everything I ever wanted to know about images and image placement at: Picture tutorial!


 * Note nice example at Steamboats of the Columbia River.
 * Description (because it may change: Two images are in this section (which has 3 paragraphs). By putting the first one at the beginning of ¶2 as [[Image:xx.jpg|thumb|right|caption]] and the second at the beginning of ¶3 as [[Image:xx.jpg|thumb|left|caption]], they balance very nicely on the page!


 * Manual:External editors - editing images with an external editor

From my ever-lovin' son:
 Another trick to seeing how templates work: use the word "subst" in the code, like this:. This will actually move the template's code into the page, instead of just "calling for it" every time somebody brings up the page. So after you save, you can click "edit" again and tinker around with the code. --- Pete (talk) 19:17, 16 November 2007(UTC)
 * (guess I wasn't up to absorbing it when he told me....) 18:19, 18 October 2008 (UTC)

Sub-category: INFOBOXES - a whole universe unto itself!

 * Infobox Musical artist
 * Infobox Album

Some Useful examples (enter them, e.g. :

 * Template:Work in progress yields


 * Template:nutshell (used at head of this page!, entering )
 * Placed after something questionable: Template:dubious (enter "date=[month] [year])" yields
 * Template:cleanup-rewrite (enter "date=[month] [year])" yields
 * Template:fact (enter "date=[month] [year])" yields yields
 * Template:Clarifyme (enter "date=[month] [year])" yields
 * Template:Vague (enter "date=[month] [year])" yields (This template apparently includes a line-feed somewhere.)
 * Template:clear - lets next section start BELOW a large object (image, box, whatever) rather than in the middle of it.
 * ✅ Template:Done


 * Template:Workpage A should be a sub-page of an article's "Talk" page.

and Some Fun examples:


Martha (talk) has given you a kitten! Kittens promote Wikilove and hopefully this one has made your day better. Share the WikiLove and civility with everyone and keep up the excellent editing! Send kittens to others by adding {{subst:Joy message}} to their talk page with a friendly message.

and Some Oddballs:

 * Template:ethnic group - Note what |image= Avvakum • Patriarch Nikon • Mikhail Devyatayev • Vasily Klyuchevsky  }} does (multiple images).  But - aha! - it's simpler than that: Image:MrdvnImg1.jpg is itself a multiple image (description "Collage of images representing the Mordvin people. From left to right: Avvakum, Patriarch Nikon, Mikhail Devyatayev, Vasily Klyuchevsky..":

"TO DO"

 * * Get a map onto the Dospat Dam page (the position in the map below is not accurate!) HA!! It's been DONE (but not by me - however this is a good example)! - 03:18, 12 March 2008 (UTC)


 * Hmm, SHOULD the map be on the Dospat Dam page too??? Probably better the version under discussion here. (1-2 April 2008)
 * Aha: WikiMapia:Dospat reservoir. [ How can this be used??  Damn! it can't = copyrighted.]  And what does the page title have to say about the point below (usage of Dam vs. Reservoir)??? 19:09, 2 April 2008 (UTC)


 * Also, if you look up Dam you find that it actually IS the wall (except in some dialects, e.g., Australian) — so "should" the page's title be changed to Dospat Dam and Reservoir (as in Pasarel?)  Guess I should post on the article's Talk page.
 * Did, and got a helpful reply on Talk:Dospat_Dam from User:Master of Puppets. He says: "To change the name, you have to move it. However, in this case the name we're looking for is the one it is known as. If newspapers and such call it the Dospat Dam, then that's what the article name should be."  So, I'd need to check THAT out first.


 * Bistritsa, Sofia needs some work...
 * Focusing too

(Somewhat) urgent

 * Copyright tags for my Rila Monastery photos, see User_talk:Martha_Forsyth

Ilse Stanley!!!
Material MOVED to User:Martha Forsyth/Sandbox.

"Here for safekeeping"

 * Copied from User:Cameltrader/Rila_monastery_inscription, related to my work on "Image:Detail of Rila Monastery wall painting.jpg", discussion found on Wikipedia_talk:WikiProject_Bulgaria (just keeping it here for easy ref. (and because I like the way it looks!), copied it on 00:09, 6 April 2008 (UTC))

 М агє&#769;сницыт є и&#1158; вражали&#769;цыт є са дѧ&#769;волски слуги&#768;, за т о ва&#768; и&#1158; дѧ&#769;волъ-о &#10; мно&#769;госє ра&#769;дува, ска&#769;ча, и&#1158; и&#1158;гра&#769;є, прє&#768;дъ о&#1158;ніѧ, що и&#769;дат при&#768; ни&#768;, и&#1158; това&#768; &#10; що запоѧ&#769;ват, и&#1158; що захра&#769;нуват, о&#1158;но&#768; є&#768; дѧ&#769;волски гнусотіи кои&#768; о&#1158;ста&#769;вѧт &#10; б&#1155;га, зако&#769;нъ-а, и&#1158; цє&#769;ркват а, и&#1158; хо&#769;дaт при вражали&#769;цыт є о&#1158;ни&#768; нє &#10; са&#768; б&#1155;жїи&#768;, но дѧ&#769;волски слуги&#768;..

New version (maybe I like the old one better?!):  М агє&#769;сницыт є и&#1158; вражали&#769;цыт є са дѧ&#769;волски слуги&#768;, за т о ва&#768; и&#1158; дѧ&#769;волъ-о &#10; мно&#769;госє ра&#769;дува, ска&#769;ча, и&#1158; и&#1158;гра&#769;є, прє&#768;дъ о&#1158;ніѧ, що и&#769;дат при&#768; ни&#768;, и&#1158; това&#768; &#10; що запоѧ&#769;ват, и&#1158; що захра&#769;нуват, о&#1158;но&#768; є&#768; дѧ&#769;волски гнусотіи кои&#768; о&#1158;ста&#769;вѧт &#10; б&#1155;га, зако&#769;нъ-а, и&#1158; цє&#769;ркват а, и&#1158; хо&#769;дaт при вражали&#769;цыт є о&#1158;ни&#768; нє &#10; са&#768; б&#1155;жїи&#768;, но дѧ&#769;волски слуги&#768;.. Wee.e.ell.lll - I like the old one better, but the new one's more legible!

TESTING (~"sandbox") area
Bigger one available at User:Martha Forsyth/Sandbox!

Putting subst: at the beginning causes the full code to be entered, instead of the shortened version the template usually brings up. Result of entering that is:

Locating places on a map
template:location map

This didn't work right! I put in the same coordinates as "Dospat" in the lower of the two maps, but it positions wrong in the upper map!


 * Bless you, Obersachse, for helping me out with this! Such a simple thing, but hours of wrestling with it, over a period of weeks, just didn't get me to the answer.  Thanks again, and again.  Here are the gory details Obersachse gave me:


 * |lon_deg = longitude degrees
 * |lon_min = longitude minutes


 * is not the same as


 * |long = longitude (decimal format).


 * -- Martha (talk) 15:06, 29 March 2008 (UTC)

Infobox Settlement

 * HA!! Dospat has been done! But why do the same coordinates come out in two different places, depending on which of two templates I'm using ??? - 03:18, 12 March 2008 (UTC), modified 02:02, 26 March 2008 (UTC)


 * See Chech_%28region%29 for another map, other ideas.

My map work
See advice, Wikipedia talk:WikiProject Maps 18:16, 2 April 2008 (UTC)

Current version:  16:59, 13 May 2008 (UTC)

Table format
[Help:Table]

Sample: sortable table
Click on the little triangle-box to sort on that column. [Click on another box to change the sort. Only one level of sort - but what if you do first one then the second one, does it then sort within the sort?]

-- Martha 21:29, 27 February 2007 (UTC)

Б
(section moved to User:Martha Forsyth/Glossary work

Message in colored box?
-- Martha 22:29, 27 February 2007 (UTC)


 * The angle brackets indicate that it's a "template." so go to Template:Wikibreak, and look at the code - that code gets "sucked into" your page when you include the brackets. -Pete 21:49, 12 May 2007 (UTC)


 * Note: I added | cats= | so my page doesn't get added to "inactive Wikipedians", per the Template page. (And, b'gosh, it WORKED, instantly!) -- Martha 05:08, 17 May 2007 (UTC)


 * Another trick to seeing how templates work: use the word "subst" in the code, like this: . This will actually move the template's code into the page, instead of just "calling for it" every time somebody brings up the page. So after you save, you can click "edit" again and tinker around with the code. --- Pete (talk) 19:17, 16 November 2007 (UTC)

Colored background/box, OR Colored page background
Peter contributed this: makes a background color, when put at the top of a page. Looks really cool on a talk page. No closing /div tag needed? Grabbed this from User:Valentinian. I added the closing tag, to get just a colored box (I hope!) -- Yup. Now, the next trick is to....play with Background Colors! Not tonight... == Martha 03:30, 28 February 2007 (UTC)


 * I experimented with this tonight, and learned the following:
 * You can change the background color (see tags at Web-safe colors).
 * Adding a  tag at the end will give you a box with the background color specified (you can specify text color too. E.g., color:white (or other color).
 * The closing /div tag actually determines where the background and text color will end, so you can do things like this:

experiment
Example

end of experiment
— Martha (talk) 05:23, 26 March 2008 (UTC)

IMAGES
A picture, including alternate text:



You can also put the image in a frame with a caption:

NOW....what determines the horizontal alignment? Looks like:
 * If it's in a line by itself, it's Left
 * If it's at the end of a sentence/link, it's Right

BUT....it interrupts the following lines, headings, everything. Hmmm. This will need more study.
 * OK, template

used below does the trick!

Help:Images 18:44, 12 May 2007 (UTC)

Show/Hide Box
Please sign in here if you would like to contribute!
 * Katr67 17:20, 11 December 2006 (UTC)
 * Sprkee 17:57, 8 May 2007 (UTC) I'll keep working on political type people
 * -Pete 23:12, 11 June 2007 (UTC)

(Copied verbatim from another page, content not important here, just format.) -Martha 18:20, 15 June 2007 (UTC)

Another example (I'm copying everything now because I don't understand all the details; I changed the background color "just to prove I can"): Pete copied this from Template:Hidden archive top for use with Wikiproject Oregon. Work in progress! (Use it with to end a collapsing section.)

The "heading" for the collapsed text can be changed with the  parameter which defaults to "This discussion has been archived. Please do not modify it."

Using WikiProject Oregon/People to test out this approach; if it works well, I'd like to incorporate it into other sub-projects, and ultimately WP:ORE. -Pete 21:33, 13 June 2007 (UTC)

[PETER: I don't understand the "Use it with ..." part - does that indicate that this has restricted use of some sort?] -Martha


 * Good work finding the source code. I'll take a quick crack at trying to explain this, it actually involves a few "techy" things. First, there are two similar things called "magic words," and things called "templates." I'm unclear on the distinction, but essentially, when something is surrounded with two sets of curly braces, that means that it's feeding in a chunk of code from somewhere else. In this case, is originally meant to go with the  template; I presume the "t" is short for "top," and the "b" is short for "bottom." All it does is put in a | followed by a } . Which is the code for the end of a table. So, you don't necessarily have to use , you just have to be sure you "end" the table. Which you can do manually with |}. Now, if you look at the source code for this comment, you'll see that I used a "trick" to make the curly braces show up, instead of doing what they're intended to do.
 * Any of that make sense?
 * Lemme give you a much simpler example of how a template might be used. Below this comment are the results of the template; it's used to quickly issue a warning to somebody who deletes a section out of an article for no apparent reason.

Please do not remove content or templates from pages on Wikipedia without giving a valid reason for the removal in the edit summary. Your content removal does not appear constructive, and has been reverted. Please make use of the sandbox if you'd like to experiment with test edits. Thank you.


 * Let me know if any of this helps, or just confuses matters more! -Pete 06:34, 14 November 2007 (UTC)

Martha's "Template" for her show/hide box
There's some tricky details to how to code this! so here's what I've come up with as a "template", 29 November 2008:

is optional - I did it to inset the whole thing.

URLs in external links
A link in external link style can be of the forms:
 * target: http://meta.wikimedia.org/ is rendered as http://meta.wikimedia.org/
 * [ target label ], with a blank space in between: wikimedia gives wikimedia (see also Help:Piped link)
 * [ target ] - these are automatically labelled with serial numbers 1, 2, 3, ...: gives

The target is a URL which can start with " http:// " or " ftp:// "

Those big quotation marks; and citing a reference
A flight of steps unequalled in magnificence, leads down the decivity to the shore and harbour

Interesting family tree format; and Legend (as Infobox)
Copied from Herod the Great Antipater the Idumaean + Cypros, Arab princess from Petra, Jordan in Nabatea. |    —————————————————————————————————————————————    |              |            |        |        | Phasael    Herod the Great  Joseph  Pheroras  Salome I (74-4 BC) Alexandros + Alexandra |      ———————————————————————————————————      |                                   | Aristobulus III of Judea            Mariamne, dt. (d. 35 BC)                             m. Herod the Great (last Hasmonean scion; appointed high priest; drowned)