Hello I am new to this and wondering how mediawiki has done the frames like on the front page I have linked a image for reference
Thank you.
Hello I am new to this and wondering how mediawiki has done the frames like on the front page I have linked a image for reference
Thank you.
They're just using CSS. Granted, finding out how the front page is formatted isn't simple, but if you edit this template, you'll see that they html ids like "mainpage_topbox
" are used so that CSS from MediaWiki:Common.css (since moved to MediaWiki:Gadget-site.css) can create a box using:
#mainpage_topbox { background: #f9f9f9; padding: 0px; border: 1px solid #aaaaaa; margin: 0.2em 10px 10px; }
I have got the same question. Could anybody explain step by step how to crate main page like on MediaWiki?
Quick and dirty way:
A few things you should know:
Hi, trying to do the same thing. When trying to do the:
Type {{:MediaWiki}} in the "Input text" box on Special:ExpandTemplates.
I get no result at all. What am I doing wring?
Go to Special:ExpandTemplates (on mediawiki.org, not your local installation), enter "{{:MediaWiki}}" in the large text box labelled "Input text:" (not the small one labelled "Context title..."). Press OK. Did that work for you?
Where to move the Gadget-site.css? I've just put it in my mediawiki main folder but my main page still looks ugly.
I also want to put boxes on my front page (se testpage here: http://sp.føniks.nu/Forside4). I tried to follow the above instructions but somehow the CSS is not active even though I copied the content of MediaWiki:Gadget-site.css to my own wiki's http://sp.føniks.nu/MediaWiki:Common.css. Any suggestions about what is missing to get the boxes? Thanks in advance.
At the very least, Extension:TemplateStyles is now required with the new Template:Main page code too. And then you'll need to appropriately copy Template:Main page/styles.css too.
Thanks AhmadF.Cheema. I installed Extension:TemplateStyleswith no problems. But I get an error when creating Template:Main page/styles.css. In Danish versions the page is automatically converted to Skabelon:Main page/styles.css, and input of the code Template:Main page/styles.cssproduce an internal error (see below). Any idea what went wrong?
[b9f976641f9b2485d88ddf4a] /index.php?title=Skabelon:Main_page/styles.css&action=submit Error from line 78 of /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/extensions/TemplateStyles/includes/TemplateStylesContent.php: Class 'Wikimedia\CSS\Parser\Parser' not found
Backtrace:
#0 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/extensions/TemplateStyles/includes/TemplateStylesContent.php(135): TemplateStylesContent->sanitize(array)
#1 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/Revision/RenderedRevision.php(239): TemplateStylesContent->getParserOutput(Title, NULL, ParserOptions, boolean)
#2 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/Revision/RenderedRevision.php(211): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(TemplateStylesContent, boolean)
#3 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/Revision/RevisionRenderer.php(175): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)
#4 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/Revision/RevisionRenderer.php(128): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#5 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#6 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/Revision/RenderedRevision.php(175): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#7 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/Storage/DerivedPageDataUpdater.php(1265): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#8 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/Storage/PageUpdater.php(707): MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()
#9 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/page/WikiPage.php(1886): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#10 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/EditPage.php(2285): WikiPage->doEditContent(TemplateStylesContent, CommentStoreComment, integer, boolean, User, string, array, integer)
#11 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/EditPage.php(1574): EditPage->internalAttemptSave(array, boolean)
#12 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/EditPage.php(677): EditPage->attemptSave(array)
#13 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/actions/EditAction.php(60): EditPage->edit()
#14 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/actions/SubmitAction.php(38): EditAction->show()
#15 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/MediaWiki.php(501): SubmitAction->show()
#16 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#17 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/MediaWiki.php(860): MediaWiki->performRequest()
#18 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/includes/MediaWiki.php(517): MediaWiki->main()
#19 /storage/content/45/1007945/sp.xn--fniks-vua.nu/public_html/index.php(42): MediaWiki->run()
#20 {main}
Do you have SSH access on your server?
You probably need to run composer install --no-dev
in the extension directory. This step should be needed only when installing Extension:TemplateStyles through git, however there appears to be some bug for the time being.
Hi AhmadF.Cheema. Yes. I tried but with "command not found". Any idea what to do?
-securelve_sh-4.1$ ls
CategoryTree ConfirmEdit Interwiki Nuke Poem SpamBlacklist WikiEditor Cite Gadgets LocalisationUpdate OATHAuth README SyntaxHighlight_GeSHi CiteThisPage ImageMap MobileFrontend ParserFunctions Renameuser TemplateStyles CodeEditor InputBox MultimediaViewer PdfHandler ReplaceText TitleBlacklist
-securelve_sh-4.1$ composer install --no-dev
-securelve_sh: composer: command not found
-securelve_sh-4.1$ cd TemplateStyles
-securelve_sh-4.1$ composer install --no-dev
-securelve_sh: composer: command not found
This will depend on your website host. You'll have to ask their support, how to make composer available for your account.
Hello AhmadF. I tried again after help from support but get this error:
-securelve_sh-4.1$ composer install --no-dev
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for mediawiki/mediawiki-codesniffer 24.0.0 -> satisfiable by mediawiki/mediawiki-codesniffer[v24.0.0].
- mediawiki/mediawiki-codesniffer v24.0.0 requires php >= 5.6.99 -> your PHP version (5.6.33) does not satisfy that requirement.
Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.
Any suggestions? Update PHP-version?
Looks like your MediaWiki installation is using PHP v7.0.32, but the command for composer is using PHP v5.6.33.
You'll probably have to ask your host how to make use of the newer PHP version in the command line, in order to be able to run the composer command.
My host referred me to this page: https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B
This process seems indeed very complicated. Isn't the a more easy way ex. direct CSS-scripts? I only need the 4 boxes on the front page.
Thanks.
I'm pretty sure what your host referred to is irrelevant here. They just needed to provide the command/path that will make use of the newer PHP version on the command line.
In any case, I haven't used Extension:TemplateStyles, but I suppose copying the contents of Template:Main page/styles.css to your MediaWiki:Common.css should work. Also, you would no longer need the "templatestyles" line from Template:Main page.
I think the problem started because I used DANISH settings. When I changed to english language the correct formatting works fine. Thank you AhmadF.Cheema for the inspiration!
hi everybody,
what about the mobile view? I know this post is three years old but maybe someone has a answer.
I have the boxes on my site but can´t see them on mobiel view.
any ideas?
now as logged in user.
to my question above my site is antibiotika-fibel.de
thanks