User talk:OWL
From Wikipedia, the free encyclopedia
Contents |
[edit] Welcome!
Hello, OWL, and welcome to Wikipedia! Thank you for your contributions. I hope you like the place and decide to stay. Here are some pages that you might find helpful:
- The five pillars of Wikipedia
- How to edit a page
- Help pages
- Tutorial
- How to write a great article
- Manual of Style
I hope you enjoy editing here and being a Wikipedian! Please sign your name on talk pages using four tildes (~~~~); this will automatically produce your name and the date. If you need help, check out Wikipedia:Questions, ask me on my talk page, or place {{helpme}}
on your talk page and someone will show up shortly to answer your questions. Again, welcome! - Darwinek 18:02, 8 October 2006 (UTC)
[edit] Helpme Request
I have tried twice today (here and here) to get a question answered at the Help Desk and no one has replied.
Is there an answer? Is there a problem with my question that there should be no reply??
--OWL 23:58, 4 November 2006 (UTC)
- This question is fairly technical and is beyond the scope of questions the Help Desk was designed for, which explains the lack of answer. This operation, while possible one way is not as simple in the other direction. The expansion of the number is based on the user locale set in preferences. For example if you have your locale set to french {{formatnum:123456789}} will display as 123 456 789 or 123.456.789, while if you are set to english it will be 123,456,789. The reverse, having a number in any of a large set of formats and removing those formats is more complex. For detailed information see Help:Magic_words. For more discussion on this I would suggest Mediawiki:Help or the Mediawiki mailing list - cohesion 00:15, 5 November 2006 (UTC)
- I don't understand why you need the reverse of {{formatnum:}}.
- "I need to convert numeric inputs which might or might not include commas into a form {{ #expr: }} can digest." - I just ran a quick test and {{ #expr: }} does support formatted numbers. Or is that not what you meant? - Dinnerbone (Talk/Cont) 00:22, 5 November 2006 (UTC)
Thanks, folks.
--OWL 01:42, 5 November 2006 (UTC)
[edit] Reply to Dinnerbone
I am a new Wikipedian, and for a learning exercise I am building a template along the lines of Template:Infobox City
. For some parameters, I want to screen out invalid (non-numeric) input which might be entered in the "Empty Syntax" area.
For example, I want:
{{ #ifexpr: {{{pop_density_per_sq_mi|}}} | {{!}}-class="mergedrow" ! Density {{!}} {{ formatnum: {{ #expr: {{{pop_density_per_sq_mi}}} round 0 }} }}/sq mi ({{ formatnum: {{ #expr: {{{pop_density_per_sq_mi}}}*.386 round 0 }} }}/km²) }}
to screen out non-numeric input because it not only echos the value in square miles, but also calculates and returns the value in square kilometers
pop_density_per_sq_mi = 4635.5
works fine, but
pop_density_per_sq_mi = 4,635.5
returns
Expression error: unrecognised punctuation character ","
I was hoping there was a template or something that worked like the ":R" specifier illustrated in the magic word
{{NUMBEROFARTICLES}} 2,407,636
{{NUMBEROFARTICLES:R}} 2407636
I think I was in error in my earlier question. I now believe the function that is choking on commas is {{ #ifexpr: }}
, not {{ #expr: }}
.
If, as you say, {{ #expr: }}
can digest numbers like "4,635.5", perhaps I should try
{{ #if: {{ #expr: {{{pop_density_per_sq_mi|}}} }} | {{!}}-class="mergedrow" ! Density {{!}} {{ formatnum: {{ #expr: {{{pop_density_per_sq_mi}}} round 0 }} }}/sq mi ({{ formatnum: {{ #expr: {{{pop_density_per_sq_mi}}}*.386 round 0 }} }}/km²) }}
--OWL 01:45, 5 November 2006 (UTC)
- Just ran another test to make sure my previous comment was correct - I'm not sure what I did when I wrote my last comment, but {{ #expr: }} doesn't support commas.
- If I understand you right (Which I most likely don't, it's late and I'm tired ;P), you can't undo a formatted number (ie, 1,234 to 1234) without alot of work and time, but there is a way to test for formatted numbers. I just threw this together, it will test a number to see if it is formatted or not:
- {{#ifeq:{{#expr:{{{number}}}}}|{{{number}}}|Not formatted|Formatted}}
- (I made a user subpage to show this in action. Subpage located here)
- It's better than having an error message each time, but it won't turn formatted numbers into plain numbers. - Dinnerbone (Talk/Cont) 02:27, 5 November 2006 (UTC)
[edit] TfD nomination of Template:Bsm
Template:Bsm has been nominated for deletion. You are invited to comment on the discussion at the template's entry on the Templates for Deletion page. Thank you.
Also, similarly for {{esm}}.
You might notice that this affects templates you are working on.[1][2][3][4] — Kevinkor2 17:39, 20 March 2007 (UTC)
[edit] Orphaned non-free image (Image:Seal of Town of Waterford.gif)
Thanks for uploading Image:Seal of Town of Waterford.gif. The image description page currently specifies that the image is non-free and may only be used on Wikipedia under a claim of fair use. However, the image is currently orphaned, meaning that it is not used in any articles on Wikipedia. If the image was previously in an article, please go to the article and see why it was removed. You may add it back if you think that that will be useful. However, please note that images for which a replacement could be created are not acceptable for use on Wikipedia (see our policy for non-free media).
If you have uploaded other unlicensed media, please check whether they're used in any articles or not. You can find a list of 'image' pages you have edited by clicking on the "my contributions" link (it is located at the very top of any Wikipedia page when you are logged in), and then selecting "Image" from the dropdown box. Note that any non-free images not used in any articles will be deleted after seven days, as described on criteria for speedy deletion. Thank you. BetacommandBot 02:58, 14 May 2007 (UTC)