Template talk:BadgeHunter Badge

From Homecoming Wiki
Revision as of 15:20, 8 June 2007 by imported>Konoko (historical)
Jump to navigation Jump to search

TEst


Easy Template

Right now the template requires the use of the Badge-Hunter ID associated with a given badge. This puts a higher burden of work on anyone attempting to add new badges or standards existing articles.

For some time, the view_badges.php page at badge-hunter.com has had the ability to display badges based on id OR badge name. For wiki, I added code to handle the " Badge" that would be appended to any search based on article name. However, when I tried to edit the template to utilize this feature, I ran up against a wall - the spaces in the article name broke what I was trying to do.

Here is what I tried:

What it should look like is:

Is there a way to adjust the template so that the spaces are properly included/encoded?

Sapph 08:08, 8 June 2007 (EDT)

I thought there was a 'system' variable, similar to {{PAGENAME}} and {{TOC}} that was effectively PAGENAME formatted for URLs. Searching Media Wiki now. --Konoko 10:51, 8 June 2007 (EDT)\
Oh, I see. Badgehunter can use the badge name without the " Badge" at the end (like you said above). Trouble is trying to remove that spacebadge from the end but not any badges that have spaces in their names, like Man in Black. If you can get the PAGENAME or PAGENAMEE to have underscores instead of spaces, then you can link the article name without _Badge on the end. Alternitavely, convince Tony to install http://meta.wikimedia.org/wiki/StringFunctions so that we can use sections of a string (PAGENAME in this case) without the " Badge" on the end. Another fix I'd like to see is the use of Namespaces. Instead of Man in Black Badge, it'd be Badge:Man in Black. Like my slash commands, instead of team (Slash Command) it'd be Slash Command:team. That way PAGENAME would be "Man in Black" and "team" respectively, instead of PAGENAME being "Man in Black Badge" and "Team (Slash Command)". (and for slash commands would have the added bonus of not interfering with articles about things in game and their related slash command, like supergroup and supergroup (Slash Command).) --Konoko 11:20, 8 June 2007 (EDT)

http://www.badge-hunter.com/view_badges.php?name=Man%20in%20Black http://www.badge-hunter.com/view_badges.php?name=Man_in_Black