Project:Support desk/Sections/Formatting

__NEWSECTIONLINK__

= Formatting Support =

Existing pages with table code doesn't work in mediawiki 1.13.2

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.6
 * MySQL version: 5.0.51a
 * URL: localhost

I have upgraded mediawiki version 1.10.0 with 1.13.2. I have executed update.php and refreshLinks.php. But the pages which have table code has broken. The data is in text table. All the pages are working good with 1.10.0 version. But doesn't work with 1.13.2.

So, I have edited the page which was not working on 1.13.2 and copied the data from other system where it is working with 1.10.0 and saved the changes. but the page is not saving properly and it is removing the '|' and also placing some extra characters to the data.

Even the table format is good also the page is not getting displayed in tabular form.

It works good when i create a new page with table format.

Please help me that what's wrong with version 1.13.2 that doesn't support existing page table code? —The preceding unsigned comment was added by 208.88.84.10 (talk • contribs) 20:49, 31 December 2008. Please sign your posts with ~ !


 * I really need your help in finding this problem. Actually, it looks like there is some encoding problem some where with mediawiki version 1.13.2. This is corrupting the page display. If you are already aware of the problem then please let me know what could be the solution? —The preceding unsigned comment was added by 208.88.85.100 (talk • contribs) 18:21, 13 January 2009. Please sign your posts with ~ !

nowiki tags appear

 * MediaWiki version: 1.13.3
 * PHP version: 5.5
 * MySQL version: 5
 * URL:

Hi all,

I have a certain issue which makes  appear on the results of an mssql query below are the source



Fixed Issues
The table below lists all issues fixed since the last release.

include a path and transfer a excel table

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.0-8+etch13 (cgi-fcgi)
 * MySQL version: 5.0.32-Debian_7etch8-log
 * URL:

Hello I'm trying to include the path on the top of a site (example wiki>help>diskussions>). Are there a command? I'm looking for a tool to transfer excel tabel in a wiki table? Thanks for help

RecentChanges Filtering

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.8
 * MySQL version: 5.0.45
 * URL:

Hi, we're using MediaWiki for organisation of our campus group. I added " " to our mainpage so that every user is advised of new topics. My problem is that that articles of a certain category are changed much more frequently than others. It doesn't make sense to get informed about changes in this categories' articles. How can I filter this category? On the RecentChanges Page itself it is possible with "$wgAllowCategorizedRecentChanges" but I don't know how to use it on our mainpage.

Thank you!

—Trop 18:39, 11 June 2009 (UTC)

(resolved) Problem with a template, I want empty/unused variables to leave blank spaces not

 * MediaWiki version: 1.14.0
 * PHP version: 5.2.6 (apache2handler)
 * MySQL version:  5.0.67-0ubuntu6-log
 * URL: http://wildedibleplants.wikia.com/wiki/Template:Bigsitelinks http://wildedibleplants.wikia.com/wiki/Taraxacum_officinale

I'm trying to write a simple template which will create a table. Each variable is to contain only the URL to a link which is to go into the table. All the other formatting is to be done by the template (putting the link in square brackets and giving it a name). I can get all that to work so long as all the variables are filled in at on the wiki using the template. What I haven't been able to do, and I've been trying to use parser functions to do it, is to have empty cells in the table (instead of or whatever) when a variable is empty. I tried using the #if function and I think I used it correctly, but it doesn't seem to work with variables.

The reason I'm doing this instead of just doing it manually is that there will potentially be many links per page when this wiki I started gets going (*crosses fingers*) and I want to start organizing the common, big sites now, keeping them in the same order.

There's probably a simple answer to this but I haven't found it in the help pages I've read...

Thanks for your time

