Forum:Cite source, a new citation template

Opening post
After 2 years, I am finally ready to present one of my biggest projects on this wiki:. It's a project that has taken up hours of my life, undergone 2 major rewrites and expanded in scope beyond what I ever initially imagined. In short, it's a citation template, aimed at making the information on this wiki more verifiable, making it easier to perform further research and helping readers in deciding whether a piece of information is relevant to them. Before going in depth on what the template can do, I'd first like to explore some of my reasoning and methodology behind the template and citations in general.

Methodology
Citations on this wiki fall into 2 categories: in-universe citations, which I'm concerned with here, and out-of-universe citations, which I have plans to work on in the future but will primarily not be concerned with here. In-universe citations currently look like this:
 * (TV: The Daleks)

They're used on in-universe pages to denote which source information in part of a sentance, a whole sentance, a paragraph, or multiple paragraphs comes from. They're placed in brackets and composed of a prefix, in this case TV, and the source name, in this case The Daleks. That is all of the information that a reader recieves in most cases (the exception to this is that it is permissable to cite a specific, named, parts/episodes, for example with early Hartnell serials, as "The Dead Planet").

I believe that all citations, both in-universe and out-of-universe, serve 2 major goals: In addition, I believe that in-universe citations have a third major goal that out-of-universe citations don't: Allowing readers to see whether a piece of information is relevant, or even "true", to them
 * 1) Ensuring that information can be verified easily
 * 2) Providing a useful starting point for further research

I feel that 1 and 2 are somewhat self-explanatory. Allowing easy verifying of information is why readers should trust us, and it makes our job easier. It's the primary reason we have citations at all. At the moment, all you're given in the majority of cases is the name of the story, and that makes verifying information hard. It's similar when it comes to further research. If you want to look more deeply into a piece of information's presentation in a given source, you're currently expected to dig through the entire source when less than 1% of it may actually be relevant. I feel, for both of these reasons, that it is good to be able to look at a citation and jump exactly to where in the source the information is from. Some sources on Tardis are long. The War Games is over 4 hours long. Stories like Liberation of the Daleks are serialised over months of magazines or comics with many individual installments to track down. In both of these cases, it would be much more useful to be directed to exactly where in the source the information is from rather than just the source as a whole, and there are hundreds, possibly thousands, of similar cases accross this wiki. This is common in academic citation formats which frequently include page numbers in their references and, while I don't think we should adopt one such format directly, they are commonly used in professional publications for a reason. Making citations more accurate can only serve to make the wiki more useful and trustworthy as a reference resource.

Moreover, sometimes, sources have minor variants such as reprints, special editions, reconstructions, narrated soundtracks, audiobooks and more, and these can have differences. Therefore, it would be helpful to note these variants clearly but there is currently no way to do so.

3 is something that I feel warrants a little more discussion. As many of us know, Doctor Who is not like other franchises. There is no officially defined, exhaustive, canon, and this leads to different fans having different ideas on what "counts" for them. Some don't really care: fiction's fiction. Others may want to be a little more confined, only considering stuff licensed by the BBC to count. Others may go tighter still, only caring about Big Finish and the TV show, or even just the TV show itself! This wiki should cater for as many of these groups as is possible, whether we agree with their stances or not, and I posit that we currently don't do a great job of it. Currently, the only information you get about a source from a citation is its name and its medium (from the prefix). Unless you have the names and contexts of every source memorised, or you have a very weird idea of what "counts" (e.g. only TV and AUDIO, which means you would include Lucifer and Iris Wildthyme Speaks...! while exlcuding Alien Bodies and the prequels. I don't think anyone is using this definition of what "counts" or any similar ones), the information immediately presented is not helpful. Of course, a reader can just click through to the source's page, but this isn't very helpful in giving an immediate picture of whether you should care. It can be quite disruptive to have to break the flow of reading to visit a different page, wait for that to load, learn what you need to learn and then bounce back to the original page. The solution, the way I see it, is to include more contextual information in citations.

