Extension talk:Cite

I am having errors with the Extension:CITE. Any suggestions why?

2
2A00:1370:8186:1427:78D8:26C3:E585:7C98 (talkcontribs)
Thiemo Kreuz (WMDE) (talkcontribs)

Hard to tell. A file with the name Cite_body.php doesn't exist any more since 2016, MediaWiki version 1.28. My best guess is an incompatibility where the MediaWiki base software was upgraded, but not the extension. Please refer to Manual:Upgrading to get help upgrading your server. Manual:Security explains why this is important.

Reply to "I am having errors with the Extension:CITE. Any suggestions why?"

removing the square brackets round the footnote references?

3
ElectricRay (talkcontribs)

Sorry this is probably an ignorant question but is there a way to adjust the css so that the footnote reference presents as a simple digit like so1 and without the square brackets like so[1]? ~~~~

Cojoilustrado (talkcontribs)

I haven't looked into changing the footnote reference formatting, but I wrote my own reference templates to format them any way I wanted. It works with two templates. re and rf. You can see them in action here. La Venciclopedia

ElectricRay (talkcontribs)

sorry for my delay in replying. That seems really clever. I got a bit lost on the "plantilla" part. This seems like completely new magic to me! But I see the idea, for sure. Thanks for letting me know. And Cool site by the way. ElectricRay (talk) 16:39, 11 March 2024 (UTC)

Edit: I just discovered the idea of parserfunctions after only 15 years editing my own wiki!

Reply to "removing the square brackets round the footnote references?"
Bedivere (talkcontribs)

Hello there. I would like to know if there is a way to hide references to unregistered users. I have found some copy the references but refuse to cite my website.

I've thought maybe it's a good idea to restrict access to the Reflist template, but I'm not sure how to do that. I'd be glad if somebody could help me out.

Want (talkcontribs)
Bedivere (talkcontribs)

Hi there. I have tried doing so, but the references still show up automatically. Haven't found a way to prevent Cite from adding them.

Want (talkcontribs)

You add example code, please. I use next code for it:

{{#if:{{CURRENTLOGGEDUSER}}
|Wikicode for registered users
|Wikicode for anonymous
}}
Bedivere (talkcontribs)

Yeah, I did the same, but using ifeq (which provides similar results). However, the references list still appears to unregistered users because it is added automatically, I presume by the extension itself.

Bedivere (talkcontribs)

I have reviewed the extension code and found no easy way (parameters) to prevent the references from showing up despite there being no <references /> tag. There is a workaround using CSS, but the references are generated anyway and may be found and extracted.

Want (talkcontribs)

Solution may be template. For it I must see example of code.

Bedivere (talkcontribs)

The extension keeps on inserting the references tag even if it is not included as part of the code shown above. Solution was:

