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)