The wiki used to do this a lot better but, at the same time, absolutely appallingly. If you aren't currently aware, this wiki used to have prefixes based on series, not medium, so instead of "(TV: Rose)", you'd have "(DW: Rose)". This meant that we had a lot of prefixes. To quote CzechOut, "90. Nine-zero." to be exact. This system was very problematic. There were a ton of prefixes to remember and new ones had to be agreed upon and created reguarly. It was born out of Memory Alpha but the situation there is very different: they only cover TV shows so have a lot less series to worry about. This keeps their list of prefixes small and memorable. Tardis is just not like that. A prefix system like this is just not manageable.

This idea does have merit, though. The context given through these prefixes can be very helpful at times. Knowing whether a piece of information is from K9 or Doctor Who, at least for me, changes how I view it. The same can be said for TV Comic and Titan Comics' output. This information was conveyed by prefixes but now just isn't present. I'm not proposing that we go back to the old system (in fact, my proposal doesn't touch prefixes at all), but I feel that there is room for improvement here.

And that concludes my methodology and motivating princples. It's now time to go over my actual proposal.

The proposal
My proposal is a new template,. This has been my main passion project for over 2 years now, and I am very happy with it. Feature creep being what it is, the template has grown quite a bit, so I'll go over all of its features briefly.

The basic idea is expressed best through an example:


 * (TV: )

Notice the "+"? If you click it, a bit of information about The Daleks pops up. Immediately, I feel that this makes my idea regarding improving methodology point 3 clear. Included is everything that I feel could be desired when considering a source's context. You know what the source is from, when the source is from, where the source is from and who the source is from. This should be enough for most people to decide whether they care. People who are just here for New Who can see the release date and know that this is perhaps not entirely relevant to them. People interested in Terry Nation's portrayl of the Daleks compared to other writers immediately see that he is indeed this serial's writer. All of this without significantly disrupting the flow of reading or leaving the page (this is particuarly helpful when browsing in the Fandom app, for example, where there are no tabs). For the editor, it's as simple as typing: (TV: ) I'm not going to include template syntax for my other examples, but it doesn't get much harder than this. If you're interested in the details, there is comprehensive usage documentation at Template:Cite source.

The rest of the template's functionality mostly covers methodology points 1 and 2. I will provide a few examples to demonstrate this functionality. Again, more examples can be found at Template:Cite source. I feel that these examples demonstrate a wide range of functionality that I feel significantly improve upon methodology points 1 and 2. On top of this, I have also included functionality related to the ongoing Forum:Revisiting fiction with branching elements and historical policy therein: The final thing I want to mention is the ability to reuse citations. You can define a lengthy named citation like  (TV: )  and reuse it simply by typing  (TV: ) :
 * (TV: )
 * (PROSE: )
 * (TV: )
 * (TV: ) (requires the use of on the source page)
 * (PROSE: )
 * (PROSE: )
 * (AUDIO: )
 * (TV: ) (note the more specific release year)
 * (PROSE:, )
 * (GAME: )
 * (TV: )

For a more full discussion of all of the features, see the usage documentation at Template:Cite source.

I'd also like to mention that I've written full TemplateData for the template, meaning that it works nicely with visual editor, reducing the barrier for usage.

Finally,   is currently quite long. My proposed solution for this is that a redirect be created at or similar.

Problem: Czech's objections
I feel the need to mention that CzechOut told me to stop work on this template back in 2021 (before I was an admin), as can be seen at User talk:Bongolium500. However, his arguments contained factual innacuracies which I rebutted at User talk:CzechOut. I then continued to work on the template. In its current form, the template is so different to what it was back then that many of the arguments don't carry over anyway.

