For MediaWiki Skin Setting HTML Title to "[Site Name]" instead of "Main Page - [Site Name]" - html

I'm using a custom version of the monobook skin. How do I set the HTML title to "[Site Name]" instead of "Main Page - [Site Name]"?

You should be able to put something like the following in your common.js, and get it to execute on only the Main Page.
if {{{{PAGENAME}}=="Main Page"
{
document.title = "{{SITENAME}}";
}
It's not totally correct because I don't know javascript.

Try editing [[MediaWiki:Pagetitle]] - set it to "{{SITENAME}}" instead of the default "$1 - {{SITENAME}}".

Perhaps you can use MediaWikis parser functions to achieve something like what Adrian Archer answered, but run by the server rather than the client (so search engines will take heed). You'll have to edit [[MediaWiki:Pagetitle]] as Joshua C. Lerner said, then. Extension:ParserFunctions is bundled with MediaWiki 1.18 and above, so http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions will help you!

Related

PhpStorm - Choose which SASS-files to show autocomplete from first

I'm working on a project that has:
Bootstrap
FontAwesome
It's own custom stylings
When I write something like this:
.some-el {
font-size: $f (and then wait)
}
Then it thinks for a second and then suggests something like this:
$focus [my variable]
$fa-font-display [implicitly imported from font-awesome]
$fa-font-path [implicitly imported from font-awesome]
$fa-css-prefix [implicitly imported from font-awesome]
$font_size_base [my variable - that I was looking for]
...
...
It gets better with time, since it remembers what I've used previously - so I guess this is something that would fix itself. But it would be awesome to be able to fix it myself right away.
This is just an example where FontAwesome-variable are a nuisance, but other times it's the Bootstrap-variables.
How can I define which SASS-variables that are suggested (and/or the order of the suggestions)?
Solution attempts
Googled a bunch.
Looking through settings for 'Code Completion' and 'Code Style'
It's not possible. The only way I can think of is excluding the folder where the .css/.scss files you don't like getting completion from are stored from indexing (Mark directory as/excluded).
Related feature request: WEB-41257

"Template:!" output from imported MediaWiki template (Infobox)

I am quite new to Mediawiki and am trying to get infoboxes work.
I managed to get a simple one working but am now trying to get the 'Infobox video game' one working.
I am getting the following errors:
Template:!- style="" Template:! Developer(s) || Peter Harrap, Shaun Hollingworth Template:!- style="background: #F0F0F0;" Template:! Publisher(s) || Gremlin Graphics
The page is www.retroresource.co.uk/mediawiki
To try and solve this myself I have been to http://en.wikipedia.org/wiki/Special:Export
and entered in:
Template:Infobox
and
Template:Infobox video game
into the box, ticked all boxes, done a find a replace on replace text/plain with CONTENT_FORMAT_TEXT
I have imported the file through special imports.
I have also copied in the default CSS MediaWiki:Common.css into my own wiki.
What am I missing?
Thanks
You are missing Template:!. MediaWiki 1.24 removed the need for that template, but you are still on version 1.23
You can either update your wiki to 1.24 or add this in Template:!:
<onlyinclude>|</onlyinclude>

Include html pages with Google Closure

I'm working with Google Closure. I'm trying to include some html files in another one. Just like A.html import B.html and C.html, but actually, I don't get how to do that.
Can anyone could give some orientation please?
Thx in advance.
As far as I know you cant "include" html pages like that. The options you got is:
1: use ajax to fetch content
http://docs.closure-library.googlecode.com/git/closure_goog_net_xhrio.js.html
http://www.googleclosure.com/google-closure-ajax/
2: Google closure templates
https://developers.google.com/closure/templates/?csw=1
3: Use a serverside language like php to include your file.
http://www.php.net/manual/en/function.include-once.php
I really don't understand.
1) Have you HTML in JS and u don't know how to join it?
try goog.dom.appendChild(parent, child)
2) You don't know how to get it into JS?
You have to send it from server, or If I were in your shoes... use soy templates

MediaWiki: page editing allowed by creator only or with approval

I'm trying to restraint editing on the Wiki (using MediaWiki) that I'm creating as an internal project for my company.
We would like to be able to let the page creators specify none or one of the two following options:
Nobody besides the creator of this page can edit the content of this page
Anybody can edit the content of this page, but there must be an approval by the page creator before the changes are visible (whether it'd be by mail, on the wiki directly or something else - does not matter).
If the creator does not specify any of the 2 options, anybody can edit the page, and the changes are immediatly visible (default behaviour).
I've been browsing the net but I did not find an out-of-the-box solution for this. We managed to make some great custom stuff thanks to the edition of the LocalSettings file but not this.
Is there a solution for that functionality?
I don't know of an extension that would make this easy.
What I think you could do would be to take an extension like Flagged Revs or Approved Revs and make it so that instead of using groups as the determiner of approval status, it uses username. This might not be too difficult. Does this make sense?
I had the same problem as you and now i fixed it, here is the solution:
I am using http://www.mediawiki.org/wiki/Extension%3aApproved_Revs for article protection but it didn't fulfil my need it allowed the user to change the currently approved revision of the article and so the change was immediately reflected on the main page so I hacked it a bit, basically you need only one change
go to ApprovedRevs/ApprovedRevs.hooks.php
and find the following code:
static public function setLatestAsApproved( &$article , &$user, $text,
$summary, $flags, $unused1, $unused2, &$flags, $revision,
&$status, $baseRevId ) {
this is a function declaration just after it add the following code:
return false;
and it will work the way you wanted it to be i.e (the change you did will not be reflected until you approve it)

What is VHTML? How it works? Where can I find information about it?

The code below continues many lines until it ends with a expected /veotherwise /vechoose. I started working on a development firm a little ago where they use this html version called vhtml. I have search the web but it brings different definitions for vhtml. I have seen some posts in Joomla about vhtml but they don't look like the code below. I was expecting to get a pointer on how to understand the language.
It looks very similar to normal html with even very similar commands, or maybe smalltalk. But I just can decipher it. Any help will be appreciated. Please post comments if you want more information.
<vechoose>
<vewhen criteria='isPortalEdit'>
widget: practices-landing-page
</vewhen>
<veotherwise>
<veinclude src='private/webportal/webtemplate-content.vhtml'>
<vesection name='content-body'>
<% // Determine portlet visibility %>
<vecalc expression='isEmpty = false' output='none' />
<vechoose>
<vewhen criteria='isEmpty'>
<veif criteria='portlet.ifEmptyDo == "Hide"'>
<script>getTag( 'portlet_<%=portlet.order%>' ).style.display = "none";</script>
</veif>
<veif criteria='portlet.ifEmptyDo == "Show Message"'>
<%#portlet.ifEmptyMessage%>
</veif>
</vewhen>
...
Managed to find this: http://vitrage.sibweb.ru/english/ Looks like it could be an Apache Module called VITRAGE. Not much available in English however so am really unsure if it's a match.
On reading the code sample you posted, it looks like a XML styled procedural language. Are you sure it's available elsewhere or perhaps something that was developed internally?
I think this is an internal language between to bring server side aspect to a display on the browser. I have been unable to find documentation on this language, and I don't think Vitrage explains it. The server uses coyote as web browser, tomcat as a servlet handler and java as the backend.
Any new information please post.