UESPWiki:Archive/CP Transparent Namespaces

Transparent Namespaces

The way UESP uses namespaces is pretty different from the standard wiki setup and it is, frankly, probably one of the bigger obstacles discouraging new readers and editors from using the site.  It's also an annoyance even for experienced editors... I wouldn't even want to estimate the amount of time I've spent typing "Oblivion" or fixing my "Oblivoin" and similar typos.  Last night it suddenly occurred to me, why should we have to type in namespaces all the time?  Why we can't we make UESP work more like Wikipedia?

No, I'm definitely not talking about reorganizing the entire site and abandoning namespaces as a way to organize information.  Instead what I'm suggesting is having the wiki software automatically fill in the namespace for readers and editors: 99% of the time the namespace you want is the one you're currently working in, so why not assume that unless specified otherwise?  There are two specific ideas that I've come up with:

Automatically add the current namespace to links when a page is edited.  Wiki software already expands links on pages. If you type in   on a page, save, then edit the page again, that link has been magically changed to  .  Why not do the exact same thing with namespaces?  Since we don't use the main namespace at all, a namespace-less link like   can safely be assumed to be a mistake.  So if you type in   on an Oblivion page (or an Oblivion talk page), the link would be automatically changed to  ; if it's on a Morrowind page, the same link would be changed to  .  Any links with a namespace would be left unchanged (   for example), and any links starting with ":" would be left unchanged (so to link to the main page, you'd type  ).

When the "Go" search button is used, automatically add the current namespace  Right now, if you type in Monsters in the the search box in the upper left corner and click "Go" you're always told that no such page exists and forced to look through a long search page.  But if someone is on an Oblivion page, the chances are that what they really wanted to type is Oblivion:Monsters, so why not make that guess and automatically open up , just like would happen on Wikipedia?  The Search part of the function wouldn't be changed at all, just the list of pages that it considers to be matches when "Go" is used.

Neither of these changes would be too difficult to implement.  Yes, it requires directly modifying the wiki's PHP code (which only Daveh can actually do).  But the amount of coding involved isn't much.  I've already worked out exactly what's needed for the first option, and even with a couple extra bells and whistles it's only six lines of code added to a single PHP function.

The only other "problem" I can foresee is that existing links to the main namespace would have to be changed at some point so they wouldn't be automatically converted next time the page is edited.  But there aren't too many such links.  For example, there are only 43 links on the entire site to our most popular page, namely  .  10 of those links are from the Oblivion namespace and wouldn't even need to be changed.  So 33 links would have to be changed from   to  .  Typing in 33 colons and in exchange saving myself from typing Oblivion a few thousand times seems like an easy tradeoff ;)  And external links to the site would be completely unaffected by the change, so there's no risk of breaking links elsewhere on the web.

Are there are any other problems that anyone can anticipate if these two changes are implemented?  Or is there anyone who thinks either one is a bad idea?  I definitely don't want to pursue making PHP-level changes to the wiki if anyone has concerns.  But it seems to me that the changes would be easy but dramatic improvements to the site for everyone who uses it.  Also, are there are any other ways in which namespaces are cumbersome that could potentially be fixed while we're at it?  --Nephele 12:50, 22 March 2007 (EDT)
:Wow, you think a lot. I'd say to try it on one area (perhaps just Oblivion) for a while, and then if all's well, implement this plan site-wide. That way, we know what's what about it. I still can't really picture it. Would we still be able to type everything out, if we wanted to?--Somercy 12:59, 22 March 2007 (EDT)

::It's actually easier to implement it everywhere at once; doing it in a more limited way would require different coding or additional coding.
::And yes, you'd still be able to type out full links if you wanted to.  Basically, anything (correctly) done right now would still work.  But now you'd have the option to not type the namespace part of a link if you don't want to.  And if a wikipedia user added a bunch of wikipedia-style edits to a page, those would all be automatically fixed instead of being added as red links.  --Nephele 13:16, 22 March 2007 (EDT)

:::My only objection is that you didn't think of this months ago. ;)  If I counted the number of times I've had to type out "Oblivon" or "Morrowind" for every link on every page I've ever worked on - Well, let's just say it would be a very large number.  Presumably, if we did this, those shortcut links in the Wiki markup box below the edit window would be rendered obsolete.  I've made extensive use of them, especially after I modified them to include the | symbol and save a step, but it's still an annoying extra mouse-move and click.  Only complication I can think of is if for whatever reason you actually WANTED to create a page in the Main namespace, there'd be no easy way to do it.  But there's so few pages in the Main namespace, and very little need for more, so it wouldn't be that big a problem. --TheRealLurlock   15:13, 22 March 2007 (EDT)

::::Well, if it's any consolation, I've probably typed "Oblivion" about the same number of times ;)  But you do have me beat on the "Morrowind" count.  The shortcuts in the markup box would still be occasionally useful, such as when creating a Tamriel link on an Oblivion page.  But you'd be using them a lot less often.
::::It would still be possible to create a page in the Main namespace.  Some methods (such as typing in a URL) would be completely unaffected.  For others, you'd just have to type one extra colon:
::::* If you create a red-link then follow it, add a colon. So type   to create a red-link, for example.  That'll work right now and will continue to work, completely unaltered by my new-fangled ideas.
::::* If you type in a name in the search box and hit Go, same idea.  Type ":Dragonfire Castle" and that will force the search to try to go to a main namespace page (that won't work right now, but it would be added as part of this modification).
::::So just like right now you need to add a colon to the front of Category links or Image links, you'd just do the same thing for main namespace links.  Hopefully that would be easy enough to remember for those who need to do it.  But it wouldn't generally be the first option presented to new editors.  Hmmm... unless they use the Go button on the Main Page... but if desired we could tweak that, too.  Either force some default namespace (e.g., Oblivion) when users use Go in the main namespace.  Or bypass the "You can create this page" if someone types, for example, "Dragonfire Castle" instead of ":Dragonfire Castle" again, only when starting from the main namespace.  I'm not sure which makes more sense and/or is less confusing... --Nephele 16:45, 22 March 2007 (EDT)

Y'know, redirects are cheap... why can't we just create forests of redirects, and dabs where needed? Alphax 22:05, 22 March 2007 (EDT)

:Well, redirects were my next idea... especially after the next wiki upgrade which will make redirects much more powerful.  I think there are several things that can be done with redirects to help make it much easier to find information.  But I see redirects as a tool that fundamentally work within the namespaces (i.e., a redirect from one Oblivion page to another) rather than as a tool that can somehow make namespaces less obvious.
:The whole reason for namespaces is to organize the information into different sections according to game.  For redirects to do what I've suggested above would require that every single page on the entire site would have to have a corresponding redirect page within the main namespace.  That would destroy the entire organizational system created by namespaces  (mentally I'm picturing taking a file cabinet and dumping all the contents on the floor).  Not to mention take forever: creating 15000+ redirects would take hundreds of hours.  I'd much rather have editors spending that time creating content instead of mindlessly creating empty redirect pages.
:For alot of pages, a redirect wouldn't even be possible.  For example, a main namespace "Thieves Guild": should it redirect to Oblivion:Thieves Guild or Morrowind:Thieves Guild or Tamriel:Thieves Guild or...?  The namespaces are there because there are many similarly named pages in each game that need to be distinguished somehow.
:Finally, even if someone did want to create 15000 redirects, in order to maintain the system and have it continue to be useful for more than a week, it would require that a new redirect would have to be created every time a new page was created.  It would be an endless process with editors constantly spending more time creating redirects than actually improving the site.  So I'd much rather spend a few hours tweaking the wiki software than trying to solve the namespace difficulties with redirects. --Nephele 22:53, 22 March 2007 (EDT)
::Ok, good too see that you've thought this through. Go forth and code! Alphax 02:13, 23 March 2007 (EDT)