—Khono 00:33, 22 June 2009 (UTC)


 * Still looking for an answer. Khono 03:17, 8 July 2009 (UTC)


 * You can specify a default value for when a parameter is not defined:   displays "foo" when the parameter is not defined in the template.  So you probably need   , to give an empty default.  Is this what you're looking for? Happy ‑ melon 10:46, 8 July 2009 (UTC)


 * While that gets rid of the it's not appropriate for what I'm trying to do.  I'm trying to make the template accept only the URL, since everything else is style and we may (and likely will 'cause it looks horrible now) change what we do with that URL.  I currently put square brackets around it to make it a link, so leaving it blank results in: "[ Wikipedia]" instead of the goal of just: "Wikipedia".  So I'd want to be able to leave out all the supporting code around that parameter if the parameter's empty.  Thanks anyway, though :)  Khono 13:34, 9 July 2009 (UTC)


 * You could also use this and make your templates a living nightmare :) | #ifeq usage
 * something to look at as far as usage, i have about 20 templates that have required fields which are shown in the black box below but the optional fields are invisible but are still in the template format when someone uses them, i even went so far as to nest conditional fields for the template even if someone uses the field, it wont show unless there is another field that is used first. This is to show you how complex you can build a template and this is a light complexity compared to what i have seen on other wikis.
 * You can go here and view the source to get a better understanding of this templates customizable attributes
 * If you have any questions, just send me a email through my account Goldbishop 12:54, 8 July 2009 (UTC)


 * Hah, thank you very much, Goldbishop! It's now working as I intended and without too much pain!  I'm fine with using these parser functions.  I didn't have much luck using them before and I didn't find any useful examples of the #if functions until you showed me yours.  I looked at the code for the only other template I could think of that showed different content based on what was entered and it's RIDICULOUSLY!! complex.


 * I do have some questions, though. The link you gave to the documentation of #ifeq shows different.. umm, code structure than you used in your example.  In your example you wrote:
 * Which, if I understand correctly, can be described as:
 * The documentation you linked to doesn't mention an else function and it uses a | before the first value instead of a :. While it seems I understand since I got my template to work (see the links I posted in the original question if you care to see), I am curious as to why the discrepancy.  Again, thanks so much, you made my day :)  Khono 14:19, 9 July 2009 (UTC)
 * The documentation you linked to doesn't mention an else function and it uses a | before the first value instead of a :. While it seems I understand since I got my template to work (see the links I posted in the original question if you care to see), I am curious as to why the discrepancy.  Again, thanks so much, you made my day :)  Khono 14:19, 9 July 2009 (UTC)
 * The documentation you linked to doesn't mention an else function and it uses a | before the first value instead of a :. While it seems I understand since I got my template to work (see the links I posted in the original question if you care to see), I am curious as to why the discrepancy.  Again, thanks so much, you made my day :)  Khono 14:19, 9 July 2009 (UTC)


 * The #ifeq: parser function is from the ParserFunctions extension. Happy ‑ melon 14:31, 9 July 2009 (UTC)


 * Cool, thanks again, Happy-melon. Khono 15:27, 9 July 2009 (UTC)

Displaying the true (raw) content of a parameter inside a template
I want to pass wiki code in a parameter to a template.
 * MediaWiki version: 1.14.0
 * PHP version: 5.2.9-1 (apache2handler)
 * MySQL version: 4.1.22-community-nt
 * URL:

The template has to display the parameter's wiki code in two ways:


 * 1) As code (raw text as it is given by the parameter)
 * 2) As normal wiki output (the normal output that comes from the code in the parameter)

Normal wiki output is easy: I simply write inside the template: The code inside this parameter is automatically converted to wiki output.

But I don't know how to display the parameter's "raw" value.

For example, I call the following template:

If I use

in the template, the following output is done:


 * line 1
 * line 2

Now, how to I get the template to show the "raw value" of the parameter:


 * line 1
 * line 2

If I use this:

I only get:

If i use:

I only get:


 * line 1
 * line 2

with Courier New font.

Thanks

Frank

—213.221.89.78 14:20, 22 June 2009 (UTC)

Response
Hey Frank, Have you made a Template page of what your trying to do? The way to do what you are doing is to first create a page Template:Something.

On this page type in your format as such

Then when you are trying to use it this is your wiki format: Then it will spit out this: Let me know if this works for you, i did this on the fly and havent done templates for my wiki in a while (got them done first and then left them alone). Goldbishop 15:35, 3 July 2009 (UTC)

(Resolved) Custom skin does not work after upgrade

 * MediaWiki version: 1.15.0
 * PHP version: 5.2.8
 * MySQL version: 5.0.51a-log
 * URL: http://plee-the-bear.sf.net/wiki

Hi,

I have upgraded our wiki from version 1.13 to 1.15.0 and, then, our custom skin stopped working (the pages were displayed with no css at all). The skin was made of files wiki/skins/Plee.php, wiki/skins/Plee.deps.php and the directory wiki/skins/plee. Everything was copied from the monobook skin and the colors were modified. I finally made things working by copying the file wiki/skins/plee/main.css in the MediaWiki:Plee.css page. Nevertheless, I still can't make external links working properly. The picture external.png never shows with the links (but there is an empty place for it).

Second point, the source code displayed with the SyntaxHighlight_Geshi extension has different margins if I use line numbering (see ).

Regards,

—Julien Jorge 16:58, 26 June 2009 (UTC)


 * Resolved by copying the new code of the MonoBook skin. —Julien Jorge 12:27, 30 June 2009 (UTC)

