Manual talk:Using custom namespaces/zh

From MediaWiki.org
Jump to navigation Jump to search

I have followed the guide to build an additional namespaces(PMO) in LocalSettings.php like below: define("NS_PMO", 100); define("NS_PMO_TALK", 101); $wgExtraNamespaces[NS_PMO] = "Pmo"; $wgExtraNamespaces[NS_PMO_TALK] = "Pmo_talk";

$wgNamespaceProtection[NS_PMO] = Array("readpmo", "editpmo", "movepmo"); $wgNamespacesWithSubpages[NS_PMO] = true; $wgGroupPermissions['*']['editpmo'] = false; $wgGroupPermissions['sysop']['editpmo'] = true; $wgGroupPermissions['sysop']['readpmo'] = true; $wgGroupPermissions['sysop']['movepmo'] = true;

then I moved one page(like page : test) into this namespace by using update SQL, I can search this page by typing: PMO:test, but I don't have the authorize to enter this page, it gives me below message: 权限错误 因为以下原因,你没有权限阅读本页: 不允许您执行您所请求的操作。

can anyone told me which part I was wrong? I have using the userid in sysop already like below: mysql> select a.user_name, b.* from user a, user_groups b where a.user_id = b.ug _user and a.user_name = 'XXadmin'; +------------+---------+------------+ | user_name | ug_user | ug_group | +------------+---------+------------+ | XXadmin | 1 | bureaucrat | | XXadmin | 1 | sysop | +------------+---------+------------+ 2 rows in set (0.00 sec)