Last modified: 2011-03-13 18:06:48 UTC
Hi! I implemented a template {{vikivar||}} wich will allow to link between "mirrored pages" at http://test.leuksman.com/index.php/ and http://jadesukka.homelinux.org:8180/betawiki. The main application is to test wiki code in different wikis and to provide portability of the code: Both http://test.leuksman.com/index.php/FiverAlpha:Portability and http://jadesukka.homelinux.org:8180/betawiki/Betawiki:Portability share the same code and have a line '''Mirrors:''' Nuka-Wiki|FiverAlpha . Following that link you can swich between wikis. The "..." provides a list with other "mirrored pages". After some hours of generating http://test.leuksman.com/index.php?title=Template:VIKIVAKI/all all the requested functionality for http://jadesukka.homelinux.org:8180/betawiki/Malline:VIKIVAKI/all could be "migrated" in 30 min (these are 34 objects). One problem is the fact that namespaces are translated and the other the complexity of the nested templates to overcome the lack of variable GENERICNAMESPACE. At Nuka-Wiki [[leuksman:{{NAMESPACE}}:foo]] in a template will NOT generate [[leuksman:Template:foo]] at some may beleive, it IS the equivalent of [[leuksman:Malline:foo]] in the article namespace. Same for [[leuksman:{{NAMESPACE}}:foo]] in a page in the in the project namespace will NOT generate [[leuksman:FiverAlpha:foo]] at some may beleive, it IS the equivalent of [[leuksman:Betawiki:foo]] etc. A variable GENERICNAMESPACE would simplify the code. The number of objects would decrease from 34 to 1. Benefits: Please follow the MIRRORS links at http://jadesukka.homelinux.org:8180/betawiki/Betawiki:Templates/Template:Signed and back (project namespace) http://test.leuksman.com/index.php?title=Template:VIKIVAKI/all and back (Template namespace) http://test.leuksman.com/index.php/Template_talk:Signed and back (Template talk namespace) I mainly started this "portability issues" because I noticed discrepancies between the test environments at http://test.leuksman.com/index.php/Template:Templates and http://jadesukka.homelinux.org:8180/betawiki/Malline:Templates . These pages do NOT share the same wiki code so far. I found some valuable turanrounds to overcome breaking the table. Best regards Reinhardt [[user:gangleri]]
*note* {{GENERICNAMESPACE}} should return 10 digit numbers as namespace is an 'int' field now, so in theory probably 2^31-1 is the maximum namespace value. 2^31-1 is 2.147.483.647 Example: {{GENERICNAMESPACE}} should return 0000000002 for {{ns:user}} regards reinhardt [[user:gangleri]]
That doesn't make any sense. Zero-padding to the theoretical maximum is useless and makes things hard to read for no reason.
(In reply to comment #2) > That doesn't make any sense. Zero-padding to the theoretical maximum is useless > and makes things hard to read for no reason. The main reason for the request from comment 1 was to be able to have a kind of ordering as you can see at http://test.leuksman.com/view/Special:Allpages/GENERIC?namespace=10 .
More aggravating template junk, closing WONTFIX.
A similar request for {{ns}} can be found at bug 1924 comment 71 Bug 1924: Restricted read access for subset of wiki
(In reply to comment #4) > More aggravating template junk, closing WONTFIX. Hi Brion! Knowledge about {{CANONICALNAMESPACE}} and {{CANONICALNAMESPACEE}} are fundamental for linking to pages with identical page names names from namespaces as MediaWiki, Special, from a wiki in an arbitrary language to a wiki in another arbitrary langauge inside templates or MediaWiki messages. Please reconsider your opinion about this topic. Thanks!
You already know the canonical namespace names. They can be seen in the code.