Template's CSS styles not rendering all of a sudden?

 * MediaWiki: 1.15.0
 * PHP: 5.2.9
 * MySQL: 5.0.81

Everything was working fine, I was editing some article categories and uploading some images, and when I went to randomly test out the $wgReadOnly variable, it didn't seem to work, and instead all of my templates' CSS styling codes stopped rendering. The site skin worked, the images were good, just simple stuff like table background color showing as  instead of modifying the text / background. Why is this? I turned the $wgReadOnly off and still nothing, reconfigured my LocalSettings.php back to default, nothing, cleared my cache, nothing. Although the table borders are fine...

In a normal wiki, it would show this:

But instead it shows this:

Can anyone help? 99.252.59.196 02:31, 28 June 2009 (UTC)


 * Alright, I found that if you removed the second pipe from the "rowspan" line, it rendered. However, it used to render with or without it. Is that going to be a problem for future templates of that kind? 99.252.59.196 02:47, 28 June 2009 (UTC)

Help with templates and basically everything

 * MediaWiki version: 1.15.0
 * PHP version: 2.11.9.5
 * MySQL version: 4.1.22
 * URL: www.mysite.com

Can anyone lay out a simple explanation of how I put info boxes and things on my wiki? The tutorials on here really make no sense and there is no good one out there.

Basically, I want to make it have everything wikipedia has on their website.


 * RTFM. I'm afraid no one is going to help you with a 'problem' like this, because you haven't demonstrated any effort to help yourself.  There are hundreds of pages of tutorials, help guides, Q&As, FAQs, template documentation notes, and other useful information, available on this website, enwiki, and (just a Google search away) on dozens of other sites.  "everything wikipedia has" has been built up over eight years by a team of thousands of editors.  Learning how it all works is a gradual process, not one that you can expect to master instantly.  If you have specific queries about particular features or markup, we're always here to help.  But your question is essentially "how do I write a wiki", the answer for which comprises this entire site. Happy ‑ melon 15:30, 3 July 2009 (UTC)

—Tab01 04:45, 3 July 2009 (UTC)


 * Sorry, I should have clarified my question. Obviously I can't make mine look exactly like Wikpedia. I simply wanted the infoboxes that way I can create my own. I've went through and edited the LocalSettings.php to include the parser function and added it to the extension folder. There is no good template out there on what to actually edit or include into your site to allow it to read infoboxes. At least I have found a single good tutorial on how to do it.


 * Here are a bunch of examples of templates. I looked at a few and they seem pretty simple yet there are various types with different appearances.  Perhaps these will help you out.  If you use these examples along with the tutorials for writing Templates, I believe you will learn how to make your own.  Khono 09:09, 10 July 2009 (UTC)

Sidebar and JS

 * MediaWiki version: 1.15
 * PHP version: 5
 * MySQL version: 5
 * URL: sl3d.woodassoc.us

I am trying to develop my sidebar through the Common.js page. I have added 2 sections programmatically through the javascript page and was wondering, if it was possible to make the sidebar sections conditional. By this i want to have something like this.

If thats not possible in the MediaWiki:Sidebar page then can i do that in the Common.js page. Here is my current code segment that deals with the sidebar. As i am not sure how the wiki stores the authentication and the security group the user is contained in, if it is a session state variable, where would i go to find out what the session variable is? So i can put the javascript conditional statement in the function CustomizeModificationsOfSidebar? I am relatively confortable with javascript but again not sure of the source of the wiki engine so just need someone to point me in the direction as all the searches i have done have ended up at Extensions or Explaining user rights and not necessarily how to pull the user rights during a page refresh(whether a hard refresh or click through refresh)

—Goldbishop 15:18, 3 July 2009 (UTC)


 * Each page loaded includes a number of useful JS variables, one of which is wgUserGroups, an array of strings of the groups the user is in. The MediaWiki software parses the user's login credentials (which are stored in a cookie) and sets appropriate values for this variable; all you have to do is use code like


 * Is that what you're looking for?
 * Also, there is the predefined function:


 * Which can be used to make adding links to the sidebar much easier. Hope this helps. Happy ‑ melon 15:34, 3 July 2009 (UTC)


 * So i can just put the if statement in the Common.js area of code to evaluate what usergroup the login user is in as you stated above and if that usergroup is present then it will parse out the section of code i put in the conditional section?

Goldbishop 15:46, 3 July 2009 (UTC)
 * Well ended up pasting this in the Common.js after doing some testing and im not quite sure why it is working but should be interesting to try and figure out why.


 * Not quite sure why puting NOT in front of the comparison works cause it would seem to me to be anti what i am trying to do.
 * Goldbishop 18:28, 3 July 2009 (UTC)