MediaWiki share my custom skin "myskin" - mediawiki

I have a custom skin on a private instance of MediaWiki. I would like other logged in users to be able to preview my custom skin.
Using Preferences > Appearance > Myskin Preview results in the following URL:
https://url.com/index.php?title=Page_name&useskin=myskin
I assumed other users can preview my custom skin using something like:
https://url.com/index.php?title=Page_name&useskin=User:name/myskin
But that didn't work.
Any thoughts would be greatly appreciated.

Well if it is YOUR private instance of the wiki, you could just change the skin via $wgDefaultSkin. Everyone could see it then. What is it, that you want to accomplish? Sorry: cannot comment yet. This is no answer.

Related

Create an automated confetti explosion HTML for my wix site

I am in the middle of creating an e-commerce store and would love to add a little something special to my check out page.
I was thinking about an explosion of confetti, or glitter or something similar would be nice. However, I would like it to look elegant and tasteful. I dont mind something like this.....
import Confetti from 'react-dom-confetti';
const config = {
angle: 51,
spread: 360,
startVelocity: 68,
elementCount: 200,
decay: 0.87
};
return
I just have no idea how to put it into HTML format for my WIX site.
I found this at https://daniel-lundin.github.io/react-dom-confetti/ -but I know it is missing something major to make it work.... and I dont like that you have to press a button to make it work, I would prefer it to be automatic.
Please help me haha
Kirsten :)
This was an interesting challenge to figure out. So I did!.
What you need to do is embed the javascript that actually performs the confetti effect in an HTMLComponent using Wix Code. It is a little complicated to explain here.
However, I have created an example page that shows the effect working, using Danial Lundin's code, on my examples web site here:
https://stcroppe.wixsite.com/steveonsoftware/example-code/wix-confetti-page
It also shows you the code it uses on the Wix Page to send and receive messages to
the HTML Component that runs the code AND it also shows you the HTML Code I used in the HTML Component to communicate with the Wix page as well as execute the confetti functionality.
Regards
Steve

Get an absolute link from a relative one in Freemarker

I'm creating a site using Magnolia - CMS. Now I am implementing a blog page. On each blog page, there are several share buttons. Now I'm busy implementing the twittershare button. Here I am going to use the twitter cards. For that, I need to provide the URL of an image in a metatag. Main problem: I retreive my image like this: ${damfn.getAssetLink(content.blogImage)}. This only returns a relative path to my resource. Is there a quick way (in freemarker), that will convert tis to an absolute link?
Many thanks in advance!
usually you define magnolia.default.base.url in the magnolia.properties.
then you can retrieve it with Components.getComponent(ServerConfiguration.class).getDefaultBaseUrl()
now you have to install the service into freemarker. you can do that by adding installer-tasks into the renderers on startup. you do that in your module-version-handler. there you overwrite the getStartupTasks(...), something like this:
#Override
protected List<Task> getStartupTasks(InstallContext installContext) {
final List<Task> tasks = new ArrayList<>();
tasks.add(new InstallRendererContextAttributeTask("rendering", "freemarker", "serverConf", ServerConfiguration.class.getName()));
tasks.add(new InstallRendererContextAttributeTask("site", "site", "serverConf", ServerConfiguration.class.getName()));
return tasks;
}
now you can call in freemarker:
"${serverConf.defaultBaseUrl}/${ctx.contextPath}/${damfn.getAssetLink(content.blogImage)}"
checkout if the slashes are necesarry and make sure that defaultBaseUrl is set properly in your magnolia configuration ("/server/...")
edit: there should be an easier by calling the current request in freemarker ${Request} so it could be something like "${Request.domain}/${ctx.contextPath}/${damfn.getAssetLink(content.blogImage)}" without injecting the serverConfiguration into the renderer

How to create a simple Like Button?

I need a simple like button. It must allow visitors to vote without logging into their social networks accounts.
Any ideas?
I recreated the Kudos buttom from svbtle as an intependent widget.
kudosplease.com
What is a "Kudos"?
To gain kudos is to earn respect and recognition. A one-element kudos widget with no dependencies.
"kudos" on urbandictionary
How to use it
1. Add the CSS/JS to your page
2. Add the widget HTML
<div class="kudos"
data-amount="0"
data-url="domain.tld/my-awesome-article"></div>
3. Initialize the widget via JS
new KudosPlease({
el : '.kudos',
duration : 1500,
persistent : true,
status : {
alpha: 'fontelico-emo-shoot',
beta: 'fontelico-emo-shoot',
gamma: 'fontelico-emo-beer'
}
});
Free API or host yourself
The amount of kudos for a specific url is saved in my backend, but you can also download it on GitHub: https://github.com/TimPietrusky/KudosPlease
Examples
Kudos Please #CodePen
"Tell us something about you" #CodePen
I recreated a Medium-style applause button:
http://applause-button.com/
The button persists claps to a hosted back-end service, so no need to spin up your own database. Adding it is as simple as follows:
<head>
<!-- add the button style & script -->
<link rel="stylesheet" href="dist/applause-button.css" />
<script src="dist/applause-button.js"></script>
</head>
<body>
<!-- add the button! -->
<applause-button style="width: 58px; height: 58px;"/>
</body>
You can store 'likes' in your own database. Just have a 'like' link that hits the server and updates a count in the database table. Of course this requires a database and server side language (PHP, Ruby, Python, etc).
The https://svbtle.com/ blog network has a cool little 'Kudos' button which anonymously likes when you hover over the kudos button. http://howtomakelightning.com/365/
I am not sure how you would do it on a static website though.
One cannot simply create a like button :D
Your button will have store the "likes" somewhere (usually a database), which is by definition a dynamic process and find a way to deal with a few security and UX issues.
If you are using React I created this service https://lyket.dev/, that will take care of everything.

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)

Showing HTML reports in CruiseControl dashboard

I have been looking into CruiseControl configuration recently (I'm a complete CC noob) and so far I understand that various XML reports generated by your build process (eg mbunit.xml, ncover.xml, fxcop.xml) can be shown in the dashboard by adding a reference to the xml to the following part of the ccnet.config:
<publishers>
<merge>
<files>
<file>logs\some-report.xml</file>
</files>
</merge>
</publish>
adding an xsl file to transform the xml into presentable html and adding a report build plugin to dashboard.config which references the xsl:
<xslReportBuildPlugin description="Some report"
actionName="SomeReportAction" xslFileName="xsl\some-report.xsl" />
My question is: if I have some reports (code documentation generated by JGregory's Docu and test specs generated by jpboodhoo's Bdddoc) which are pure HTML, is there any way I can show these in the dashboard in a similar way? I can't figure this out. I did think of adding an ExternalLink directly to the HTML page, but this is in a protected area which users normally cant access. Anyone any ideas?
Currently this is not possible in CruiseControl.NET up to version 1.4.4. However this functionality is being added as part of version 1.5.0.
We can't give you a timeframe on the release yet, but you can download and try out the latest version from http://ccnetlive.thoughtworks.com/CCNet-builds/1.5.0/.
Craig
As craig already mentioned this functionality was added in CCNet 1.5, you'll find the documentation about the HtmlPlugin here: http://cruisecontrolnet.org/projects/ccnet/wiki/HtmlReportPlugin