Problem: implementation
The information automatically included in the template has to come from somewhere, and this place is the source page's infobox. To accomodate this, I made some changes to to end up with. Switching from one to the other isn't particuarly hard or time consuiming (a list of changes is available at Template:Infobox Story SMW), but a lot of pages use and so it would take a long time to switch them all over manually. I am planning to investigate automating this with a bot (discussions with User:SOTO, who is more knowledgeable in this area than me, are in order). Once every page is moved over, can be renamed to  and another bot run used to update the template's name accross the wiki.

The upside to changing this infobox over, though, is that it leads to the potential for loads more automation in the future. One that particuarly comes to mind is automating list of appearance tables which I have plans to do, a lot of the work having been done as a side effect of this new infobox.

The other thing is actually implementing. I don't believe that it would be hard to automatically apply the template to every citation (once the source page's infobox has been switched over), but it is impossible to automate any of the extra features for precise citations. That would have to come manually. I feel that the work would be worth it, though.

Technical details
This section likely won't be of interest to most people but is here for people that want it.

It may suprise you to know that this template actually barely uses SMW. It is actually written in Lua using Scribuntu and primarily uses LuaCache for storing data across pages. This extension was specifically enabled on this wiki for this template and is much faster than SMW, massively reducing performance issues.

This template is relatively complex and so I have written full technical documentation at Module:Cite source. I believe that this should help in maintaining the template into the future, even if, for whatever reason, I am not around.

