OK,
I looked into the parser, but fortunately there seems to be an easier way through hooks. Correct me if I'm wrong, but one way to do it seems to be to add a hook to the ParserAfterTidy event (http://www.mediawiki.org/wiki/Help:MediaWiki_hooks/ParserAfterTidy), that replaces <a href="[^>]+&action=edit">([^<]+)</a> with <b>$1</b> If the user is not logged in. But how do I find out whether he is logged in? Do I have access to a user object for the current user?
Sean
-----Original Message----- From: mediawiki-l-bounces@Wikimedia.org [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Rob Church Sent: Donnerstag, 26. Januar 2006 11:12 To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Question about Links
I don't know of a standard hack. You'd want to look at changing the parser's link section, and disabling the parser cache, which could lead to a performance drain on a larger site.
Rob Church
On 26/01/06, seanizer@gmx.net seanizer@gmx.net wrote:
Hello,
I am a new User of mediawiki, and I am planning to put it up on my martial arts related site. Being a wiki newbie, I don't know if and how I can do
the
following: When I write something like [[mypage]] and "mypage" doesn't exist yet, I would like registered users to get a link to the edit screen for mypage (standard behaviour), but unregistered readers should receive only an emphasized version of "mypage", e.g. <b>mypage</b>. That way, I could include lots of terminology in my site and gradually fill it up with contents without going public with dozens of broken links (I know this is not exactly the wiki way, but it is a business site, and I'd prefer not having everybody editing it).
So basically: If a user is logged in, [[mypage]] would translate to <a href="/wiki/index.php?title=mypage&action=edit">mypage</a>, otherwise it would translate to <b>mypage</b>. I am a programmer geek :-), so I guess I could eventually come up with a solution for this myself, but I was wondering if there is a "standardized hack" for such a behavior. Many
thanks
in advance,
Sean Floyd _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l