Community noticeboard

Archives:
 * Archive 1 (23 July 2017 - 25 November 2017)
 * Archive 2 (1 December 2017 - )

Template with optional parameter
Hello, i'm creating a template and i want to make one line in table optional - when there's no data it doesn't shown. I used example from mediawiki:


 * label1=Text


 * data1=

It works correctly, but when i define a "|text" in article label and data are shown to. Like <<|text=abcde>> and it shows like <> What's wrong and how to show clear "text" without showing label and data? Thanks.
 * Forcing archive. &mdash; revi  10:26, 3 December 2017 (UTC)

General wiki questions
Given the nature of my wiki - it's a used car review for cars in the U.S., Australia, Canada, New Zealand - how do I keep within copyright law on image usage for stock photos, and would a site like this be exempt from the inactivity policy?

I want the wiki to succeed, and be of use to someone on here.

Any advice is welcomed. --Walkden1986 (talk) 20:41, 23 November 2017 (UTC)


 * Also, I'm looking to import the CSS and automobile infoboxes from en.wikipedia.org but that requires Lua and I'm not quite sure how to get it working (i'm using Wikipedia templates, for simplicity's sake). --Walkden1986 (talk) 20:43, 23 November 2017 (UTC)
 * Hi, the images you upload should have been released under a free license if you want to use them; wikis are subject under the Dormancy Policy, if you want your wiki to be exempt from this rule, you must make an request here; with respect to the templates, Void will be able to help you better with that. Regards. —Alvaro Molina (✉  - ✔ ) 20:49, 23 November 2017 (UTC)

Change of credentials
Hi community, I'm coming up with another challenge - please bear with me! We need to change the email account through which we registered the Wiki. Couldn't find anything on the FAQ. Any suggestions?
 * It's right in Preferences, first page, Email preferences, click under Change or remove email address. Miraheze will send an email to the old address with a link you click to agree to the change.   11:39 27-Nov-2017

Spike, you're a blessing, and I am fairly retarded. All went smoothly, thanks for that! We cannot change the admin name on the top right corner though, correct?
 * If by "admin name" you mean your username, you can request to change that on Stewards' noticeboard. Please also don't forget to sign your posts using ~ . Reception123 (talk) ('C' ) 05:53, 28 November 2017 (UTC)
 * @Spike: will do, thanks! Though I am sure I'll do something wrong and I'll just look more retarded. ~Beba

Me too! (1) That last that you are responding to wasn't me! (2) That's why we sign posts, which you tried to do, but putting  around it neatly defeats the replacement of the four-tildes with your name, forcing you to type it in manually. (3) The point of indenting is to set your post off from your neighbor's, not to imitate him, so use a different number of : characters (typically, one more). Cheers! 12:32 PS--Oh, I see you got it right on the Stewards' noticeboard. 12:34 28-Nov-2017

Lag time on changes to new wikis
I was just wondering if there are lag times on changes made to new wikis. I have just started a new wiki (created two days ago) but the categories aren't populating and changes made to templates are not showing on the pages where the templates are transcluded. I have to manually purge the cache (not just refresh) to see the changes. Cheers. 17:36, 28 November 2017 (UTC)
 * The categories are populated by a script which runs jobs. Normally, since we now run this jobrunner on two servers, there should not be any issues with it. Please feel free to open a Phabricator task if you see this issue happening frequently. Reception123 (talk) ('C' ) 18:22, 28 November 2017 (UTC)
 * Ok, if it's still doing it in a couple more days I'll put a phabricator task in. As for the pages not showing the most up-to-date revisions, is this connected to the categories issue? This happened a couple of times on my other wiki but I can't remember if it was something that eventually sorted itself out or not. 19:18, 28 November 2017 (UTC)
 * Ehh, JobQueue has been critical for the past ~20 hours. Most likely your cause. -- Void  Whispers 20:18, 28 November 2017 (UTC)
 * I noticed that the pages I created a few hours ago are showing up in the categories but none of the pages created before then are. I copied 291 glossary entries from my other wiki to the new wiki and all of them should show up in Category:Glossary as they all have category links but only the pages that I create now seem to show up. Strange. 01:10, 30 November 2017 (UTC)
 * Since the pages were imported, they all have to be edited before they are categorized. You don't even have to change any content (just click edit, then immediately save). -- Void  Whispers 01:17, 30 November 2017 (UTC)
 * Oh, ok, thanks. That's going to take a lot of time to complete. That's quite a flaw in their thinking, unless there is a reason to it. 01:51, 30 November 2017 (UTC)
 * Hardly! it's only 291 edits for you to do! (Sarcasm!)  It might not be a flaw in thinking; having processing occur at one point in a page's creation, ignoring that pages are created in other ways, may merely be an oversight.  Void, I wonder about your assertion:  Usually, if I save a page without making any changes, it doesn't even result in a recorded edit in the change history, and thus might not trigger processing in the background.   04:21 30-Nov-2017
 * I prefer it when blank saves are not recorded in the history as I don't see the point of recording no change. I've done blank saves before on my other wiki but I didn't realise you had to do the same thing for imported pages to make them show up in categories. They certainly trigger processing because the few blanks I have done already are making those pages appear in the glossary category. Bored of that job already and I've only done 25 pages so far. Could really do with a bot for this type of work! 11:55, 30 November 2017 (UTC)

