mediawiki content version management - mediawiki

We have mediawiki as our wiki site.
Is it possible to manage many pages as a release with version, e.g. 1.1.
And after we update some pages to new, I also can simple select 1.1 to read 1.1 content only?
Page level history looks work for one page with timestamp, but it is not easy to manage many pages.

I have this need too.
I did not try https://www.mediawiki.org/wiki/Extension:Memento yet, but it seems that it could do the job.

Related

Restrict access to a MediaWiki page to specific users

I have some pages which I want to restrict access to specific users, i.e, I want user A and user B only to view this page. How can this be done? Do I need additional extensions or it can be done through LocalSettings.php for example?
You could try this extension: Extension:AccessControl. I've not deployed it to my wiki sites, but a quick read of the pages suggests it might be what you're looking for.
Note though that as Tgr covered in the comments above, Mediawiki is not intended to operate like this, so the extension could be fundamentally flawed in its implementation. Practise due diligence if you try to deploy any 3rd party extensions. Alternatively, look into alternative CMSs that handle access control as a core feature.

Tag a page revision on mediawiki and access revisions by tags

I develop an application which has a manual/help system on a mediawiki site. When the user needs help in the application, he/she can click a button and access the corresponding help page on the wiki. This works pretty well and it is easy to keep the manual updated when I add/change functionality in the application.
Now I will release a new version of the application but some users will still use the old version. I would like to be able to "tag" an old revision of a page, e.g "#version1.0" and tag the new revision "#version2.0" and then when I link from the old application I link with the tag "#version1.0".
The reason why I want to have two versions of some pages is that some functionality changes between version1 and version2 and I want the users to be able to get the correct help/guides regardless of which version the users use.
I know that I can make a copy of the current wiki and call that version1 and then use the current installation for version2 but I want to avoid having two wikis on the same server.
So, is there a solution for this problem? I have tried to search for built-in solutions and extensions but could not find anything good..
If we're talking of a wiki with few pages, you can simply hardcode a permalink to the specific revision appropriate for the release in question. The permalink is a link which contains the parameter oldid=; in most skins it's found in the "tools" section of the sidebar.
If there are more pages but your users are minimally competent, you can either
hardcode all links to the current revision of all pages and trust that they'll follow the banner at the top to see more recent versions where needed (example), or
link the page history instead, with the appropriate year/month/offset/limit parameter (example), and trust that the user will click the suggested version or switch to more recent versions if really needed.
Otherwise, the "standard" MediaWiki way is sadly to run parallel pages for the different but similar content. There is another question for that scenario, IIRC focused on Wikibooks books for different versions of a same software.

How can web pages be coded so that search engines assign a higher page rank to the latest version?

