Difference between revisions of "Using MediaWiki for organizing your personal website"

From Rasmapedia
Jump to navigation Jump to search
(How can I insert a divider line?)
(To Have External Links open in a new window:)
 
(10 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
   
 
   
 
== How can I insert images? ==  
 
== How can I insert images? ==  
 
 
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>
 
   
 
   
 
 
 
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:  
 
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:  
 
<pre><html>    <img src= "http://rasmusen.org/EricRasmusen2007.jpg"  height= 120  align= left>  </html> </pre>  
 
<pre><html>    <img src= "http://rasmusen.org/EricRasmusen2007.jpg"  height= 120  align= left>  </html> </pre>  
 
You can then use the HTML tags for images  to insert images that are already uploaded on the web somewhere.  
 
You can then use the HTML tags for images  to insert images that are already uploaded on the web somewhere.  
 
    
 
    
 +
==What is the gist of Rasmapedia?==
 +
The software is Mediawiki, open source and easily downloadable for anyone who wants to start their own wiki. It sets up easily, and like TeX, HTML, and Python is well designed. So I've done that. You do need to have a server of the kind that one hosts an HTML webpage on (unix based?), and i bought an account at dreamhosters.com that I pay $120/year for.
  
== To Have External Links open in a new window: ==  
+
Rasmapedia is like Wikipedia but I write all the entries, and though anyone can read it, I use it for myself-- my own notes, quote collection, poetry collection, note for op-eds, software tips I want to remember, etc.
 +
I set up two other wikis also. One was a non-public one in preparation for a big fight I was thinking of having with Indiana University last year. The Wikimedia security isn't hacker-proof, I expect, but it's university-proof. The other is a Rasmusen Family History site where I have passwords but allow any authorized user to both read and write-- putting photos and news of tehir fmaily in, with each person having a page about them.
 +
 
 +
I find it extremely useful for filings ideas and words. As a side benefit, other people may find it useful too.
 +
 
 +
==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.  
  
 
https://www.mediawiki.org/wiki/Manual_talk:$wgExternalLinkTarget#Can_internal_links_be_made_to_open_in_new_windows%3F
 
https://www.mediawiki.org/wiki/Manual_talk:$wgExternalLinkTarget#Can_internal_links_be_made_to_open_in_new_windows%3F
+
 
 
== '''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<br>
 
https://www.rasmusen.org/rasmapedia/index.php?title=MediaWiki:Common.css <br>
 
https://www.rasmusen.org/rasmapedia/index.php?title=MediaWiki:Common.css <br>
 
That page should consist of the CSS HTML command
 
That page should consist of the CSS HTML command
P { text-indent: 2em }
+
<pre> P { text-indent: 2em }</pre>
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.  
+
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?  ==  
 
==  How can I insert a divider line?  ==  
Use 4 dashes.
+
Use 4 dashes.
  
 
==How can I stop viewers from editing my pages?==
 
==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:  
+
In localsettings.php, which is in your main mediawiki directory, add at the end  these commands:  
 
   <pre>
 
   <pre>
 
$wgGroupPermissions['*']['edit'] = false; #anonymous users cannot edit
 
$wgGroupPermissions['*']['edit'] = false; #anonymous users cannot edit
Line 41: Line 42:
  
 
https://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_account_creation
 
https://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_account_creation
+
 
 
==How can I put in a comment?==
 
==How can I put in a comment?==
 
<pre>
 
<pre>
Line 62: Line 63:
 
----
 
----
 
{{Quotation| }}
 
{{Quotation| }}
 +
 +
==How do I make a backup of my wiki?==
 +
[https://www.mediawiki.org/wiki/Manual:DumpBackup.php#Detailed_example  DumpBackup.php] will back up the pages in xml, without the edit histories. etc. I have not tried using it yet.  Use WINSCP or another ftp program to go to rasmusen.dreamhosters.com and open a shell from COMMANDS tab menu, Open Terminal. Then issue the Unix commands to create a dump.xml file.  First: cd rasmapedia3. Second, cd maintenance. Third, php dumpBackup.php --full > dump.xml. That creates dump.xml in that folder. It seemed to work for me. 33pages for rasmapedia3. Use importDump.php somehow to restore it. But dump.xml is a plain text file, and I can see the info is there.  I see that at https://www.freeconvert.com/xml-to-html  I can convert xml to one html file nicely.
 +
 +
----

Latest revision as of 09:09, 7 March 2022


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.

What is the gist of Rasmapedia?

The software is Mediawiki, open source and easily downloadable for anyone who wants to start their own wiki. It sets up easily, and like TeX, HTML, and Python is well designed. So I've done that. You do need to have a server of the kind that one hosts an HTML webpage on (unix based?), and i bought an account at dreamhosters.com that I pay $120/year for.

Rasmapedia is like Wikipedia but I write all the entries, and though anyone can read it, I use it for myself-- my own notes, quote collection, poetry collection, note for op-eds, software tips I want to remember, etc. I set up two other wikis also. One was a non-public one in preparation for a big fight I was thinking of having with Indiana University last year. The Wikimedia security isn't hacker-proof, I expect, but it's university-proof. The other is a Rasmusen Family History site where I have passwords but allow any authorized user to both read and write-- putting photos and news of tehir fmaily in, with each person having a page about them.

I find it extremely useful for filings ideas and words. As a side benefit, other people may find it useful too.

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.

https://www.mediawiki.org/wiki/Manual_talk:$wgExternalLinkTarget#Can_internal_links_be_made_to_open_in_new_windows%3F

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

How can I add to the editing menu so I can do quotations and make quotations be indented with a smaller font?'

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.


How do I make a backup of my wiki?

DumpBackup.php will back up the pages in xml, without the edit histories. etc. I have not tried using it yet. Use WINSCP or another ftp program to go to rasmusen.dreamhosters.com and open a shell from COMMANDS tab menu, Open Terminal. Then issue the Unix commands to create a dump.xml file. First: cd rasmapedia3. Second, cd maintenance. Third, php dumpBackup.php --full > dump.xml. That creates dump.xml in that folder. It seemed to work for me. 33pages for rasmapedia3. Use importDump.php somehow to restore it. But dump.xml is a plain text file, and I can see the info is there. I see that at https://www.freeconvert.com/xml-to-html I can convert xml to one html file nicely.