Difference between revisions of "Using MediaWiki for organizing your personal website"
Line 4: | Line 4: | ||
In localsettings.php, which is in your main mediawiki directory, add at the end the command: | In localsettings.php, which is in your main mediawiki directory, add at the end the command: | ||
− | |||
<pre> $wgEnableUploads = true; </pre> | <pre> $wgEnableUploads = true; </pre> | ||
− | + | ||
Line 15: | Line 14: | ||
== To Have External Links open in a new window: == | == To Have External Links open in a new window: == | ||
− | |||
In localsettings.php, which is in your main mediawiki directory, add at the end the command: | In localsettings.php, which is in your main mediawiki directory, add at the end the command: | ||
− | + | ||
< pre>$wgExternalLinkTarget = '_blank';</pre> | < pre>$wgExternalLinkTarget = '_blank';</pre> | ||
− | + | ||
− | + | ||
I asked about this at hte help desk as to how to open internal wiki pages in new windows by default. | I asked about this at hte help desk as to how to open internal wiki pages in new windows by default. | ||
Line 26: | Line 24: | ||
== '''How can I indent paragraphs?''' == | == '''How can I indent paragraphs?''' == | ||
− | |||
Create a new page in your wiki called MediaWiki:Common.css. On my wiki, its address is | Create a new page in your wiki called MediaWiki:Common.css. On my wiki, its address is | ||
https://www.rasmusen.org/rasmapedia/index.php?title=MediaWiki:Common.css <br> | https://www.rasmusen.org/rasmapedia/index.php?title=MediaWiki:Common.css <br> | ||
Line 47: | Line 44: | ||
==How can I put in a comment?== | ==How can I put in a comment?== | ||
− | |||
<pre> | <pre> | ||
<!-- This is a comment --> | <!-- This is a comment --> | ||
Line 63: | Line 59: | ||
http://tmbw.net/wiki/Basic_Wiki_Formatting | http://tmbw.net/wiki/Basic_Wiki_Formatting | ||
− | + | ==How do I make a quotation indented and in a smaller font?== | |
− | |||
− | |||
Put <pre> {{Quotation| }} </pre> at the end of each page, so you can easily cut and paste it to insert a quotation. | Put <pre> {{Quotation| }} </pre> at the end of each page, so you can easily cut and paste it to insert a quotation. | ||
---- | ---- | ||
{{Quotation| }} | {{Quotation| }} |
Revision as of 15:51, 3 October 2020
Contents
- 1 How can I insert images?
- 2 How can I indent paragraphs?
- 3 How can I insert a divider line?
- 4 How can I stop viewers from editing my pages?
- 5 How can I put in a comment?
- 6 How can I add to the editing menu so I can do quotations and make quotations be indented with a smaller font?'
- 7 How do I make a quotation indented and in a smaller font?
How can I insert images?
In localsettings.php, which is in your main mediawiki directory, add at the end the command:
$wgEnableUploads = true;
OR--much more awkward--- insert $wgRawHtml = true; into the file LocalSettings.php in your main MediaWiki directory and the wiki will allow you to insert raw unchecked HTML. However, you must embed your html within start-html and end-html tags like this:
<html> <img src= "http://rasmusen.org/EricRasmusen2007.jpg" height= 120 align= left> </html>
You can then use the HTML tags for images to insert images that are already uploaded on the web somewhere.
== To Have External Links open in a new window: ==
In localsettings.php, which is in your main mediawiki directory, add at the end the command:
< pre>$wgExternalLinkTarget = '_blank';
I asked about this at hte help desk as to how to open internal wiki pages in new windows by default.
How can I indent paragraphs?
Create a new page in your wiki called MediaWiki:Common.css. On my wiki, its address is
https://www.rasmusen.org/rasmapedia/index.php?title=MediaWiki:Common.css
That page should consist of the CSS HTML command
P { text-indent: 2em }
Put Mediawiki:common.css on your main page, or wherever you want to use for your administrator page so you can easily find it again.
How can I insert a divider line?
Use 4 dashes
How can I stop viewers from editing my pages?
In localsettings.php, which is in your main mediawiki directory, add at the end these commands:
$wgGroupPermissions['*']['edit'] = false; #anonymous users cannot edit $wgGroupPermissions['*']['createaccount'] = false; #no new self-registered users
https://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_account_creation
How can I put in a comment?
<!-- This is a comment -->
Use a "template" for this. A template is a file like Template:Quotation that is a page on your wiki. Once you create a page that starts "Template:xxxx", whenever a page on your wiki has the command Template:Xxx, the phrase "here is some text" will be formatted according to whatever commands are on the Template:xxxx page.
and
for multipline preformatted text.
http://tmbw.net/wiki/Basic_Wiki_Formatting
How do I make a quotation indented and in a smaller font?
Put
{{Quotation| }}
at the end of each page, so you can easily cut and paste it to insert a quotation.