I frequently use Google to search for .NET documentation, and invariably, the highest ranked pages are for old versions of the .NET framework.
For example, I just did a Google search for "c# extern".
The first result was for Visual Studio 2005.
The second result was for Visual Studio .NET 2003.
I went through several pages and never did come across the Visual Studio 2010 page.
Interestingly, I tried the same search on Bing, Microsoft's own search engine, and Visual Studio 2005 was still the first hit. However, the second hit was the one I was looking for (Visual Studio 2010).
I realize that many documentation pages on MSDN have a menu at the top that allows you to switch versions, but I don't think it should be necessary to do this. There should be an HTML way to convince search engines that two pages are very similar, and one is newer/more relevant than the other.
Is there anything that can be done in HTML to force a documentation page for a more recent version to get a higher page rank than an essentially equivalent page for an older version?
You can't tell Google what page is preferred
(That's basically the answer to your question)
If someone googles c# extern, that person will get the most relevant pages calculated by googles algorithms. It will differ from user to user and where you are located, but far most how links all over the internet are directed. You can not change this with on-page optimization.
Canonical addresses mentioned by Wander Nauta is not suppose to be used in this manner. We use canonical addresses basically if we wish to tell Google or any other bot that two or more pages are the same. This is not what you where asking for. It would remove the older versions from indexing entirely in favor of the page addressed as the canonical address.
Quoted from http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394
Of all these pages with identical content, this page is the most useful. Please prioritize it in search results.
...
The rel="canonical" attribute should be used only to specify the preferred version of many pages with identical content...
To lead the client correct I would use, as you already described, a good web interface on the page so that the client easily can find what he or she is looking for.
Google also offers sitelinks for your search results that may or may not appear. I would say this is where you come closest to be able to direct your clients to the most relevant page by your standards on the search page.
Quoted from https://support.google.com/webmasters/bin/answer.py?hl=en&answer=47334
...sitelinks, are meant to help users navigate your site. Our systems analyze the link structure of your site to find shortcuts that will save users time and allow them to quickly find the information they're looking for.
In Googles Webmaster Tools you have an option where you can optimize thees links, at least somewhat.
Quoted from Googles Webmaster Tools
Sitelinks are automatically generated links that may appear under your site's search results. ...
If you don't want a page to appear as a sitelink, you can demote it.
Update
You could theoretically specify what version something on your page is in with "microdata" or similar. By doing this you have at least told the bots that there are two items on this site with the same name but in different versions. I don't think this will have any effect in witch order your sites will be listed in the search result thought. But we never know what the future holds right?
If you check out schema.org you'll see CreativeWork has an property named "version" and SoftwareApplication has one named "softwareVersion".
Google uses microdata to create rich snippets. I haven't heard that Google uses it for anything else but that does of course not mean it isn't so.
Google allows you to specify a canonical address for a specific resource, i.e. the version of a given page you want Google to prioritize. It's pretty easy to use.
However, hints like these are always suggestions. That is, the search engine is free to ignore them, if they support them at all.
For that you would need to know the actual algorithms. I'm guessing that most search engines do a comparison on how well the page matches the search but then also take into account the amount of hits a site gets. So say you have a 98% match with 1000 hits and a 96% match with 5000 hits. The second page may still be ranked higher.
As for what you can do, search engines are "blind" so use CSS and avoid tables for layout purposes. This will allow the engine to get a better match with your content. For a workaround with old version, you could redirect traffic coming in to the new version and then have a link to the old version on that page. Essentially setting it up so that only following that link takes you to the old page.
Since at it's core Google's search is based on links (pagerank algorithm), it would certainly help if each page of the old version linked to it's respective page on the new version. This might not solve the problem completely, but it would certainly help.

How does one create global variables for MediaWiki articles?

I have created a website powered by MediaWiki that offers documentation on the interface for a web application.
The URL for my web application may change. However, many articles on this MediaWiki site link to the application.
I would like to create a global constant somewhere called say "WEB_APP_URL" that I may change at any time, and that editors of the wiki can use to link to the application.
That way, I won't have to do a massive find and replace when my application URL changes.
Is this possible? I am working in a LAMP environment. Thank you.
I think the simplest way is to create a template. That is, you can create a page called Template:web-app URL with this wiki-text:
http://this.is/the/URL/of/the/web.app
and then editors can write things like:
The application is located at {{web-app URL}}.
or:
[{{web-app URL}} David Faux's application]
and the URL will automatically get dropped in.
(That's not the only way — you can get similar effects through internal configurations and hooks — but I think the template-based approach is the simplest.)

Editing a remote MediaWiki site locally (offline)

I've become familiar with MediaWiki for various projects and now I much prefer its markup over using a word-processor/html/latex/restructured-text etc.
The thing is that some of the servers I edit on are quite slow, or I may not even want the document to end up online.
So my question is: Short of setting up my own webserver and running a MediaWiki instance, what's a way to edit MediaWiki markup and view locally?
Is there a tool or application which does this?
The formatting does not have to be a 100% match but I would want to be able to copy and paste between this and online MediaWiki docs with minimal editing.
Try using Markitup: make a local .html page to preview your edits in real time.
If you only need to edit the occasional page, you could try LibreOffice, with the libreoffice-wiki-publisher plugin: you can just paste the entire article into a new document, save it locally, edit it and then use the "Send to... wiki" menu to save the wikitext on the remote page.
Offline editing of MediaWiki is definitely a problem to solve; the best place where to discuss it is probably the offline-l mailing list, as Kiwix needs a solution too.
To give an answer to my own question, SoloWiki is an application which fits the bill:
http://solowiki.sourceforge.net
Though I used it a few times, it's not updated since 0.3 in 2010 and the output is limited to headings, bullets, numbering (from what I can tell).
Just including this answer here for completeness, I don't think it's an especially good option.