MediaWiki/Drucken/URL: Unterschied zwischen den Versionen

Aus Foxwiki
Die Seite wurde neu angelegt: „I have a MediaWiki instance with a lot of templates. Sometimes I create pages which use templates and create many external links, giving me a clickable checklist. However, when I print such a list, the MediaWiki software prints the URL of every single external link, cluttering the hardcopy with useless text: I'm not interested in "link-text (<nowiki>https://my.stunning.site/the/very/lengthy/url</nowiki>)" but only in "link-text". Is there some magic wor…“
 
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
I have a MediaWiki instance with a lot of templates. Sometimes I create pages which use templates and create many external links, giving me a clickable checklist.
 


However, when I print such a list, the MediaWiki software prints the URL of every single external link, cluttering the hardcopy with useless text: I'm not interested in "link-text (<nowiki>https://my.stunning.site/the/very/lengthy/url</nowiki>)" but only in "link-text".
However, when I print such a list, the MediaWiki software prints the URL of every single external link, cluttering the hardcopy with useless text: I'm not interested in "link-text (<nowiki>https://my.stunning.site/the/very/lengthy/url</nowiki>)" but only in "link-text".


Is there some magic word or even configuration setting to help me to get a "clean" hardcopy? Thank you!
Is there some magic word or even configuration setting to help me to get a "clean" hardcopy?
 
(MediaWiki 1.25.2, pretty basic)
 
* mediawiki
 
Share
 
Improve this question
 
asked Jul 12, 2017 at 13:04
 
Tobias
 
2,56133 gold badges2727 silver badges4040 bronze badges
 
Add a comment
 
== 1 Answer ==
1


== Answer ==
It's set up in the print stylesheet. You can add something like
It's set up in the print stylesheet. You can add something like
  <code>.mediawiki .mw-body a.external.text:after,
  <code>.mediawiki .mw-body a.external.text:after,
Zeile 31: Zeile 13:
in your own stylesheet to override it.
in your own stylesheet to override it.


Share
* I just couldn't make it work yet ... With <code>monobook</code> being chosen, the stylesheet should be <code>.../wiki/User:Myname/monobook.css</code>, right?  
 
* If you only want to change it for your own user (and per-user stylesheets are enabled) then yes.  
Improve this answer
* Ok; seems the <code>$wgAllowUserCss</code> setting is missing in the LocalSettings.php. I'll need to wait for my colleague to return for this because I don't have administration access to the server...
 
answered Jul 14, 2017 at 8:02
 
Tgr
 
28k1212 gold badges8787 silver badges121121 bronze badges
 
* Sorry I missed your answer for such a long time; this looks promising. I just couldn't make it work yet ... With <code>monobook</code> being chosen, the stylesheet should be <code>.../wiki/User:Myname/monobook.css</code>, right? – Tobias Commented                    Jul 18, 2022 at 15:38               
* If you only want to change it for your own user (and per-user stylesheets are enabled) then yes. – Tgr Commented                    Jul 18, 2022 at 15:43               
* Ok; seems the <code>$wgAllowUserCss</code> setting is missing in the LocalSettings.php. I'll need to wait for my colleague to return for this, because I don't have administration access to the server... – Tobias Commented                    Jul 18, 2022 at 16:01

Version vom 26. Juli 2024, 10:06 Uhr


However, when I print such a list, the MediaWiki software prints the URL of every single external link, cluttering the hardcopy with useless text: I'm not interested in "link-text (https://my.stunning.site/the/very/lengthy/url)" but only in "link-text".

Is there some magic word or even configuration setting to help me to get a "clean" hardcopy?

Answer

It's set up in the print stylesheet. You can add something like

.mediawiki .mw-body a.external.text:after,
.mediawiki .mw-body a.external.autonumber:after {
    content: none;
}

in your own stylesheet to override it.

  • I just couldn't make it work yet ... With monobook being chosen, the stylesheet should be .../wiki/User:Myname/monobook.css, right?
  • If you only want to change it for your own user (and per-user stylesheets are enabled) then yes.
  • Ok; seems the $wgAllowUserCss setting is missing in the LocalSettings.php. I'll need to wait for my colleague to return for this because I don't have administration access to the server...