Add Wiki Images and Other Files: Difference between revisions

From Minetest
No edit summary
 
Line 20: Line 20:


<br />
<br />
----
<span id="introduction"></span>
<span id="introduction"></span>
== Introduction ==
== Introduction ==
Line 25: Line 27:
This page explains how to install images and other data files in this MediaWiki.
This page explains how to install images and other data files in this MediaWiki.


<span id="wiki-images-upload"></span>
<span id="wiki-images-add-files"></span>
 
== How-To Add Files ==
== How-To ==


This procedure assumes that you have CLI access to the wiki host box. Other procedures may be documented in the future.
This procedure assumes that you have CLI access to the wiki host box. Other procedures may be documented in the future.
Line 33: Line 34:
01) Start with a set of 1 to 50 image files and/or other arbitrary data files. Note: You'll be able to install the full set easily in one go.
01) Start with a set of 1 to 50 image files and/or other arbitrary data files. Note: You'll be able to install the full set easily in one go.


02) Rename the ifiles:
02) Rename the files:


* Make every filename unique.
* Make every filename unique.
Line 50: Line 51:
  php importImages.php /somedir/
  php importImages.php /somedir/


There you go. The temporary directory may now be removed. To link directly to one of the installed files, use code similar to the following:
There you go. The temporary directory may now be removed.
 
<span id="wiki-images-use-files"></span>
== How-To Use Files ==


[[Media:something.jpg]]
To insert a direct link to one of the installed files, use code similar to the following:
<br />
<nowiki>[[Media:Torch.png]]</nowiki>
<br />
A live copy of exactly that looks like this:
[[Media:Torch.png]]


To link to a description page for one the files, use something like this instead:
To insert an image and link it to a description page, use something like this instead:
<br />
<nowiki>[[File:Torch.png]]</nowiki>


[[File:something.jpg]]
A live copy of exactly that looks like this:
[[File:Torch.png]]


(end of page)
(end of page)

Latest revision as of 21:48, 4 September 2023



Introduction

This page explains how to install images and other data files in this MediaWiki.

How-To Add Files

This procedure assumes that you have CLI access to the wiki host box. Other procedures may be documented in the future.

01) Start with a set of 1 to 50 image files and/or other arbitrary data files. Note: You'll be able to install the full set easily in one go.

02) Rename the files:

  • Make every filename unique.
  • In most cases, though this is optional, make the filenames lower-case.
  • Don't use spaces or most other punctuation characters in the filenames. Limit use of "periods" to the filename extension. Dash, underscore, and plus are O.K.

03) Log-in as "root" or do "sudo bash".

04) Create a new empty temporary directory. Important: Make sure that it's empty.

05) Copy the files into the temporary directory. Keep the directory flat; i.e., no subdirectories.

06) Execute the following but replace "/somedir/" with a directory path for the temporary directory.

cd /var/www/wiki.minetest.org/maintenance/
php importImages.php /somedir/

There you go. The temporary directory may now be removed.

How-To Use Files

To insert a direct link to one of the installed files, use code similar to the following:
[[Media:Torch.png]]
A live copy of exactly that looks like this: Media:Torch.png

To insert an image and link it to a description page, use something like this instead:
[[File:Torch.png]]

A live copy of exactly that looks like this: Torch.png

(end of page)