Conclusion
Over 2 years of my time on this wiki have led up to this forum post. Just because I've spent a long time on it doesn't mean it should be implemented immediately (a vandal could spent 20 years writing the most complex and well-written vandalism but we'd still revert it in a heart beat), but I do feel it shows my comitment to this project. Even now in (hopefully) the final stages before the template is implemented, things can be changed, so any minor issues putting you off the template can be corrected. Before finishing, I just need to publicly thank the frequenters of the #lua and #smw-on-fandom channels from the Fandom Discord server, particuarly the (previous Fandom wiki representative) User:RheingoldRiver who used a lot of her time to review my code, talk through my ideas and help me realise this project. genuinely, without these people's help, this project would still be in the state shown on User:Bongolium500/Sandbox 5. Thank you for reading. Bongo50  ☎  20:59, 20 June 2023 (UTC)

Discussion
As the one to have attempted to create a citation template myself (and thoroughly failed!) I completely support this proposal. I have long wanted more precise citations, and have often, where the source pages has subheadings, linked to the page by adding  #Subheading title  to the link.

You completely addressed my minor concerns about implementation of such a feature, as it was something I was wondering about; automating the bulk of the work with a bot and then making them more precise where needed manually seems like the realistic and logical option, and I would absolutely commit to being as precise as I can whenever possible. Bravo @Bongo50 for making this possible! Your dedication is greatly appreciated and I cannot wait to this template being implemented. 22:21, 20 June 2023 (UTC)


 * I support this proposal. I've read through the possible obstacles, and personally if we just use this everywhere but Infoboxes I think it's still a W. I think, in general, this will greatly improve coverage. OS25🤙☎️ 22:30, 20 June 2023 (UTC)


 * Huh, wasn't aware we could use Lua. I toyed around with it a little ~10 years ago for computercraft stuff, might see if I can relearn it. After, you know, everything else on my plate.


 * I am, of course, broadly sympathetic to this idea. But I do see an issue. Suppose I only have a variant of the original and I don't know whether details have changed between the original and the variant I have. How should I cite it? For instance, Erasing Sherlock has two editions. Suppose that I had based my summary off of the second rather than the first. Would I have had to cite everything as being based on "Erasing Sherlock (Second Edition)"? Should the version I've written be based on "Erasing Sherlock (First Edition)"? We're aware that there are some differences, but that they're relatively minor. What about Dead Romance (novel)? It was first published as part of the New Adventures and then republished with slight typographical/grammar changes along with two* short stories as a tie in to Faction Paradox. My ebook calls it Faction Paradox Book 0, though their statements elsewhere are more ambiguous.


 * I think applying this template to rereleases / new editions is something we need to think about very carefully, because it's already an area that the wiki doesn't quite have the best thought out policies regarding. Najawin ☎  02:48, 21 June 2023 (UTC)


 * I fully support this proposal. As for new editions, a specific edition should obly be cited if either theres a narrative difference between the two editions, and you are referring to said difference , or you are also cititng the page number.


 * This sounds like a good idea but I'm not convinced Bongo's 'rebuttal' of CzechOut's concerns actually addressed anything. Does the current version still have accessibility issues? If it does that's going to be a hard no from me. On a similar note, what's the mobile experience like? Is there a live page somewhere in main-space for testing? I'd be curious to get some real numbers on the performance part too, by making a copy of something huge like Last Great Time War that has the new citations instead and comparing the generation time and memory use. If it's quite a bit more I imagine it would be good to seek advice from Fandom staff about whether they'd be happy with the extra server load. Just repeatedly calling templates would add up on a long page, regardless of any SMW in play.


 * May I also ask why prefix part isn't included in the template? If this site is going to go through quite a bit of work to convert all the citations, it makes sense to me to go 'all the way' and make the whole thing a template, prefix and all. It'll probably never happen, but just in case this wiki decided to rename a prefix or change how cites look, it would be much easier to just change the template than all the citations again (I know this was quite a while ago but the move of NOTDWU to NOTVALID comes to mind). guyus24 (talk) 07:52, 21 June 2023 (UTC)


 * I don't think that bit's viable, because you sometimes want to cite things like (PROSE: SOURCE1, SOURCE2).


 * I'm also not sure about Ettolrhc's comment, since what she's asking for seems, well, epistemically inaccessible in some instances - surely the person who has only consumed one version of the work only knows what's in that one version. (It also doesn't comment on the different ranges that Dead Romance could be attributed to. But that's something without an obvious solution, so it's understandable.) Najawin ☎  07:59, 21 June 2023 (UTC)


 * Lua's great and really easy to learn. Check out this if you're planning to.


 * You raise an excellent point, Najawin. There are 2 very similar citation options that could be used here, but they are different.


 * The first is |ed= which is part of the "precise cite" block. This is intended to be used when citing page numbers or timestamps and not really much else. The reason for this is that page numbers and timestamps can vary between editions. It's not meant to indicate something unique to any given edition, but rather to provide clarity on the page number/timestamp. Hence, if you are citing a specific page number/timestamp and there are multiple editions, you should always use |ed=.


 * The second is |var=</tt> with . This is intended to be used when you do want to highlight a difference between 2 versions of a source, but it is important to note that it is intended to be optional. It should be used only when you know there is a difference and want to highlight that. The simplest case here would be that you have both versions in front of you and can properly compare. However, I originally came up with it for animated reconstructions and there's rarely an original to compare to with those. In these cases, it's for things that would just be impossible to have in the original, such as the inclusion of the Magpie Electricals in The Power of the Daleks. It could also be used when citing colour details to coloured animations of originally black and white serials. The point is that it should be used only when you know there is definitely a difference and want to highlight that. Hence, if you only have the variant or original and don't know the differences between them, you wouldn't use this. Bongo50   ☎  08:07, 21 June 2023 (UTC)


 * Sorry, I missed User:Guyus24's message. Regarding accessibility issues, I genuinely don't know. Any potential problems would be with screen readers and I have been unable to find anyone using one who is willing to test this for me. I tried testing it myself but proper screen readers have a steep learning curve and, ultimately, I would be unable to give a fair depiction. If there are issues, I think that I know a fix, but it's hard to test it without someone who uses a screen reader willing to work with me.


 * Regarding mobile, it works perfectly. There's an example at Tardis:Sandbox which should load with the mobile skin on mobile.


 * Regarding performance issues at scale, I don't think this will be an issue. Tardis wouldn't be the first wiki to introduce citation templates or call templates a lot on a single page. I've never heard of any issues from any of them.


 * With prefixes, the real reason is that it wasn't originally what I was aiming to do with my earliest versions, and I never thought to add it for newer versions. It could be done if there's support, though. Najawin's issue is easy enough to fix with a |noprefix=</tt> parameter. Bongo50   ☎  08:21, 21 June 2023 (UTC)

This article seems to suggest it would be ok with a few ARIA attributes and wrapping the [+] in a button or something: https://accessibility.huit.harvard.edu/technique-expandable-sections. I don't know what the template does or what MediaWiki handles for you, but there's already an "aria-expanded" attribute on the toggle. It looks like its always set to true though, regardless of whether the content is visible, which is definitely not right. guyus24 (talk) 09:16, 21 June 2023 (UTC)


 * Hmm interesting. I'll have a look into this. Thanks. Bongo50   ☎  10:24, 21 June 2023 (UTC)


 * >Learn X in Y Minutes


 * >Hmm, looks interesting, let's see what they have. Oh, set theory, fun. Let's see what they're sayi DEAR GOD NO. That's just irresponsible.


 * Anyhow. How would we handle reprints impacting what range something is from? Do we just cite things consistently to the first version of Dead Romance? Even though it was reprinted as a MNP book that was FP adjacent? Grass was originally printed in a sci-fi anthology that had nothing to do with Doctor Who. Is it a Faction Paradox short story or unmarked? Najawin ☎  23:16, 21 June 2023 (UTC)


 * Series information is taken directly from the infobox so this is, in my mind, already a solved problem: whatever is used for |series=</tt> will be the basis of the series used in the citation. If this is undesirable, |citation series=</tt> can be set or, more generally, Module:Cite source/series overrides can be used, but I don't feel that this is relevant in either example here. Hence, Dead Romance is a VNA and Grass (short story) is FP. This is what I feel is most helpful for readers. Regarding Dead Romance, I don't see that there would be much need to use variants with it, but if there were, both series could be included in the citation and the same principle applies elsewhere. I'll produce an example of what I mean a little later.


 * Eh, the variants for Dead Romance are just grammar stuff, iirc. The issue for those is really the range, you can easily make a case that Grass isn't quite FP and Dead Romance is just barely FP. See Talk:The Stranger (novel). Not a 100% resolved issue, so it's a little unfair for me to ask. This is a super edge case. But we could easily get something similar in the future. Najawin ☎  06:42, 22 June 2023 (UTC)


 * There are a few substantive differences between the two editions of Dead Romance, actually — see Nate's breakdown here — mostly relating to what we're told about Chris's employers. Just "the time travellers" and "the Watchmakers" in the Virgin edition, they become firmly "the Great Houses" in the MNP version and we hear just a little bit more about them. Scrooge MacDuck ⊕ 10:34, 22 June 2023 (UTC)


 * Sorry about that unsigned comment earlier. I was typing it quickly on my phone. While you could make a case that the series descriptors I gave are inaccurate, what it comes down to for me is what is most useful for readers. Grass is heavily linked to Faction Paradox and not really part of any other series. Hence, it is most helpful to list the series as Faction Paradox. Dead Romance fits into 2 series simultaneously, but it was originally a VNA and hence this is the categoriation that I think should be used. Here's how I'd cite it:
 * (PROSE: )
 * It's interesting to learn about those differences between the original and the reprint. Here's how I'd cite those:
 * (PROSE: )
 * Bongo50  ☎  16:40, 22 June 2023 (UTC)

Full support. I've corresponded with Bongo a lot over the development of this template, and he's been great at implementing my design notes. After wracking my brain for edge cases, I've come up empty: part of the genius of the template is that it pulls the information from infoboxes, so if any of the information it pulls is wrong, that's a prompt to be more thoughtful about the infobox, not the template. But there are override failsafes for the template as well! Further tweaks to the templae can be discussed on its talk page, but the benefits of being able to cite information more accurately are abolutely overwhelming; whatever notes and suggestions are raised in this thread, I urge them not to get in the way of implementation. – n8 (☎) 16:22, 23 June 2023 (UTC)