Mediawiki: Difference between revisions

From Guerrilla Media Collective Wiki
Jump to: navigation, search
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<font size="6" face="verdana" color="#ff00ff">'''This page needs revision to be brought up to date with our [[The Guerrilla Translation Handbook | Handbook]]</font>
<font size="6" face="verdana" color="#ff00ff">'''This page needs revision to be brought up to date with our [[The Guerrilla Translation Handbook | Handbook]]
 
'''When pasting text from Handbook, leave section below intact, (place before additional resources)''' + Integrate additional links in regular link section
</font>
 


'''When pasting text from Handbook, leave section below intact, (place before additional resources)'''
=Additional MediaWiki formatting tips=
=Additional MediaWiki formatting tips=


Line 12: Line 15:
* Whether in Google docs or a website, select and copy the text
* Whether in Google docs or a website, select and copy the text
* Go to the [https://html5-editor.net/ Online HTML Editor]. Paste the Gdoc/web text '''on the right hand window'''
* Go to the [https://html5-editor.net/ Online HTML Editor]. Paste the Gdoc/web text '''on the right hand window'''
* '''Important step:''' Press in the "Clean" button, on the lower right part of the leftmost/code window. This will get rid of some of the junkcode
* Now go to the left hand window, select all within and copy the html code that has been generated.
* Now go to the left hand window, select all within and copy the html code that has been generated.
* Next go to the [http://www.ebruni.it/en/software/os/i_love_wiki/index.mpl Wiki converter] and paste the html on the top window. Hit "convert".
* Next go to the [http://www.ebruni.it/en/software/os/i_love_wiki/index.mpl Wiki converter] and paste the html on the top window. Hit "convert".
Line 34: Line 38:
* Under "Source file" hit the "Choose file" button. This will bring up a search box.
* Under "Source file" hit the "Choose file" button. This will bring up a search box.
** If you're doing this for the Handbook, you will need to have the images downloaded in your local drive first. Gdocs doesn't let you download images easily but don't worry, as [https://drive.google.com/drive/u/0/folders/1Dk4unrdiz3JVT3opjXM4PjSdB213dbiv all handbook images are compiled here]. Download them to your local drive from the Gfolder and proceed as normal.
** If you're doing this for the Handbook, you will need to have the images downloaded in your local drive first. Gdocs doesn't let you download images easily but don't worry, as [https://drive.google.com/drive/u/0/folders/1Dk4unrdiz3JVT3opjXM4PjSdB213dbiv all handbook images are compiled here]. Download them to your local drive from the Gfolder and proceed as normal.
* xxxxx
* Once you've chosen the file '''copy the destination filename''' from the box of the same name.
* Hit "Upload file"
* Now, in the place where you want to insert your image, write the following code:
<nowiki>[[image: PASTE DESTINATION FILENAME HERE]]</nowiki>
* If you want to resize the image you'd write:
<nowiki>[[image: PASTE DESTINATION FILENAME HERE | center]]</nowiki>
* And if you wanted to center ''and'' resize it to (for example) 750 pixels, you'd write:
<nowiki>[[image: PASTE DESTINATION FILENAME HERE | center | 750 px]]</nowiki>
 
Try this procedure out in the [[Sandbox]] and [https://www.youtube.com/watch?v=1frQhHHm9Dk watch this vid] for more info on inserting images.


===Internal links===
===Internal links===
We've spoken about internal and external links above. The problem is that, in the handbook, we have been linking to other locations ''within the handbook''. All this information is also reflected in the wiki, but in other locations (often different wiki entries and sections). When pasting from G-docs all internal links will lead to Gdocs urls.
This means that you will have to go through all of the hyperlinks. If a hyperlink is '''external''' you leave it as it is. If it's '''internal''' you will have to modify it to link to the correct wiki entry or section. Some of these may not have been created yet, in that case, make a placeholder page.


===Unbolding headings===
===Unbolding headings===
This is very simple. When working on the handbook we bolded all headers. We don't do this in the wiki, so you simply need to unbold them using the code or the editor.
= Additional Links =
- [https://en.wikipedia.org/wiki/Help:Cheatsheet Wikitext Cheatsheet]
[[category: community]]
[[category: tools]]

Latest revision as of 08:44, 20 January 2021

This page needs revision to be brought up to date with our Handbook

When pasting text from Handbook, leave section below intact, (place before additional resources) + Integrate additional links in regular link section


Additional MediaWiki formatting tips

(The following tips expand on the info contained in the handbook)

Gdocs/Html to Wiki conversion

We have come up with a nifty way to convert text from Gdocs or anywebsite into Wikitext, saving us hours of formatting time. The procedure is described within "Additional MediaWiki Questions" above, but here is is broken down for maximum clarity:

  • Whether in Google docs or a website, select and copy the text
  • Go to the Online HTML Editor. Paste the Gdoc/web text on the right hand window
  • Important step: Press in the "Clean" button, on the lower right part of the leftmost/code window. This will get rid of some of the junkcode
  • Now go to the left hand window, select all within and copy the html code that has been generated.
  • Next go to the Wiki converter and paste the html on the top window. Hit "convert".
  • Copy the converted text on the bottom window. Paste it in your wiki entry.

As excellent as this methods is, it leaves out three important elements that you will have to add manually: footnotes, images, internal links and unbolding headings. To insert these you will have to a/b the original Gdoc or web article with your wiki entry to identify where each of these need to be altered using the methods below:

Footnotes

The way to insert footnotes in Mediawiki by using references. Whenever there is a footnote, you need to paste its content between the two reference tags in the same location in the text where the reference is signalled. You do this by enclosing the footnote text within these two tags: <ref>...</ref>, e.g.:

<ref>PASTE FOOTNOTE CONTENT HERE</ref>

So, when copying from Google docs, you will have to copy every single footnote into the wikicode as a reference. If this isn't 100% clear, ask for a quick video demonstration or watch this tutorial.

Images

Unfortunately the editor doesn't convert images into wikitext, no matter whether you're copying from Gdocs or the web - it just leaves a space. This means that, just like with the footnotes, you will have to a/b the document, see where the images are located and upload them to the wiki version. So, if you're transferring from the handbook:

  • When happening upon an image, et your cursor on the corresponding space in the wiki editor.
  • Go to the option wheel dropdown menu to the right of the search box. Select "upload file".
  • Under "Source file" hit the "Choose file" button. This will bring up a search box.
    • If you're doing this for the Handbook, you will need to have the images downloaded in your local drive first. Gdocs doesn't let you download images easily but don't worry, as all handbook images are compiled here. Download them to your local drive from the Gfolder and proceed as normal.
  • Once you've chosen the file copy the destination filename from the box of the same name.
  • Hit "Upload file"
  • Now, in the place where you want to insert your image, write the following code:
[[image: PASTE DESTINATION FILENAME HERE]]
  • If you want to resize the image you'd write:
[[image: PASTE DESTINATION FILENAME HERE | center]]
  • And if you wanted to center and resize it to (for example) 750 pixels, you'd write:
[[image: PASTE DESTINATION FILENAME HERE | center | 750 px]]

Try this procedure out in the Sandbox and watch this vid for more info on inserting images.

Internal links

We've spoken about internal and external links above. The problem is that, in the handbook, we have been linking to other locations within the handbook. All this information is also reflected in the wiki, but in other locations (often different wiki entries and sections). When pasting from G-docs all internal links will lead to Gdocs urls.

This means that you will have to go through all of the hyperlinks. If a hyperlink is external you leave it as it is. If it's internal you will have to modify it to link to the correct wiki entry or section. Some of these may not have been created yet, in that case, make a placeholder page.

Unbolding headings

This is very simple. When working on the handbook we bolded all headers. We don't do this in the wiki, so you simply need to unbold them using the code or the editor.

Additional Links

- Wikitext Cheatsheet