Last modified: 2012-02-10 12:21:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34626, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32626 - Backlinks generated by <references/> shouldn't be visible in printed version of pages
Backlinks generated by <references/> shouldn't be visible in printed version ...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Cite (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-24 15:32 UTC by Liangent
Modified: 2012-02-10 12:21 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Adding classes to default messages (3.03 KB, patch)
2012-01-03 20:13 UTC, MrBlueSky
Details

Description Liangent 2011-11-24 15:32:20 UTC
article text.[1] article text.[2] article text.[2]

== References ==

1. ^ ref 1
2. ^ 2.1 2.1 ref 2

---- should be printed as ----

article text.[1] article text.[2] article text.[2]

== References ==

1. ref 1
2. ref 2
Comment 1 MrBlueSky 2011-12-28 23:53:39 UTC
This can be done by changing MediaWiki:Print.css. On https://nl.wikipedia.org/wiki/MediaWiki:Print.css we have:

ol.references li a[href|="#cite_ref"] {display:none;}

It would be nice though if Cite would give the backlinks a special class to make this somewhat easier (or make them invisible by default?).
Comment 2 MrBlueSky 2011-12-29 23:38:18 UTC
The above solution doesn't work correctly for refs with multiple backlinks. But the backlinks can actually be given a class by changing the 'Cite references link one' and 'Cite references link many' system messages. See https://nl.wikipedia.org/wiki/MediaWiki:Cite_references_link_one and https://nl.wikipedia.org/wiki/MediaWiki:Cite_references_link_many. Now we can put in Print.css:

.cite-backlink {display:none;}
Comment 3 MrBlueSky 2012-01-03 01:47:21 UTC
Changed to 'WORKSFORME'
Comment 4 Liangent 2012-01-03 01:50:49 UTC
Why isn't it done in the extension?
Comment 5 MrBlueSky 2012-01-03 02:07:10 UTC
The output, including the layout etc, is totally configurable by changing the system messages (cite_*). Making the extension use a specific layout means making it less customizable. Some people read the printable version in their browser, in which case it makes sense to be able to use the backlinks. So, some sites might want to choose to have the backlinks visible.
Comment 6 Liangent 2012-01-03 02:11:04 UTC
(In reply to comment #5)
> The output, including the layout etc, is totally configurable by changing the
> system messages (cite_*). Making the extension use a specific layout means
> making it less customizable. Some people read the printable version in their
> browser, in which case it makes sense to be able to use the backlinks. So, some
> sites might want to choose to have the backlinks visible.

Then what about pre-inserting some classes but not attaching styles to them?
Comment 7 MrBlueSky 2012-01-03 20:13:58 UTC
Created attachment 9793 [details]
Adding classes to default messages

Yes, that would make it easier when someone wants to hide the backlinks.
Comment 8 MrBlueSky 2012-02-10 12:21:40 UTC
Added in r111150

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links