At last, the changes proposed here have been implemented!  So feel free to start testing out the new features.

For editors, it means that when you're editing you can:
continue to add links to pages using previous formats, and just remain blissfully unaware that anything has changed
or, you can start using more wikipedia-like links.  So links like   or   are now possible!  The only catch is that you have to be working within the same namespace.  So if you're on an Oblivion page, those two links will work and be changed into   and  .  If in doubt, just use the preview feature and see whether your links are coming out as blue links or red links

For readers, it means that the "Go" button in the search feature is now much more likely to actually take you to the page you want.

This is all pretty new, so there may be a few wrinkles that will need to be ironed out.  One initial problem with in-page links getting messed up has now been fixed.  I'll also provide more detailed information on these changes as I get a chance (in particular, update the help pages).

If you notice any other new strange behaviours, please let me know! --Nephele  14:43, 20 May 2007 (EDT)

:Okay, one strange new behavior I don't much like - If you type something into the Search field from any of the special pages (most notably including ), and then hit Enter or the Go button, your search turns up zilch.  Do the same from any namespace and it works - e.g. search "Cheydinhal" from the Oblivion namespace, and it goes straight to .  Search it from any other namespace (including the Main namespace) and it goes to a search, with the Oblivion page on the top of the results.  But from special pages, this search doesn't work anymore.  Is there any way to get the site to treat searches from special pages the same as it treats searches from the Main namespace? --TheRealLurlock   12:38, 22 May 2007 (EDT)

