On 5/8/06, Dan Davis hokie99cpe@gmail.com wrote:
The latter is the easier option and involves a quick patch to OutputPage.php. Find the addCategoryLinks function, circa line 220 and look for the line
$this->mCategoryLinks[] = $sk->makeLinkObj( $title, $text );
Replace this with
$this->mCategoryLinks[] = $sk->makeKnownLinkObj( $title, $text );
Is there a similar change that can be performed to change this behavior for normal links as well?
Personally, I'd link to see blue links for known articles and red links for unknown articles, but with both links pointing to the article rather than unknown links pointing to the edit page.
Is this possible without too much hacking of the code?
Dan
I haven't tested this change, but I think you have to remove the following code from Linker::makeBrokenLinkObj (includes/Linker.php):
if ( '' == $query ) { $q = 'action=edit'; } else { $q = 'action=edit&'.$query; } $u = $nt->escapeLocalURL( $q );
and to replace it with:
$u = $nt->escapeLocalURL( $query );
Dan Davis wrote:
On 5/8/06, Dan Davis hokie99cpe@gmail.com wrote:
The latter is the easier option and involves a quick patch to OutputPage.php. Find the addCategoryLinks function, circa line 220 and look for the line
$this->mCategoryLinks[] = $sk->makeLinkObj( $title, $text );
Replace this with
$this->mCategoryLinks[] = $sk->makeKnownLinkObj( $title, $text );
Is there a similar change that can be performed to change this behavior for normal links as well?
Personally, I'd link to see blue links for known articles and red links for unknown articles, but with both links pointing to the article rather than unknown links pointing to the edit page.
Is this possible without too much hacking of the code?
Dan _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
On 5/22/06, Rotem Liss mail@rotemliss.com wrote:
I haven't tested this change, but I think you have to remove the following code from Linker::makeBrokenLinkObj (includes/Linker.php):
if ( '' == $query ) { $q = 'action=edit'; } else { $q = 'action=edit&'.$query; } $u = $nt->escapeLocalURL( $q );
and to replace it with:
$u = $nt->escapeLocalURL( $query );
Worked like a champ.
Thanks,
Dan
mediawiki-l@lists.wikimedia.org