Jump to content

User talk:TiiJ7

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Welcome!

[edit]

Hello, TiiJ7, and Welcome to Wikipedia!

Please remember to sign your name on talk pages by clicking or or by typing four tildes (~~~~); this will automatically produce your username and the date. Also, please do your best to always fill in the edit summary field. Below are some useful links to facilitate your involvement. Happy editing! GiantSnowman 11:41, 12 September 2013 (UTC)[reply]

Getting started
Finding your way around
Editing articles
Getting help
How you can help

Module

[edit]

 Done GiantSnowman 11:42, 12 September 2013 (UTC)[reply]

Hello and thank you!

[edit]

Hi TiiJ7!

Implemented this nice solution you posted over at https://stackoverflow.com/a/29331597/8409515 for when you want all redlinks to go to a specified URL? I decided to point them to the search page and it works well but would love to exclude the red link to create the page that is on the search page.

HausaDictionary (talk) 12:31, 30 August 2017 (UTC)[reply]

@HausaDictionary: I haven't really looked into this as much. But indeed it would be useful to have the hook not apply on the search page (or even special pages in general). Unfortunately, it seems that the LinkEnd hook doesn't directly expose the Skin object. Perhaps you can still get it in the function with global $wgSkin, though I believe global objects are not recommended, so there might be a better way to do it. In either case once you have the skin, you can use getTitle() to get the current page and then isSpecialPage() or isSpecial('Search'). So with that it should be a simple if check to bypass the href change. But again, I haven't really looked into it much and am not too super knowledgeable about MediaWiki, so I'm afraid this is about all I can give you. Hope it still helped. - TiiJ7 (talk) 21:04, 31 August 2017 (UTC)[reply]