Wikia

Memory Alpha

Wiki coding for sidebars

37,504pages on
this wiki

Forum page

Forum icon  ForumsTen Forward → Wiki coding for sidebars (replywatch)
This forum discussion has been archived
This forum discussion has been archived and should not be added to. Please visit the Forums to begin a new topic in the relevant location.

I'm thinking of starting a wiki about a television show here in the UK but I need to know more about wiki coding before I attempt it, in order to make it look decent. Specifically, I was wondering if anyone could give me some advice on how to create the sidebars we have here on MA, particularly the episode and character ones? We have a good setup here where the sidebar links to previous episodes and such. Alternatively, if you have any links to decent websites that have a easy to follow guide for creating them, that would be great also. I'd appreciate any help in this area. Thanks! :) --| TrekFan Open a channel 19:55, April 16, 2011 (UTC)

Our sidebars are simple wiki tables with a specific CSS class that deals with design and placement. For the table syntax, check any available sidebar template, for example Template:Sidebar actor (there may be simpler ones, though). For the CSS, check MediaWiki:Common.css for the sidebar instructions starting with the comment that says "TABLE: WIKI-SIDEBAR" and ending before the comment that says "TABLE: NAV-SIMPLE". -- Cid Highwind 20:27, April 17, 2011 (UTC)
Plus, for what it's worth, newly created Wikia wikis come with a generic "Infobox" template that can be used to copy formatting for new sidebars from. -- Cid Highwind 20:34, April 17, 2011 (UTC)

Thank you for the reply, Cid. So, if I was to use a similar sidebar to what we use here, I could use the CSS you mentioned above (edited to suit my purpose) and any of the sidebar templates? Is it just a matter of copying across the CSS then any sidebar template with work on any wiki? Or is it more complicated than that? --| TrekFan Open a channel 21:37, April 17, 2011 (UTC)

You may want to check this out as well: MediaWiki Parser Functions. - Archduk3 00:31, April 18, 2011 (UTC)
In terms of a direct answer you were looking for (I understand your problem, I have gone through this many times myself when wiki coding), yes, if you copy the ""TABLE: WIKI-SIDEBAR" coding in the css file and place it on your own wiki, you can then use the code as is, or even edit it to suit your needs. Remember to always properly call to it when making the template (another mistake I have often made) for simplicities sake, I often rename the name of such things (the codding in css, that is) to "Sidebar". but whatever is easiest for you to do (for clarification, check the sidebar template pages, you'll see what I mean when "Class="..."" is used). Also, just FYI, after you save edits to a CSS page, you may need to clear your cache before you'd notice any changes (that got me at first, too). --Terran Officer 06:57, April 18, 2011 (UTC)
Yeah. Basically, if you copy the CSS and paste it into your MediaWiki:Wikia.css (unless you want to support the Monobook skin, too - but at that point, you should know a thing or two about CSS yourself), then any sidebar will work. Possible exceptions could be the random other template that may be used by individual sidebar templates here. Template:! comes to mind, but that is a pre-existing template on new Wikia wikis. Parser functions are good to know, but you won't have to deal with them in detail - if you have a rough understanding of what #if does, you're probably good to go. FWIW, if you copy code, make sure to attribute it to MA in a comment of your CSS file. -- Cid Highwind 10:02, April 18, 2011 (UTC)

Thanks for all your help and comments. I'm going to have a crack at it now. :) --| TrekFan Open a channel 10:50, April 18, 2011 (UTC)

Around Wikia's network

Random Wiki