Topic on Project:Support desk/Flow

Adding an infobox, index or similar

15
79.136.64.84 (talkcontribs)

Hi! My wiki has five categories of pages. To make it simple, lets say that one of these categories is pages about cars while another is pages about bikes. I have made one index page for each of these categories, so that all pages in the category are easy to reach from this index page. Now, I want each page in a category to link to the index. And I want it to do so that clearly marks the page as a part of this category.

Right now, I simply end each page with something like "this page is a page about cars" or "this page is a page about cars". This is a really bad solution, so I want a better one. I'm trying to implement a certain solution, but I'm also open to other suggestions. The solution I'm currently trying to implement is the "infoboxes" that wikipedia use. A box with information and links, to put on the right side of the page.

I tried to search for information on this, both on wikipedia and on mediawiki, but didn't find anything that seemed to solve the problem. I also browsed through the , in case I need an extension to make an infobox. Didn't find anything there either. The search words I used were "sidebar" and "infobox".

On wikipedia I have seen three kinds of boxes I could use.

I'd like to be able to make any of these (or some fourth kind I haven't seen yet), but so far I have failed. I copied the templates for the first and second kind from wikipedia, but didn't work. When I add a sidebar, the page simply says "{{#invoke:Sidebar|sidebar}}"

So... any advice?

  • What do I need to make a sidebar, infobox or series like the ones at Wikipedia?
  • And is there some other good method to organize my pages?

Thank you for your time!

79.136.64.84 (talkcontribs)

PS. it doesn't say "script error", it says "((#invoke:Sidebar|sidebar))" - but with "{" and "}" instead of "(" and ")".

Jackmcbarn (talkcontribs)
79.136.64.84 (talkcontribs)

Got Scribunto now. Trying to import from wikipedia still doesn't seem to work. The "rights" sidebar says "Script Error", which when clicked says "Script error: No such module "Sidebar"."

79.136.64.84 (talkcontribs)

...and when I try to copy the "Module:Sidebar" from wikipedia, it says "[a88f3039] 2014-09-12 23:14:42: Fatal exception of type MWException".

Jackmcbarn (talkcontribs)

That exception message isn't useful itself. See Manual:How to debug to get a message that will be useful.

79.136.64.84 (talkcontribs)

Tried that now. Didn't work. Guess it isn't a PHP error. Not sure what kind of error it could be. :-/

Has anybody here used scribunto to add sidebars to your wiki? If so, how/what did you do to make it work?

Jackmcbarn (talkcontribs)

What do you mean it didn't work? Did you enable showing exception details?

79.136.64.84 (talkcontribs)

No, I had only added...

error_reporting( -1 );
ini_set( 'display_errors', 1 );

That didn't have any effect.

I have now tried to also add...

$wgShowExceptionDetails
$wgDebugToolbar
$wgShowDebug
$wgDevelopmentWarnings

...or...

$wgShowExceptionDetails = TRUE
$wgDebugToolbar = TRUE
$wgShowDebug = TRUE
$wgDevelopmentWarnings = TRUE

Both options broke my wiki! Couldn't load any page until I restored the index.php

Jackmcbarn (talkcontribs)

Add the exact line "$wgShowExceptionDetails = true;"

Monic abc (talkcontribs)

Have you found a solution of this problem? Because I have the same problem now.

Jackmcbarn (talkcontribs)

The same thing I said then applies now. Please enable showing exception details, then reply here with the details you get.

Monic abc (talkcontribs)

I'm sorry, I'm not 79.136.64.84 ;) I'm another user. And what shows in my page (I wrote only Sidebar in {} brackets):

   Lua error in module „mw.html.lua”, in line 345: Tag name must be a string.
   Backtrace:
      (tail call): ?
      [C]: in function „error”
      mw.html.lua:345: in function „create”
      Moduł:Sidebar:28: in function „chunk”
      mw.lua:567: ?
      (tail call): ?
      [C]: in function „xpcall”
      MWServer.lua:87: in function „handleCall”
      MWServer.lua:301: in function „dispatch”
      MWServer.lua:40: in function „execute”
      mw_main.lua:7: in main chunk
      [C]: ?

And I copied and pasted Sidebar module from here: []

Monic abc (talkcontribs)

Ok, that's weird. I have 1.23 MediaWiki, so I wanted to install latest stable version to this MediaWiki. But there were errors. When I downloaded and copied 1.24 everything seems ok. Why this is happening?

Jackmcbarn (talkcontribs)

Templates and modules from Wikipedia are designed to work with the latest version of MediaWiki and are not supported on older versions.

Reply to "Adding an infobox, index or similar"