Module talk:Ancient Olympiads
Appearance
- @Mr. Stradivarius: I have fixed the module, and everything's working fine in the debug console, but it still doesn't run in the calendar.--Hyphantes (talk) 21:18, 19 April 2015 (UTC)
- @Mr. Stradivarius: It appears that the values %s and %d can be used only once in a string to produce a link. In the following script they are used twice in both functions. The following script uses them twice for two links, but in the calendar only one displays correctly.
if inputYear - 1 == t.year then -- year of the Olympiad, test with = p._main( -495 ) -- The input year in the calendar appears to be one year to low (-775 for the year 776 BC). This is why all values need to be corrected by 1. return string.format( '%s [[Olympiad]] ([[%s|victor]][[Winner of the Stadion race|)¹]]', t.numberOl, t.winner ) end if inputYear > t.year then -- Years 2-4 of the Olympiad, test with = p._main( -494 ) etc. return string.format( '%s [[Olympiad]], [[%d BC|year %d]]', t.numberOl, inputYear * - 1 + 1, inputYear - t.year ) end
- Is there a way to work around these problems or do I have to live with these limitations?--Hyphantes (talk) 22:58, 19 April 2015 (UTC)
- @Hyphantes: Sounds like you're creating a link to the current page - those links always show up in bold. For example, on this page, if I use the code
[[Module talk:Ancient Olympiads]]
, it looks like this: Module talk:Ancient Olympiads. This is a feature of the MediaWiki software, and you can't turn it off. It doesn't really make much sense to always generate a link to the page that a reader is looking at, so that part of the module should just be plain text, not a link. — Mr. Stradivarius ♪ talk ♪ 07:13, 20 April 2015 (UTC)
- @Hyphantes: Sounds like you're creating a link to the current page - those links always show up in bold. For example, on this page, if I use the code
- Is there a way to work around these problems or do I have to live with these limitations?--Hyphantes (talk) 22:58, 19 April 2015 (UTC)