Page MenuHomePhabricator

Modify link text on group references e.g to remove blank
Open, LowPublic

Description

Author: csvfiles

Description:
Links to references on a group are created with the group name on them as [<groupname><blank><number>] (or in HTML, a link to the first reference to a group called "C" will be created as <sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[C 1]</a></sup>)

I would like to be able to modify the way the link is generated (e.g to make [C 1] into [C1] to make references smaller, or into [C&nbsp;1] so the reference is not split up between lines)

The <sup> link is generated through the MediaWiki:cite_reference_link configuration page. The "C 1" part is the parameter $3. Note the blank between the group name (C) and the number of the reference (1).

On "Cite_body.php" there is a function named "linkRef" which calls this page and passes the three parameters it requires. The $3 is passed as:

"$this->getLinkLabel( $label, $group, ( ( $group == CITE_DEFAULT_GROUP ) ? '' : "$group " ) . $wgContLang->formatNum( $label ) )"

I'm afraid the blank space in my "[C 1]" reference is hardcoded in this line. Can this be made into another parameter page, please?


Version: unspecified
Severity: enhancement

Details

Reference
bz53794

Event Timeline

bzimport raised the priority of this task from to Low.
bzimport set Reference to bz53794.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Sep 5 2013, 9:33 AM
FriedhelmW set Security to None.Jan 24 2015, 3:39 PM
FriedhelmW added a subscriber: Aklapper.

Regarding zhwiki, a space is needed if $group[-1] is alphanumeric (otherwise [foo_999 1] -> [foo_9991]). Some simple "change-the-blank-string" config will not be enough for this.

Regarding zhwiki, a space is needed if $group[-1] is alphanumeric (otherwise [foo_999 1] -> [foo_9991]). Some simple "change-the-blank-string" config will not be enough for this.

A group name ended with number is rarely seen. Nevertheless it's still a possibility and should be taken care.

What jimmyxu means is that an extra optional parameter is needed, such that the end user in zhwiki may choose to suppress the space. Currently users in zhwiki, no matter directly call {{#tag:ref|group=groupname}} or use templates such as Template:Refn, have no way to get rid of the space, hence violating the MOS guideline in zhwiki.

Quest_for_Truth raised the priority of this task from Low to High.Aug 6 2016, 6:42 PM
Aklapper lowered the priority of this task from High to Low.Aug 7 2016, 12:39 PM

@Quest_for_Truth: You increased the priority of this task.
As priority reflects reality and does not cause it, could you please elaborate why this task has suddenly become more urgent?
If you increased priority because you plan to work on this task (thanks!) please claim the task by setting yourself as assignee. Thank you for your help!

Liuxinyu970226 added a subscriber: Liuxinyu970226.