Difference between revisions of "Template talk:Citelink"

From PC-BSD Wiki
Jump to: navigation, search
(problem with unlinked text for (defined) shortcuts)
(l10n ccby3: new section)
Line 124: Line 124:
--[[User:Tigersharke|Tigersharke]] 19:00, 13 August 2012 (PDT)
--[[User:Tigersharke|Tigersharke]] 19:00, 13 August 2012 (PDT)
== l10n ccby3 ==
For [https://creativecommons.org/licenses/ licenses of CC] are a lot of languages are available. Can we make it possible, that the link of <code>ccby3</code> (as a [[Template:Citelink#Special External (abbreviation)|Special External (abbreviation)]]) is linking to the language of the article?
Probably I do not have to say, that there are is stuff, like <code><nowiki>{{putLang}}</nowiki></code> and so on.
--[[User:Vater|Rg]] ([[User talk:Vater|talk]]) 11:18, 1 January 2014 (PST)

Revision as of 12:18, 1 January 2014


shortcut for Wikipedia


Maybe wp is the better shortcut for Wikipedia (than wikipedia)?

-- Rg 08:44, 1 August 2012 (PDT)

I can add it as an additional option. The reason for using 'wikipedia' is that it is a standard interwiki identifier.

--Tigersharke 18:57, 1 August 2012 (PDT)


-- Rg 08:09, 3 August 2012 (PDT)

shortcut for the FreeBSD Handbook


I am wondering, that there are no shortcut for the books, especially the ("holy") handbook.
Shouldn't we have these shortcuts like those?

(Tigersharke, by the way, thanks for your great (and "speedy") work to create such templates.)

--Rg 07:08, 12 August 2012 (PDT)

This can be done, BUT, what would be the shortcut word?? I suppose we could assume fbsdph - Porter's Handbook, fbsdh - Handbook, fbsddh - Developer's Handbook, how are those?

--Tigersharke 14:37, 12 August 2012 (PDT)

Thanks! :-)

I am "simple": I am nominating hb. :-) Are there any shorter shortcuts out there? :-D

--Rg 17:44, 12 August 2012 (PDT)

created (not alternate) text for shortcuts


Please, do not hate me for this idea. :-D

Can you manage it, that if there is no alternate text (|txt=$alternate text) by using the template Citelink, the template creates a "right" text by default.

Do you know what I mean?


If I use the the template in the following way


the result is


But in my way of thinking the optimal result is

FreeBSD Wiki: Sound[1]

, which is a composition of a default text for every shortcut (FreeBSD Wiki in this case) + ": " + the title of site (by using the page url (of |url=$page url)).

Please see this idea as a constructive input for make your good templates even more better. :-)

--Rg 07:39, 12 August 2012 (PDT)

The trouble with automating the FreeBSD Wiki: + Url format, is that at best it would be a third field, unless fbsd: were to be parsed to return this new link format. I do not want to take away the txt= option. This may not be true, but it is definitely a challenge.

--Tigersharke 14:31, 12 August 2012 (PDT)

Am I wrong, or is |txt=$alternate text a (indirect) obligation and not a option (if we are apply the template by using a shortcut)? If we do not use this (direct), we have to write an (also) alternate text (without |txt=) at the end, or not?

I was talking of the case, that there is (independent of the purpose) no alternate text existing.

At the moment the result of different articles [2][2] [3][3] is the same "default" text (by having a different topic).

(One again, because I am not sure:) Do you know what I mean?
If you are make the users doing write a alternate text for naming the topic: No Problem! :-) I am only interested that you can follow my chain of thought.

--Rg 18:28, 12 August 2012 (PDT)

I think I understand your original concept, but it will be a while before I figure out how to implement it, especially within the same template. I can certainly test for a modified shortcut word which includes the ':' as a flag to cause the alternate format. The trouble is that the test would be in the ourInterwiki template which gets used in three places within the citelink template, but the effect would only be in one place, the alternate text for the link.

For understanding how any template works and what is required, perhaps test variations on a scratch page such as your userpage or something. There is a small degree of fallback for the variables. It will use what is available to it, of txt, url, "1" which is the first not assigned value, "2", or "3". I also usually try to add some feedback to help editors see their mistakes in a less subtle way. Play with using (not modifying) any of the templates to see how the order of the data passed to them changes things, how assignments to variables or lack of them changes things. Mediawiki markup is rather powerful but simplistic (meaning the special characters that the parser does special things with is few) which adds to the power while also adding to the challenge due to necessary designed-in complexity.

BTW: you may have noticed I was scuffing my forehead against the OurInterwiki template to try to enable a way to show the shortcuts without having to re-type them inside the citelink template description portion.

And just as you wonder if you are saying things clearly and are understood, so do I hope the same.

--Tigersharke 02:30, 13 August 2012 (PDT)

problem with unlinked text for (defined) shortcuts


I was finding same problems with the results of apply the template (in the correct defined way {{Citelink|shortcut|url=page URL|txt=alternate text}}).

text for using the template Result
{{Citelink|wikipedia|url=Adobe_Flash|txt=Adobe Flash}} Adobe Flash[4]
{{Citelink|fbsd|url=Sound|txt=FreeBSD Wiki: Sound}} FreeBSD Wiki: Sound[1]
{{Citelink|wp|url=SUSE_Studio_ImageWriter|txt=SUSE Studio ImageWriter}} SUSE Studio ImageWriter[5]

(Do you see the problem? (At the moment (02:00 am in europe) I have no time to describe it. Sorry!)

-- Rg 16:59, 13 August 2012 (PDT)

This was a mistake of mine. Against my better judgement, I was working with 'live' templates instead of one of the 'testing' ones.

I was trying to add another feature so that the defined shortcuts could be shown somehow, but did not succeed. One of the changes was to how the template ourInterwiki received its data, it had been an undefined "{{{1}}}" but I changed this to be "{{{first}}}". This worked fine, except that calling the template inside of 'citelink' used "{{template:ourinterwiki|first={{{1}}}.." while inside the ourinterwiki template, it expected the undefined "{{{1}}}" rather than {{{first}}}. if this makes any sense.. no matter, it is fixed.

Do you visit #pcbsd on freenode irc? A private message there if I am on a server, may be seen a little quicker than among the potentially many edits on the wiki.

--Tigersharke 19:00, 13 August 2012 (PDT)

l10n ccby3


For licenses of CC are a lot of languages are available. Can we make it possible, that the link of ccby3 (as a Special External (abbreviation)) is linking to the language of the article?

Probably I do not have to say, that there are is stuff, like {{putLang}} and so on.

--Rg (talk) 11:18, 1 January 2014 (PST)

Cite error: <ref> tags exist, but no <references/> tag was found