:: Yes, I've been noticing this too. It shouldn't be too hard to get the Special namespace to work like the other namespaces. We should check that some of the other namespaces don't suffer from the same issue (Image, MediaWiki, etc...). -- Daveh 13:13, 22 May 2007 (EDT)

:::Image works, as do Category, UESPWiki, Template, General, and Help.  MediaWiki doesn't.  Just gives an empty page, without even an error message saying why your search didn't work.  Granted changes to Mediawiki pages are only for admins, and rather uncommon even then, so it's not as critical that this work in that case.  But the Special pages, particularly Recent Changes, are likely to be used by lots of people.  Another one that doesn't work is the User namespace.  That's another one that would be nice to fix if possible.  I didn't check all the Talk namespaces, but I assume they work the same as their respective pages?  Not sure.  --TheRealLurlock   15:06, 22 May 2007 (EDT)

::::Yep, I had noticed this problem, too, but it's not yet clear to me what to make the go button do on these pages.  In general, what's the best behaviour for the go button in all of the non-content namespaces?  Right now, for example, if you're on a UESPWiki page and type something into the search box, the modified search engine checks to see whether there is a UESPWiki page with that name (always after checking the main namespace).  But it seems unlikely to me that readers are really going to want search for a UESPWiki page.  So the options that occur to me are:
::::* a) Change Special/Mediawiki/User only so that the go button does what it originally did (check the main namespace for the entry then give up and show a search)
::::* b) Change Special/Mediawiki/User only so that the go button works like it now does on the main page (check the Oblivion namespace for the entry, then give up and show a search)
::::* c) Change all non-gamespaces to work the way the main page now does
::::* d) Change all non-gamespaces (except Special/Mediawiki/User) to search in that namespace first for a match, then check the Oblivion namespace for a match, then give up and show a search
::::* e) Make all the non-gamespaces do really comprehensive searches (go through Oblivion, Shivering, Morrowind, Bloodmoon, Tribunal, Tamriel, stopping when it finds a match).  Basically look everywhere to see if it can find a match before giving up.  
:::: Options a), b), and c) are really easy to implement.  d) and e) are just one step more difficult.  I'm inclined to think that e) is the best way to go.  And adding the code for e) would then make it really easy to do better gamespace searches too (e.g., on an Oblivion page, search Oblivion, Shivering, and Tamriel).  Or is that overkill? (It would take some extra CPU to do so much searching... although finding a page match would always save the really CPU-intensive final search through every article's text.) Would c) be completely adequate?  Any votes? --Nephele  23:24, 22 May 2007 (EDT)

:::::I'd be fine with any of those, though a) seems like the simplest and fairest to me.  I'm not sure I like the idea that Main Page searches always check Oblivion first, to be honest.  Maybe because I've been doing a lot of Morrowind work lately, but I think if you do a search on any concept that is common to multiple games, you should get search results that let you choose which game you're interested in, rather than having the site just assume you wanted the Oblivion page.  The site is called "The Unofficial Elder Scrolls Pages", not "The Unofficial Oblivion Pages", after all.  Thus, I'm not so hot about b), c), or d).  e) is a possibility, provided that it doesn't automatically go to the first one it finds if there happen to be more than one that match.  Otherwise, it'd be a purely subjective judgement call which namespaces take priority, and I disagree with that idea.  But really, any one of these solutions would be much better than the way it is now, with the searches simply turning up nothing. --TheRealLurlock   01:00, 23 May 2007 (EDT)