{{#if:{{CURRENTLOGGEDUSER}} |<references/> |<div display:"none"><references/></div> }}

Of course the references could still be caught, but it makes it harder. It could be implemented in the code of Cite this possibility, to hide references from unregistered users, or disabling the forced inclusion of the references tag if it isn't included in the code.

Reply to "Hiding references"

Use a cite template across multiple pages

6
Sera denoir (talkcontribs)

I don't know that this is a bug, a feature request, or me not knowing what I'm doing. Use case is this:

My wiki hosts a number of documents related to court proceedings. Most are standard formats, but one is unique. I'm using a cite note for that format to explain to users what they need to read the file (for example, see the FTR cite at this link court(dot) raindrop(dot)works/wiki/21CR61225#Media - you'll have to copy/paste because of the link spam warning)


Any case that I'm working on that has this file type will have the same cite. I know there's a way to cite the same material multiple times in the same page, but is there a way to do the same across multiple pages?

Thiemo Kreuz (WMDE) (talkcontribs)

People on Wikipedia sometimes do this with templates that can be used in as many references as needed. Here is an example. When used in wikitext it looks like this:

<ref name="Iranica">{{Encyclopaedia Iranica}}</ref>
Sera denoir (talkcontribs)

Thanks .. it looks like that'll work. I'm going to have to dig more into it to make sure I set it up right, but it does seem like a usable option!

Sera denoir (talkcontribs)

Yep, I was able to get it to work!


And now that I'm learning more about how the ref tags work, seems I don't even have to name it (which since it's only likely going to be used once per page, might make sense)

Ancheta Wis (talkcontribs)

In the wiki article, the named ref could be thus, with a unique name, say aPmm2 in camelCase <ref name= aPmm2 >AuthorName [ThisIsTheURL (dateHere) This is the Title] More information here.</ref>

And when you cite aPmm2 again, use Here is another sentence.<ref name= aPmm2 />

Additional information can be added using the rp template:Here is a third sentence.<ref name= aPmm2 />{{rp| page 2}}

The real use of aPmm2 occurred in https://en.wikipedia.org/wiki/Common_Security_and_Defence_Policy

You would have to transclude the definition of named ref aPmm2 to each of your target articles.

This post was hidden by Ancheta Wis (history)
Reply to "Use a cite template across multiple pages"

Citation is not numbered when i use ":"

4
Bedtry (talkcontribs)

Normally, the citation on the bottom of the page is automatically numbered.

When the last "sentence" of the page uses a ":" infront the citation will loose its numbering.

I tried fixing it with

$(document).ready(function(){
    $('.mw-references-wrap').before('<h1>References</h1>');
});

So that there will be a heading over the last sentence of the page but it does not work.

Any ideas?

Thiemo Kreuz (WMDE) (talkcontribs)

I'm afraid I can not reproduce this. On which wiki does this happen? Do you have an example page?

Bedtry (talkcontribs)

Does it stay numbered for you, if the last sentence starts with ":"? If so i will provide pictures to show how it is in my wiki

Thiemo Kreuz (WMDE) (talkcontribs)

You can post a small wikitext example that triggers the error for you.

Reply to "Citation is not numbered when i use ":""

Style font size of cite with css

3
Bedtry (talkcontribs)

Any chance to style the font size of the cite on the bottom of the page?

I tried changing it with .mw-body { ..

Thiemo Kreuz (WMDE) (talkcontribs)

That should generally be possible with normal CSS selectors. You probably want one that includes .references. However, it depends on what you want to achieve and which wiki this is about. By default the Cite extension doesn't touch the default font-size, but some communities changed it for their wiki.

Bedtry (talkcontribs)

oh yes that works!

Reply to "Style font size of cite with css"
C holtermann (talkcontribs)

I'm looking for a way to include the text of a reference in the text of the page. I'd like to have something like:


This is a text from [1].


These are some of the books referenced on this page:

  • Some author, Some book [<- This is what I'd like to achieve, identical to what is shown in References]


References

[1] Some author, Some book


Is there a possibility to achieve that?

Thiemo Kreuz (WMDE) (talkcontribs)

Not with this extension, sorry. You can link to the same reference twice, but it can't be displayed in two different places.

Juandev (talkcontribs)

Does the output follows any citation standard? Is there a possibility to switch between citation standards?

Thiemo Kreuz (WMDE) (talkcontribs)
Juandev (talkcontribs)

Well, on the side of Wikipedia you can modify how the references look in References paragraph via template. But can you modife it in the text? E.g. insted of having anchors lik [1], use somethig like (Peters, 2015)?

Thiemo Kreuz (WMDE) (talkcontribs)

Why can ref names not be purely numerical?

3
79.249.149.73 (talkcontribs)

Not that it bothers me, but is there any technical reason for said restriction?

Thiemo Kreuz (WMDE) (talkcontribs)

As far as I can tell from the code, the reason is that refs without a name are automatically numbered, starting from 1. We want to avoid confusion between such automatically numbered and manually named refs.

An additional argument might have been that the (classic) HTML and CSS standards don't allow names, ids and such to start with a number either. It's typically a good idea to follow well-established standards.

Ancheta Wis (talkcontribs)

Sample from 06:32, 19 August 2022 (UTC) <ref name= a12345 >test</ref> </references> --Ancheta Wis (talk) 06:32, 19 August 2022 (UTC)

Is there a technical reason for why the tag name cannot be a simple integer?

11
Elominius (talkcontribs)

For example, <ref name=2022>test</ref> results in "Cite error: The <ref> tag name cannot be a simple integer."

I don't mind this restriction, but I am just asking out of curiosity.

Ancheta Wis (talkcontribs)

The explanation looks something like "the object should be symbolic in nature, and not a number (in C programming, a symbol is like a string; a symbol does not begin with a number -- that would fool the parser into thinking the object being parsed is some kind of number)".

Jdforrester (WMF) (talkcontribs)

I believe this restriction comes from the HTML specification. If you want to use a number-like value as the name, you should quote it (which ideally you should do anyway), i.e. <ref name="2022">test</ref> or similar.

MasterQuestionable (talkcontribs)

Typically most (if not all) parsers make no distinction of strings and numbers in this context. ("everything is string" likely)

Ancheta Wis (talkcontribs)

<ref name= a12345 >test</ref> works perfectly well.

Jdforrester (WMF) (talkcontribs)

It "works" because people are lazy and write it without quotes, but, as I said, properly you should quote it.

Thiemo Kreuz (WMDE) (talkcontribs)

It's not about the quotes. The original reason is that <ref> tags without a name=… are automatically named – with numbers. While there would be a way to allow both (e.g. by prepending two different prefixes) the original authors of this extension found it easier and less confusing for everybody to reserve numbers for internal use.

I hope this helps.

This post was hidden by MasterQuestionable (history)