[Mediawiki-l] Internal link with query string?

Daniel Barrett danb at VistaPrint.com
Mon May 7 20:16:09 UTC 2007


You can see $1 used in [[MediaWiki:Noexactmatch]] :

  '''There is no page titled "$1".''' You can [[:$1|create this page]].

DanB

-----Original Message-----
From: mediawiki-l-bounces at lists.wikimedia.org
[mailto:mediawiki-l-bounces at lists.wikimedia.org] On Behalf Of Jim Wilson
Sent: Monday, May 07, 2007 3:38 PM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Internal link with query string?

When would $1 get evaluated?  Who's evaluating $1?  Where does the value
for
$1 come from?

I take it you don't mean {{{1}}} the Template parameter.

-- Jim

On 5/7/07, Daniel Barrett <danb at vistaprint.com> wrote:
>
> Does anyone have any other ideas how to produce (reliably) an internal

> link with a query string?
>
> Attempt 1:
>
> [[Special:Foobar?arg=$1|new special page]]
>
> This fails as http://mywiki.com/wiki/Special:Foobar%3Farg%3D%241.
>
> Attempt 2:
>
> [{{SERVER}}/wiki/Special:Foobar?arg=$1 new special page]
>
> This produces an incorrect when $1 contains whitespace: only the first

> word of $1 is in the link.
>
> Attempt 3:
>
> [[{{fullurl:Special:Foobar|arg=$1}}]]
>
> This fails for the same reason as attempt #2.
>
> Attempt 4:
>
> Try urlencoding "$1" to avoid the whitespace problem:
>
> [[{{fullurl:Special:Foobar|arg={{urlencode:$1}}}}]]
>
> This fails because {{urlencode}} is evaluated before $1, so the 
> literal string "$1" gets urlencoded, rather than the expanded $1.
>
> Any other ideas? Or is this impossible?
>
> Thanks,
> DanB
>
> ---------------------
> Confidentiality note
> The information in this email and any attachment may contain 
> confidential and proprietary information of VistaPrint and/or its 
> affiliates and may be privileged or otherwise protected from 
> disclosure. If you are not the intended recipient, you are hereby 
> notified that any review, reliance or distribution by others or 
> forwarding without express permission is strictly prohibited and may 
> cause liability. In case you have received this message due to an 
> error in transmission, please notify the sender immediately and delete
this email and any attachment from your system.
> ---------------------
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l at lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l


---------------------
Confidentiality note
The information in this email and any attachment may contain confidential and proprietary information of VistaPrint and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, please notify the sender immediately and delete this email and any attachment from your system
---------------------



More information about the MediaWiki-l mailing list