::::::I realize it is biased to choose one game over the other.  If you use the "go" feature on a given game-related page, the search always looks in that game's content.  And the search feature has not been changed here: if you click on "search" instead of "go" the search still uses the search preferences that you have set up and works the same way it always did.  The "search" button will give any reader the list of possible pages and full freedom to choose which one they want.  But the "go" button is set up to work differently from the search button, and is supposed to try to actually go straight to the requested page.
::::::A lot of users are going to start from the Main Page, and having "go" just check the main namespace leaves us with original situation: the "go" button basically never works for any new readers.  Instead of having the "go" feature work for nobody, I'd rather choose one namespace so that at least sometimes when readers on the main page use "go" they end up finding the page they're looking for.  And I chose Oblivion because it is by far the most heavily visited game (at least based upon a comparison of page access statistics for  vs ), and therefore that maximizes the odds that "go" is checking the game that a reader is interested in.  In other words, it wasn't a subjective decision to choose Oblivion but rather one based upon site statistics.
::::::My problem with option (a) is the same as my problem with the default option for the Main Page: why should the "go" feature basically be completely disabled on all Special/Mediawiki/User pages?  That situation is hardly different than the current situation.  Why not make it so that at least some of the time the feature works?  I'd rather be biased and help some readers than be fair and help no readers.
::::::Any option that checks more than one namespace will have to stop at the first page it finds.  The functions are all set up to exit as soon as a match is found; changing that would start to get ugly, waste a lot of CPU, and introduce a random element that I'm not really too comfortable with (if a reader uses the go feature one day to find a page, I think they should be able to expect that doing the same thing the next day takes them to the same page, instead of a different random page).
::::::Basically my idea with the "go" button has been to find ways to maximize the chances that a reader is taken to the page they're looking for when they hit "go".  The "search" button is always available for readers who want to see a list of options.   Or more experienced readers can make sure that "go" does what they want (use "go" from the right namespace, or spell out the namespace, e.g. "Morrowind:Seyda Neen").  Hopefully that logic makes some sense :) --Nephele  02:03, 23 May 2007 (EDT)

:::::::Here's my idea of the ideal way for this to work, not sure if it's technically possible, though.
:::::::#First, the system searches for any page title matches.
:::::::#If there is only one title match, it automatically goes there, regardless of current namespace.
:::::::#If there is more than one title match, but one of them is in the current namespace, automatically go there.
:::::::#If there are two title matches, but one of them is in the Tamriel namespace (and the user is not currently in the Tamriel namespace), automatically go to the other one.
:::::::#If there is more than one title match, but none is in the current namespace, run a search, showing the title-matches first and then text-matches.
:::::::#If there are no title-matches, just show a text-match search.
:::::::#If there are no title-matches OR text-matches, then go to the "Create a page" option - but with a caveat:
:::::::##If the user is in a content namespace (rather than a support namespace or the main namespace), have it choose to create a page in that namespace.
:::::::##If the user is not in a content namespace, change the message to suggest that they probably should be.
:::::::This would solve the problem of people creating pages in the Main namespace when they shouldn't be, as well as making searches pretty straightforward from anywhere on the site.  Even if you search a game-specific concept like "Cheydinhal" from the Main Page, you'll still go to , because there are no pages about Cheydinhal in any other namespace, except , which is an exception by rule #4.  But if you search a general concept like "Agility", you'll get a search that shows both  and  right at the top, and then text-matches below them. --TheRealLurlock   09:45, 23 May 2007 (EDT)

::::::::OK, I think I've got that coded up (although not forwarded to Daveh yet), with a few minor tweaks/differences:
::::::::* If you're in a content namespace, it's only going to check related namespaces (so a go to "Rare Items" from an Oblivion page will never take you to Morrowind:Rare_Items, and instead give you the option to create the page; but a go to "Dawnfang" will take you to Shivering:Dawnfang).
::::::::* I'm not tweaking the search page, so what happens if it falls through to using the search page will always be the same, default behaviour: a section of "Article title matches" (or "No page title matches") followed by a section of "Article text matches" (or "No page text matches").  The article title searches won't necessarily match the titles found by the "go" function.  The search page will show all matches in each namespace, not just best matches (e.g., do a search on "Creatures" and you get a lot of title matches).  Also the search page uses the reader's preferences, so for logged-in readers it will possibly check different namespaces than the "go" feature (Possible change: the go-to-any-gamespace list could be changed to only use gamespaces in the reader's current preferences).
::::::::* The "create a page" option comes up whenever the reader is in a content namespace (whether or not there are text-matches).
::::::::Does that sound like it's close enough to your ideal?  Using the reader's namespace search preferences is an idea that just came to me while I was typing this up; I'll rummage a bit more and see just how difficult that would be to incorporate.  --Nephele  13:49, 23 May 2007 (EDT)
:::::::::Sounds about right.  (I'm a bit busy this week and next which is why I'm slow to respond.)  Anyhow, any change would be an improvement on the current system, so I'll go along with that for now.  Would like to see what other posters think, though.  So far it's just been you and me discussing it, and I don't think either of us is exactly the "typical" user here... --TheRealLurlock   09:04, 24 May 2007 (EDT)