Anyone know how to use the #if parser function?
I am asking for a little help in trying to understand parser functions that allow for missing parameters to hide elements in an infobox. I have used inboxes on thelonsdalebattalion wiki, imported from Wikipedia. To be quite frank, I find them a total headache and unnecessarily over-complicated, with far too many other template and modules to make them work properly. I have managed to get them mostly working, with the exception of coordinates, which is just a nightmare to sort out. So, I'm having a rest from those inboxes and I'm going to go back to what I'm more comfortable with and create my own basic infoboxes. The problems is I don't know how parser functions work. What I would like (if possible) is some example wikitext that shows the #if parser function where the desired output is if a parameter is left empty, it won't be displayed. I will come up with a basic infobox and then I am happy for someone with parser function knowledge to have a re-write of the template. If I can see the wikitext I will be able to replicate it for future infoboxes that doesn't involve me wasting time trying to get all elements of Wikipedia infoboxes to work. As always, thanks in advance. 01:32, 1 December 2017 (UTC)
 * Basic premise is that  displays anything nested with the word "present" if the param is included anywhere. Otherwise, "absent" is displayed. If I was to call that template, but only do something like , the result is "absent". If I call  , the result is "present". Also, it's very important that you setup "param" using  , as otherwise (such as using  ), you will get "present" even when calling  . --  Void  Whispers 01:45, 1 December 2017 (UTC)
 * Thanks for speedy response. I kind of get it but I need to see it in the template, which I have just created here: Template:Infobox book A work in progress. Can you access the thegreatwar wiki, it is set to private at the moment? I am happy for you to tinker with it if necessary. Also, don't laugh too much at my basic template-making skills. If you spot some errors please let me know. I'll pick up any responses after I've had some sleep! Cheers. 02:16, 1 December 2017 (UTC)
 * It might not be necessary to use  at all.  The code   stands for the first parameter, and   means patch in "foo" if the first parameter is omitted.  All you might have to do is provide nothing between the vertical bar and the closing curly braces.  This alone ensures that "if a parameter is left empty, it won't be displayed."
 * One problem with these is that you are editing the template, but can only see it work once invoked by a different page, and there are several places for your edits not to get passed along, including Miraheze's cache (which you can purge) and your browser's cache (ditto).  03:33 1-Dec-2017
 * I must be doing something wrong because I can't get it to work. Currently I have the following for the author parameter:
 * ← this is still visible when below parameter is empty ← when empty nothing shows here but I need both this (the data) and the above (label) to disappear when the data field is empty.
 * On the transcluded page where I am using the template: if I use  and I leave it blank after the = sign, then yes, that element is empty but I want the whole row to disappear (data and label) and it isn't doing that, so what am I missing?  13:29, 1 December 2017 (UTC)

(Reset indent) on my phone so forgive fuckups but try something like    both instances of  must have the same parameter name and must both include the pipe character. If the param is not empty it will display nothing, if the parameter is anything it will add the template and the parameter. -- Cheers, NDKilla ( Talk • Contribs ) 14:02, 1 December 2017 (UTC)
 * Not wanting to sound stupid (maybe too late for that) but what and how much  am I putting in this tag? I've just added the template to public testwiki if anyone wants to have a go at making it work.  14:42, 1 December 2017 (UTC)
 * Slow down and think carefully; the  must surround everything that you might want to disappear; that is, the entire table entry, from one   line up to but not including the next one.  And I see a parameter "editor" versus "editors" versus "s".   15:08 1-Dec-2017
 * This is why I need to see how it is supposed to look by someone who knows what they are doing rather than trying to figure it out badly for myself. The bit of editor text is straight from wikipedia, just wanted to see what it did but apparently nothing. And now user Artix Kreiger has protected the template page. I can't even edit it now! 15:24, 1 December 2017 (UTC)
 * I couldn't either, and that's why I didn't. I'll play with it at The Mirror.  God help you if you try to follow a recipe in the kitchen!   15:39 1-Dec-2017
 * I have jumped in and the first complication is that we are using a template to generate code to reside inside a template. This means there is confusion between the vertical bars that separate parameters of   and the vertical bars we are trying to generate:  They need to be escaped, and I don't know if I'm doing it right.   15:48 1-Dec-2017


 * All right, look at what I've done to the "editor" entry at themirror.miraheze.org/wiki/Template:Infobox_book and apply comparable changes throughout. Please do not try to write code to pluralize "editor"; instead, create another parallel entry, "editors", if there are more than one and you really want the "s" on the end.  NDKilla did not solve the hard problem by finessing "code for template" because when that code wants to output a vertical bar, we have to code it as  .   15:55 1-Dec-2017
 * I think I'm understanding what you've done. I've just tried in on Public Testwiki (that user has kindly allowed me to edit my own template!) and it works nicely. I just need to apply that to all the other parameters. Thanks for that, appreciate your time and help in sorting it out. I wouldn't have figured that out on my own. Thanks for everyone's suggestions. 16:41, 1 December 2017 (UTC)
 * FYI, if you do it like this, the parameters will not show by default. -- Void  Whispers 21:19, 1 December 2017 (UTC)
 * I don't understand this (but I didn't understand your comment above, either). If the caller does not provide "param", then our use of   removes the entire line of the graphic.  You added a vertical bar that says to use a null string in the parameter's absence; but the parameter's absence is already covered.  Is there some tri-state logic here?   22:26 1-Dec-2017
 * That would only be true if the caller still does something like param but never passes on a value. If param is never provided it defaults to being present as unless you define a default value (in this case null) in the template. In other words, if we have a template that is entirely , and we call  , it will display  . This value still counts as present in the  parser function. --  Void  Whispers 23:26, 1 December 2017 (UTC)
 * So Borderman has a stylistic choice between omitting the row of the graphic, or having the row be included but have a blank on the right side. "If [it] is never provided it defaults to being present" seems perverse, as provided and present seem virtually synonymous; but yes, there are indeed three possibilities here.  Thanks.   00:25 2-Dec-2017


 * Trump concedes the obvious  03:46 8-Dec-2017