User talk:Darklama
Add topic
I believe discussions should continue where they started.
|
Add media button discussion
[edit source]I have pinged the discussion of the buttons we talked about at Meta. Juandev (discuss • contribs) 08:19, 25 April 2014 (UTC)
- Maybe it will get picked up again during the next Google Summer of Code. -- darklama 12:58, 25 April 2014 (UTC)
Question about importing
[edit source]Hi, is it possible to import from a non-english wiki? I actually see few reasons for it, but I'm wondering if it could or should be done. You can see Wikiversity:Colloquium#Special:ListUsers/transwiki. Thank you for your time. - Sidelight12 Talk 09:55, 27 April 2014 (UTC)
How to hide value description if empty and set to cat?
[edit source]Hi,
could you help me with understanding parser functions. Firstly how to hide value description if the value is empty in the template? E.g.: Ill have:
{{Template |Coordinates= 52345452453 |Country= |Region= }}
So I am willing to get:
Coordinates: 52345452453
And what about, if I want to set the page to category according the value. I see, you've been doing that in BCP. The above template may add to the page [[Category:Pages with coordinates]], [[Category:Pages without countries]] and [[Category:Pages without region]].
Juandev (discuss • contribs) 20:36, 27 April 2014 (UTC)
- As we were talking about
#if
function, I have created a test template and page. I see, that I cant use the same function for a string comparison. So maybe#ifeq:
to support both file:name.jpg and name.jpg values. So let me think loud: Now I have: {{#if:{{{Image}}}|[[file:{{{Image}}}|thumb|{{{Image description}}}]]|<div style="float: right;"><div style="border: 2px solid blue; padding: 4px; text-align: center;">[[commons:Special:UploadWizard|UPLOAD IMAGE]]</div><br /><div style="font-size: x-small; margin-top: -15px;">Coordinates with image<br /> help us to identify the location</div></div> [[Category:FRD/Locations without an image]]}}
- Its there, because I add all locations without image to a technical category. It also encourage to add an image. So If I would like to have two options for one value possible I have to create one more function for this value, which would be something like:
{{#ifeq: File:{{{Image}}}|{{{Image}}}|[[{{{Image}}}|thumb|{{{Image description}}}]]| [[file:{{{Image}}}|thumb|{{{Image description}}}]] }}
- Is that code OK? Would it test weather the value Image contain also "File:"?
- And how to pair it to the previous one? I guess that maybe
#if
function should be included into#ifeq
?--Juandev (discuss • contribs) 10:00, 28 April 2014 (UTC)
The Image value can never equal the Image value with File prepended. {{#if:{{{Image|}}}|{{#switch:{{NAMESPACE:{{{Image}}}}}|File|Image=[[{{{Image}}}|thumb|{{{Image description}}}]]|=[[File:{{{Image}}}|thumb|{{{Image description}}}]]|<!-- wrong namespace -->}}|<div style="float:right;"><div style="border:2px solid blue; padding:4px; text-align:center;">[[commons:Special:UploadWizard|UPLOAD IMAGE]]</div><br /><div style="font-size:x-small; margin-top:-15px;">Coordinates with image<br /> help us to identify the location</div></div> [[Category:FRD/Locations without an image]]}}
NAMESPACE is used to test whether the Image value passed is in the file or image namespace, was passed without any namespace, or referring to something in the wrong namespace. -- darklama 11:47, 28 April 2014 (UTC)
- So the function, should always compare a value? Cant compare a string of wikitext?--Juandev (discuss • contribs) 13:32, 28 April 2014 (UTC)
- And if Ill dig in your script, I see that you include a function
#switch:
and leave it on the position of "value if test string is not empty" regarding PSHelp. What I don't understand, what{{{Image|}}}
stands for. And how to separate the #switch: function. Like this?
{{#switch:{{NAMESPACE:{{{Image}}}}} |File |Image=[[{{{Image}}}|thumb|{{{Image description}}}]] |=[[File:{{{Image}}}|thumb|{{{Image description}}}]] |<!-- wrong namespace --> }}
--Juandev (discuss • contribs) 13:58, 28 April 2014 (UTC)
#switch
can be simpler to understand than #ifeq
when comparing one thing to many things. Using ifeq in place of switch the above example looks like:
{{#ifeq: {{NAMESPACE:{{{Image}}}}} | File | [[{{{Image}}}|thumb|{{{Image description}}}]] | {{#ifeq: {{NAMESPACE:{{{Image}}}}} | Image | [[{{{Image}}}|thumb|{{{Image description}}}]] | {{#ifeq: {{NAMESPACE:{{{Image}}}}} | | [[File:{{{Image}}}|thumb|{{{Image description}}}]] | <!-- wrong namespace --> }} }} }}
A value can be a string or wikitext within reason, some complex comparisons can require a deeper understanding of mediawiki's parser to figure out how to get the comparison to work.
{{{Image}}} is a placeholder named "Image" that is to be filled when the template is used on a page. {{template|Image=Coffee.jpg}}
replaces Image in the above switch with "Coffee.jpg" like so:
{{#switch:{{NAMESPACE:Coffee.jpg}} |File |Image=[[Coffee.jpg|thumb|{{{Image description}}}]] |=[[File:Coffee.jpg|thumb|{{{Image description}}}]] |<!-- wrong namespace --> }}
which then becomes:
{{#switch: |File |Image=[[Coffee.jpg|thumb|{{{Image description}}}]] |=[[File:Coffee.jpg|thumb|{{{Image description}}}]] |<!-- wrong namespace --> }}
because "Coffee" is in the main space which has no name. Next the switch tests the empty argument against the other arguments. The empty equal comparison matches the empty first argument, so the wikitext on the other side of the equal sign is what the switch function returns, which is [[File:Coffee.jpg|thumb|{{{Image description}}}]]
. What is seen in place of the template on screen is a coffee image. -- darklama 15:21, 28 April 2014 (UTC)
- This is too much for me. So I will believe you it works:-). So thank you for the explanation.--Juandev (discuss • contribs) 20:12, 28 April 2014 (UTC)
Easier way then Parser function
[edit source]I have discovered PA function switch used to switch between multiple values available:
{{#switch:{{{Manifestation (M – mushrooms, DGG – dark green grass or NZ – necrotic zone)}}} | M = (mushrooms) <includeonly>[[Category:FRD/Manifestation/Mushrooms]]</includeonly> | m = (mushrooms) <includeonly>[[Category:FRD/Manifestation/Mushrooms]]</includeonly> | DGG = (dark green grass) <includeonly>[[Category:FRD/Manifestation/Dark green grass]]</includeonly> | dgg = (dark green grass) <includeonly>[[Category:FRD/Manifestation/Dark green grass]]</includeonly> | NZ = (necrotic zone) <includeonly>[[Category:FRD/Manifestation/Necrotic zone]]</includeonly> | nz = (necrotic zone) <includeonly>[[Category:FRD/Manifestation/Necrotic zone]]</includeonly> }}
than I find out, that maybe it could be done by if function and categories, liek this:
{{#if:{{{Manifestation (M – mushrooms, DGG – dark green grass or NZ – necrotic zone)}}} |*Manifestation (M – mushrooms, DGG – dark green grass or NZ – necrotic zone): [[Category:FRD/Manifestation/{{{Manifestation (M – mushrooms, DGG – dark green grass or NZ – necrotic zone)}}}]] {{{Manifestation (M – mushrooms, DGG – dark green grass or NZ – necrotic zone)}}} |[[Category:FRD/Manifestation not set]] }}
I only miss full cat name, but its not so important. Is that right?--Juandev (discuss • contribs) 19:21, 30 April 2014 (UTC)
request to change Mediawiki:common.js to include MOOC like functionality
[edit source]Dear darklama I have been sent to your page by User:Dave_Braunschweig after I left him the following request User_talk:Dave_Braunschweig#Appending_Mediwiki:commons.js_for_globally_available_MOOC_user_frontend. I would kindly ask you to read that request and work with me on our goal of creating a MOOC on Wikiversity by not only creating such a content but extending the frontend of mediawiki with a bunch of lua scripts, java script and a little css to create a much easier user experience. Dave is familiar with our project. Last year during teaching we lost many students on pages like this one (Topic:Web_Science/Part1:_Foundations_of_the_web/Internet_Architecture/Summary) since they could not adapt to the habits of mediawiki users which made us realize that something like our scripts would be necessary. As said in the initial post on dave's page feel free to request more information or ask questions about the project. I tried to keep the request short here and at dave's place. Thank you very much. --Renepick (discuss • contribs) 13:07, 21 August 2014 (UTC)
your title blacklist entry
[edit source]Back in 2011, you added my user and user talk spaces, and your own, to the Title blacklist, to limit page creation there to autoconfirmed users. This was apparently based on a single disruptive edit to my user space. I requested it be removed as to mine, and my opinion is that it should not have been added to yours, that this was technically a COI action. However, not a big deal. Mine was just removed, and I said I'd ping you. So ... ping! --Abd (discuss • contribs) 04:41, 4 August 2015 (UTC)
GUI on c++
[edit source]I believe you're an expert on c++ programming language and I believe you also know many operating systems and applications were built using this language. I am a learner, a beginner and am 15 years old from Nigeria. From what I have learnt so far via sololearn and CPP droid. It is not that good at GUI. Please provide me with an example even if it is a vector drawing code. Edidiongudoh (discuss • contribs) 13:44, 12 October 2016 (UTC)
Your administrator status on the Wikiversity
[edit source]Hello. A policy regarding the removal of "advanced rights" (administrator, bureaucrat, etc.) was adopted by community consensus in 2013. According to this policy, the stewards are reviewing activity on wikis with no inactivity policy.
You meet the inactivity criteria (no edits and no log actions for 2 years) on the wiki listed above. Since that wiki does not have its own rights review process, the global one applies.
If you want to keep your rights, you should inform the community of the wiki about the fact that the stewards have sent you this information about your inactivity. If the community has a discussion about it and then wants you to keep your rights, please contact the stewards at m:Stewards' noticeboard, and link to the discussion of the local community, where they express their wish to continue to maintain the rights.
If you wish to resign your rights, you can reply here or request removal of your rights on Meta.
If there is no response at all after approximately one month, stewards will proceed to remove your administrator and/or bureaucrat rights. In ambiguous cases, stewards will evaluate the responses and will refer a decision back to the local community for their comment and review. If you have any questions, please contact the stewards. Matiia (discuss • contribs) 04:58, 16 March 2017 (UTC)
- Removed. Matiia (discuss • contribs) 15:12, 16 April 2017 (UTC)