Forum:Links - spaces vs underscores

Is there any way to remake spaces into underscores? Let's say I have a template which says " ExampleWiki has more on ", and there are many new users who don't get this underscore thing who write for example "allen wrenches" as first parameter, and not "allen_wrenches", thus breaking the template and leaves "Example wiki has more on wrenches allen wrenches", linking to just "Allen". Is there any way to convert the spaces to underscores? Smiddle 17:36, 14 December 2006 (UTC)

Maybe you could do a any: interwiki link, with the URL http://$1 or something. Smiddle 17:40, 14 December 2006 (UTC)


 * Use the   parser function. metaWikipedia:Help:Magic words --Ciencia Al Poder ¿Algo que decir? 21:04, 14 December 2006 (UTC)


 * Also, you can use  ->   (see m:Help:Magic_words). --Splarka (talk) 03:14, 15 December 2006 (UTC)


 * I know about PAGENAMEE works when template is blank, and localurl works when linking to self. I'll try urlencode then. Thanks! Smiddle 16:41, 15 December 2006 (UTC)

Made it !
I just made a template that seems to work well with most wikis but not all. To works, they must have /wiki/ between the server name and the page name. It use magic word even though the page dont exist locally. The urlencode did not worked with most wikis i've tested it because the + seems to be a valid caracther there and is not replace by a space by the targetted wiki.

To see it, it's there : c:fr.3d:modèle:Interwiki (but it's in french). This thing might be good for wikis not linked many times. If you link often to a perticular wiki or if the wiki you want to link often is not metting the above requirement, the only solution is to ask for a real interwiki to be put in place. TulipVorlax 03:28, 6 October 2007 (UTC)


 * localurl is, intuitively, for local URLs (on the same wiki, so if the articlepath is /wiki/ then it will use that, locally)... Anyway, as said before, you can use plusses for spaces/underscores with the long ugly URL (plusses used in article names are then URL encoded). In such cases, urlencode works. --Splarka (talk) &lt;Staff&gt; 08:08, 6 October 2007 (UTC)


 * Oh yeah, right, ugly url... that has index.php? followed by parameters... i will note this on the talk of this template to remember to try it some day. Thanks for your patience. I can be slow learner at times. TulipVorlax 18:29, 6 October 2007 (UTC)
 * One more note, i've just replace underscores in the edit url of this page and it worked... Had to test... lol. TulipVorlax 18:32, 6 October 2007 (UTC)

Images, Spaces, and Underscores
I'm trying to do a template on the Remnants of Skystone wiki, and I'm getting problems with the enemy template. We need the template to pull the page name, and turn that into an image. We have this setup so far by using, but it does not want to get the names of pages with spaces correctly. The images have a underscore in them, but the page is calling an image with a space. I've been using but that doesn't work, and I've really been looking. Help! Angel14995 11:36, 25 November 2008 (UTC)