Project:Support desk/Sections/Formatting

__NEWSECTIONLINK__ = Template/Table Syntax Support =

Navbox

 * MediaWiki: 1.11.0
 * PHP: 5.1.4 (cgi-fcgi)
 * MySQL: 5.0.45-log
 * Database: Unknown, if you know how to figure it out please tell me.
 * URL: Red Orchestra Wiki

http://www.maporchestra.com/wiki/index.php?title=Template:Navbox

I don't know why there is that extra and  there, any help?

—-PatPeter,  MediaWiki Support Team  23:36, 5 February 2008 (UTC)


 * The template transcludes which in turn transcludes . The problem is in one of these two subtemplates, not in the main template:navbox --Carlb 02:31, 9 March 2008 (UTC)


 * Alright it seems that if you look at this end of Tnavbar there are parser functions for these tags, but if I take them out the entire template stops working. Are there any MediaWiki: definitions that this template needs (i.e. system messages). -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  16:36, 9 March 2008 (UTC)

Lining up the table text correctly...

 * MediaWiki: (Reported by your Wiki's Special:Version page)
 * PHP:
 * MySQL:
 * URL:

Can someone take a look at this page's source: http://www.windrep.org/Community

and perhaps tell me what I have to do in order to get all the columns to line up. I realise that some of the rows won't line up because some have more lines than others, but...I thought I had enough space to make the columns work out.

—74.128.207.61 02:18, 19 February 2008 (UTC)


 * Set the table row style so that they each take 1/3 of the width, which should solve your problem. --Skizzerz talk - contribs [[Image:Tournesol.png|20px]] MediaWiki Support Team  03:05, 19 February 2008 (UTC)

Currently, I have the tables set like this: {| class="wikitable" style="text-align:left;width:90%" which leaves me with a 10% buffer. Is there something else I can do?
 * - style="background-color:#efefef;"

-74.128.207.61 05:15, 19 February 2008 (UTC)
 * See W:Help:Table, you can specify each header or column as a relative percentage or pixel width --Zven 05:38, 19 February 2008 (UTC)

A different sort of Tables question...

 * MediaWiki: (Reported by your Wiki's Special:Version page)
 * PHP:
 * MySQL:
 * URL:

Ok, another question regarding lining up materials. First, take a look at this page:

www.windrep.org

You'll notice that the first column of portal links in the category sections line up...but then everything kind of goes haywire and some line up in the second columns, and none in the third columns. I've messed around with the code a bunch, and I suspect it has to do with the length of the links but would dearly love for them to be lined up vertically.

Is there a way I can do this while maintaining this "look," or is it impossible?

—74.128.207.61 02:20, 20 February 2008 (UTC)
 * You have more than one table there, so the browser parses the column widths independently. You could try setting col widths manually, but it's be a tough call with text like that. I suggest making it all into one table, and everything will line up easily that way, although you will lose the white space between rows and you'll have to settle for something else (like a white-background row spanning all columns).--Töff 17:17, 20 February 2008 (UTC)

How would I go about setting the col widths manually? I've tried doing it the same as I would in a regular table, but that does not work. -74.128.207.61 16:12, 22 February 2008 (UTC)
 * Some of your tables do not have the opening  {|  ... maybe that's the problem.--Töff 15:08, 24 February 2008 (UTC)
 * I'll just soapbox briefly and say that the reason I don't care for manual col width is that text of varying length often "just doesn't look right" in even-width columns. Long text strings looked cramped and short text strings look lonely. Browsers seems to understand this (don't ask me how) and they vary the width of the columns to balance the text better (as you can see on your own tables!) This is why I would choose to make this a single table, and let the browser set the col widths, rather than set manual col widths on several separate tables. (Plus, one other minor thing, if you want to change a col width later, you have to do so for every table. Not atrocious when you have only 3-4 tables, but I have a pet peeve against a single value set in more than one place.) Okay, /end rant--Töff 15:16, 24 February 2008 (UTC)

Large font size in table headings cutting off top and bottom of text
[[Media:Example.ogg]]*MediaWiki: 1.11.1    (Reported by your Wiki's Special:Version page)
 * PHP: 5.2.5 (apache2handler)
 * MySQL: 5.0.45-community-nt
 * URL: Intranet (unreachable on the web)

I'm using Wiki version 1.11.1 and trying to create a bit of a heading for a page. I want the font size larger than normal (not as large in the sample below but this is to show the problem I'm getting). When I specify a large font size it appears to be doing this correctly but for some reason the height of the heading row does not adjust to accommodate the font and therefore it appears to be cut off at the top and bottom.

I want orange text so I've used the font tag. Is there another (better?) way?

Any help would be appreciated. Thanks Darren. 203.134.124.36 05:38, 21 February 2008 (UTC)

Example:

—203.134.124.36 05:38, 21 February 2008 (UTC)


 * Hey... Which browser are you using? IE? On my Opera, Firefox and Konqueror on Linux exerything's OK :). Maybe you should add some fixes for your browser in css files. Peter de Sowaro 12:02, 21 February 2008 (UTC)

The above looks broken fro me in FireFox on Linux... odd. Same when using style="font-size:370%; color:orange" btw:

TRy to set the line hight: style="font-size:370%; color:orange; line-height:1.7ex;" (this is a hack - check if it makes things worse in other browsers):

-- Duesentrieb ⇌ 14:34, 21 February 2008 (UTC)

Templates + MW1.12alpha equals SLOW page rendering

 * MediaWiki: 1.12alpha (r30976)
 * PHP: 	5.2.2 (apache)
 * MySQL: 5.0.22
 * URL: desciclopedia.pt

I'm finding that pages that make heavy use of templates (or templates combined with extension or parser functions) are taking significantly longer to generate on MediaWiki 1.12alpha than on previous versions, including 1.11

For instance, this appears (based on the &lt;!-- Served by sophia.uncyclomedia.org in 42.645 secs. --&gt; at the bottom of the HTML source) to be taking ten times as long to generate as this (four to seven seconds, in MW1.11). Both are the same page, generated from the same data, same server, same extensions - the only difference is that one of the URL's points to a MediaWiki 1.11 installation and the other to 1.12alpha.

I've been seeing this in various 1.12alpha revisions over the last two months or more. A page like this which uses many template inclusions seems too slow to be usable.

I'd presume that there have been major changes in the way template transclusion is handled in the code, but would like to know if there is a fix (other than rolling affected sites back to 1.11) at this time.

—Carlb 19:06, 21 February 2008 (UTC)


 * You should use a supported version. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  17:26, 1 March 2008 (UTC)


 * Oddly, reverting to other recent versions (as far back as October) didn't seem to help. This leaves one wiki (whichever had the highest traffic) still on an unsupported 1.11alpha from May'07, as that seemed to run more quickly. Go figure. I've back-ported bits of 1.12 (such as the ability to directly protect non-existent pages) until I can determine why this is happening, but the issue does remain unresolved. --Carlb 02:09, 9 March 2008 (UTC)

infobox template code

 * MediaWiki: (Reported by your Wiki's Special:Version page)
 * PHP:
 * MySQL:
 * URL:

I was wondering if some one can help me with this Infobox thing.. How can i create a template for infobox? I wan this K2 template from here

http://en.wikipedia.org/wiki/Wikipedia:List_of_infoboxes/Geography

I need the source/code for that template so i can have something similar to that in my wiki (i won't be using it for mountain but i need that)

thank you

—Ghorzang 19:19, 27 February 2008 (UTC) $$Insert formula here$$


 * You can always view the source code of a wiki template page. Smaug 20:30, 27 February 2008 (UTC)

—Smaug 19:19, 27 February 2008 (UTC) $$Insert formula here$$


 * thanks buddy.. so how exactly does this work?? i mean how do you create an infobox? I just want to know what you do.. Ghrozang 20:30, 27 February 2008 (UTC)

Modèle:Début des onglets; #if function isn't working
* MediaWiki: 1.11.1 * PHP: 5.2.5 * MySQL: 5.0.x   * URL: http://www.firmalog.com/index.php/%C5%9Eablon:Metakutu#Netice

I want to do Modèle:Début des onglets but parserfunctions didin't work. I upload css and js. What will I do? --81.213.165.83 14:13, 2 March 2008 (UTC)

template to put a div around the articles

 * MediaWiki: 1.11.0
 * PHP: 5.2.4 (cgi)
 * MySQL: 4.1.11-Debian_4sarge7
 * URL: http://www.wikijava.org/

Hello,

I would like to insert in my page a div to enclose the whole article, to do so I am trying to do like in mediawiki's Template:TalkFromMeta and Template:endTalkFromMeta.

It seems that the opening DIV gets automatically closed at the end of the template containing it. So the div box is confined to the size of the area occupied by the template in the page.

At the end of the page I see a lonely. Which tries to close a div that is not open anymore.

Any idea on how to solve this?

thank you,

—DonGiulio 22:59, 3 March 2008 (UTC)


 * There was a change in the way templates are handled, as of MW1.12 is is possible to open a &lt;div&gt; in one template and close it in another somewhere further down the page. The older versions of MediaWiki would see the unmatched opening &lt;div&gt; in the first template and close it automatically, so that approach won't work.
 * This means that, on upgrading to 1.12 or 1.13, many wikis will find that templates with incorrectly-constructed HTML and unintended mismatched or unclosed tags will no longer display correctly.
 * One option that may work consistently across multiple versions: use &lt;table&gt; codes instead of div's where possible. The old MediaWiki will allow a table to be started in one template and ended in another. --Carlb 02:15, 9 March 2008 (UTC)

template variables and parser extension tags

 * MediaWiki: 1.11.0
 * PHP: 5.2.4 (cgi)
 * MySQL: 4.1.11-Debian_4sarge7
 * URL: http://www.wikijava.org/

Hello,

I would like to use a template to insert some google Banner in a page.

This is the content of the template: google_ad_client = "";

and I call it in the pages with:

but what I see is like the between the quotes has been passed to the extension unparsed, and with the literal string "  ".

While outside the Parser extension tag the gets normally parsed and I see the "XYZXYZ" string as expected.

I have a similar problem with other templates that call the variables from inside other parser extension tags.

Any idea on how to solve this?

thank you,

--DonGiulio 23:27, 3 March 2008 (UTC)


 * Solved by using the TagParser extension. --DonGiulio 23:01, 5 March 2008 (UTC)

Double transclusion problem

 * MediaWiki: 1.11.1
 * PHP: 5.2.5 (apache2handler)
 * MySQL: 5.0.45-community-nt
 * URL: Intranet wiki

I created a complex template. This 'god' template serves as a dummy for 'child' templates, which are created by passing parameters. The 'god' template is in the Category:God. Because I don't want the 'child' templates to appear in the same category I embraced Category:God with a tag. I want the 'child' template to appear in the category 'child', without the need to type Category:Child in each 'child' template. Additionally to this I dont want the pages that include 'child' templates being collected in the 'child' category.

Is there a way to place an information in the 'god' template, so that the 'child' template has the following markup in it:  ?

I hope the descirption is not to confusing. The sense behind this dynamic categories. Thank you very much in advanced.

—84.60.24.154 21:27, 11 March 2008 (UTC)


 * Try . -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  22:53, 11 March 2008 (UTC)

Templates

 * MediaWiki: 1.12
 * PHP: 4.2
 * MySQL: 4.1
 * URL:

I am having issues setting up infobox templates, actually templates in general. I understand that you create the template then use a code on other pages to utilize it. But i can't seem to figure out the format of the base code. Ive tried to utilize other templates for examples, but end up needing other templates to create my template. I want to make a simple person infobox for my wiki. How do i do it? Every page i've gone to for instructions only goes over how to utilize the template on their site. I need help for setup on my site. firehawkv8@yahoo.com Thanx.

—71.99.148.153 22:54, 11 March 2008 (UTC)


 * Alright so what are you having trouble on setting up the Wikicode? Try looking here and here. You need ParserFunctions enabled for most templates. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  17:52, 22 March 2008 (UTC)

distorted page due to infobox

 * MediaWiki: 1.11.1
 * PHP: 5.2.4 (cgi)
 * MySQL: 5.0.45-community
 * URL: http://starshiptracker.com/guide

I've installed a wiki for a friend, where infoboxes are critical to the purpose of the site. I have infoboxes working just fine on my private wiki, so I did a fresh install for my friend and then copied & pasted code from my wiki (including MediaWiki:Common.css and MediaWiki:Monobook.css). I figured that I could set up the 2nd wiki to be near identical to mine, for the most part.

My infoboxes utilize hidden fields. Since I'm not certain of the right term for this, let me describe: the template for the infobox includes all the possible fields but only displays the fields where data is provided. This does work on my wiki. However, on the second site, it gets heavily distorted. I narrowed it down to the hidden fields, because it accepts just fine an entry that includes the name of the starship class being focused upon (as shown here where only the standard field is used).

To me, this means it relates to some change I made to the server-bound files on the original wiki at some point, and were not yet made to the new install. Where should I start looking?

Any help would be much appreciated!

—LeyteWolfer 22:08, 14 March 2008 (UTC)


 * This happens on a lot of custom styles. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  04:56, 16 March 2008 (UTC)
 * What about plain-vanilla Monobook? Do you have a suggestion? --LeyteWolfer 16:06, 16 March 2008 (UTC)


 * The comment was made quickly as I think I had to go somewhere, and if it was meant to be a solution I would have marked this thread as resolved, the point was that completely custom skins are not flawless. As for plain good old monobook you will need to edit MediaWiki:Monobook.css for display. I know no CSS but would suggest coping that of Wikipedia. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  03:46, 22 March 2008 (UTC)

(see here for tangential discussion on CustomStyle skins; original problem remains unaddressed)


 * The problem is that you don't have  defined in Monobook.css or Common.css. Check that and come back to tell us if it worked. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  17:49, 22 March 2008 (UTC)

Issue with "=" Equals sign in URL

 * MediaWiki: 1.6.10
 * PHP: 5.0.4 (apache2handler)
 * MySQL: 4.1.20
 * URL: KHU Wiki, Template:Worldplot

In this template, we wish to link to the edit page of whatever page the template is on, but whenever we enter the required =, between action=edit and title=. Using the URL-encoding makes the title of the page Whateverthepageis&action=edit instead of acting on these. It reads the ampersand fine but for some reason it kooks out when an = sign is entered, which is compulsory for the edit.

I'm rather new to Wiki coding, so perhaps it's an issue with that, I'm not sure. Thanks.

Declan Wiki Administrator at KHUWiki

—222.154.22.127 07:25, 17 March 2008 (UTC)


 * Do you have Manual:Short URLs enabled? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  03:50, 22 March 2008 (UTC)

HTML in wiki?

 * MediaWiki: 1.12.0rc1
 * PHP: 5.2.5 (cgi)
 * MySQL: 5.0.44-log

Hi, I'm french so sorry for writing mistakes

i would like to use Markups, but they are not interpreted ... exemple :    Name  Value    is not interpreted

do i have to set up a parameter ? or add an extension ?

thanks for you answers.

—82.251.190.210 18:19, 18 March 2008 (UTC)