User:FrozenPlum
You are welcome to send me a message on my talk page.
Current Meta Category Tree[edit source]
MultiUpload Script[edit source]
Universal Omega kindly updated his MultiUpload.js script for MediaWiki 1.37. The multi-upload script allows users to upload multiple images or files (a reasonable number) at the same time, to the same category without navigating to the category page using the other problematic extension for file uploads that requires page edits to do so. We choose not to use that extension, because it allows any user to upload willy-nilly direct into random pages without categoriztion (it doesn't allow categorization unless editing is done to a category page). Other upload extensions were denied by Miraheze, so this provides a reasonable workaround.
Load Script From Dev Wiki[edit source]
The advantage to loading from dev wiki is that when the script is updated there, it will just work on your wiki.
- Go to
MediaWiki:Common.js
on your wiki. - Add the following and save the page:
mw.loader.load('//dev.miraheze.org/w/index.php?title=MediaWiki:MultiUpload.js&action=raw&ctype=text/javascript');
- Next, go to the following (not technically an existing page on your wiki, it is generated over top of a nonexistent Special page, just with title overridden):
Special:MultiUpload
to view the form. Note: In some skins (which the code may not override the title for, though it should work in Vector), the title may show up as "No Special Page Found," but the page itself will still populate the form and should work. - If desired, add the link to
Special:MultiUpload
in yourMediaWiki:Sidebar
.
Copy the Script Locally[edit source]
Preserving a copy locally won't update automatically, it may provide slightly better performance.
- Go to this page, edit/view-source there, copy the contents of the source code.
- On your wiki create the page
MediaWiki:MultiUpload.js
, paste the contents you just copied, (you may wish to add a comment line at the very top of what you just pasted to remind you where you got the source from, for easy updating later:
/* source:https://dev.miraheze.org/wiki/MediaWiki:MultiUpload.js */
- Save the page, and then go to
MediaWiki:Common.js
on your wiki and add:
mw.loader.load( '/w/index.php?title=MediaWiki:MultiUpload.js&action=raw&ctype=text/javascript' );
- Next, go to the following (not technically an existing page on your wiki, it is generated over top of a nonexistent Special page, just with title overridden):
Special:MultiUpload
to view the form.
- Note: In some third-party skins (which the code may not override the title for, though it should work in Vector), the title may show up as "No Special Page Found." This happens if the heading HTML selector used is different from in Vector (
#firstHeading
); but the page itself will still populate the form and should work. If you want the title to be overwritten in skins whereNo Special Page Found
displays (e.g., happens in Pivot skin), change the HTML selector that is used from: $('#firstHeading').text('Multi Upload');
- To whatever the correct selector is for the page title (which can be viewed in your browser's web inspector. For Pivot skin specifically, this was):
$('h1.title').text('Multi Upload');
Unfortunately, Pivot does not use a unique selector for first title. Other skins may use entirely different selectors.
- Note: In some third-party skins (which the code may not override the title for, though it should work in Vector), the title may show up as "No Special Page Found." This happens if the heading HTML selector used is different from in Vector (
- If desired, add the link to
Special:MultiUpload
in yourMediaWiki:Sidebar
.
Adding MH Wiki in Google Search Console[edit source]
A sitemap is a file that provides information about your wiki's pages, and the relationships between them, to search engines. Search engines (like Google) read sitemaps to crawl your site more efficiently.
Sitemaps on Miraheze[edit source]
- Sitemaps are generated automatically on Miraheze.
- Google will index a wiki automatically over time due to it being a subdomain on Meta.
- Submitting your sitemaps to google may help it get indexed faster.
- On Miraheze, users cannot submit their sitemap index (the file that indexes/lists all other sitemaps for your site), since this resides on the
https://static.miraheze.org/
domain. Same-domain is required for sitemap indexes to be accepted by search engines like Google Search Console (GSC). However, each of the individual gz files can be submitted instead, there's one per MediaWiki namespace (such as Main, Template, Category etc, indicated by "NS" and namespace number(s)).
Google Search Console[edit source]
Below are the main steps used to set up a Miraheze wiki in Google Search Console (GSC). This guide does not include how to adjust your wiki pages for Search Engine Optimization (SEO).
Locate Sitemap files[edit source]
- Visit the sitemap index located at
https://static.miraheze.org/mywiki/sitemaps/sitemap.xml
and leave that tab open, you'll need it later. Important: Where it says/mywiki/
in the example, replacemywiki
with your own wiki name (double-check that it is correct).
Add Property to GSC[edit source]
- Log into the desired Google account to associate the site with.
- Next, go to Google Search Console and click Start Now.
- In the left drop-down menu, select Add Property. It will not allow a Miraheze property to be added until it is verified which is done in later steps.
- Choose the second, URL Prefix option, and enter the Miraheze site address there (e.g., https://mysitename.miraheze.org) and press Continue.
- Scroll down, past the HTML file option, and select the HTML tag option instead.
- From the code provided, copy ONLY the characters between the content=" " value quotes. E.g. if it provided the following:
<meta name="google-site-verification" content="xaxMxLxxgehgexxxx_xxxxxx9xyxTxxn"/>
- You would copy only the characters between the quote marks (your code will be different):
xaxMxLxxgehgexxxx_xxxxxx9xyxTxxn
- On the Miraheze wiki, go to:
Special:ManageWiki/settings
- Click the SEO tab, and look for where it says Google Site Verification Key (WikiSEO) ($wgGoogleSiteVerificationKey). Paste only the code part copied earlier, then save the settings.
- Notes:
- If this option is not available, it's possible you have disabled the WikiSEO extension (enabled by default), WikiSEO is required to show the necessary field.
- To verify the verification tag appears on your wiki pages, after waiting a few minutes, right-click on the blank space of any wiki page and select "view source" in-browser, then use find (CTRL + F) to search for "google-site-verification" and verify the necessary meta tag has been added (if it shows, the property can be verified):
<meta name="google-site-verification" content="xaxMxLxxgehgexxxx_xxxxxx9xyxTxxn"/>
- If this option is not available, it's possible you have disabled the WikiSEO extension (enabled by default), WikiSEO is required to show the necessary field.
- Notes:
- Wait a few minutes for the change to propagate between Miraheze servers, then return to Google Search Console page and click the verify button. Note: It can take several minutes for the code to be recognized, if it does not verify check the note above to ensure the code is on your pages, and retry in Google Search Console.
Submit Sitemaps to Google Search Console[edit source]
- In google Search Console, find and click the Sitemaps section in the right toolbar.
- This opens the Sitemaps page, at the top is an input box to add a sitemap.
- Google already pre-fills the first
https://mywiki.miraheze.org/
part of the URL, so only submit only the rest of the url to your first sitemap file:
sitemaps/mywiki/sitemaps/sitemap-mywiki-NS_0-0.xml.gz
- Together the two different parts should compose the whole URL to your first file:
https://mywiki.miraheze.org/sitemaps/mywiki/sitemaps/sitemap-mywiki-NS_0-0.xml.gz
.
Be sure to check your URLs (both parts put together) are correct.
- Together the two different parts should compose the whole URL to your first file:
- Repeat this URL submission for each one of the namespace xml.gz files (there are several, NS_1, NS_2, NS_3 and so on; do not submit the same file multiple times. Look at the different file names listed in your sitemap for the full list of sitemap files).
- Important:
- Often GSC reports "Couldn't fetch" for a while (hours or overnight typically, in rarer cases, days) then later reports "Success" (as referenced here).
- Make sure to re-check until GSC reports "Success" to be certain your sitemaps don't remain as "Couldn't fetch" status (and do not index as intended). When the submitted files are indexing properly, they should report "Success" which means google will start crawling the pages over time.