From: Carl Y. <cy...@cs...> - 2009-11-05 13:46:24
|
Hello Gu, Thanks so much for your help! We will give this a try. Kind regards, Carl -----Original Message----- From: Günther Zehetner [mailto:zeh...@mo...] Sent: Thursday, November 05, 2009 7:15 PM To: joe...@gm...; cy...@cs... Cc: how...@cs...; jam...@cs...; sem...@li... Subject: Re: [Semediawiki-user] Question about Namespace ID Hi, I use namespaces above 200 without problems with SMW. Below I copied all the lines in Localsettings.php which I have and which are related to the extra namespaces. Hopefully it helps. global $wgExtraNamespaces; if (!is_array($wgExtraNamespaces)) { $wgExtraNamespaces=array(); } $wgExtraNamespaces = $wgExtraNamespaces + array(200 => "Human", 201 => "Human_talk", 202 => "Mouse", 203 => "Mouse_talk", 204 => "Rat", 205 => "Rat_talk", 206 => "Anopheles", 207 => "Anopheles_talk", 208 => "Plasmodium", 209 => "Plasmodium_talk" ); $wgNamespaceAliases = array( 'Hs' => 200, 'H.sapiens' => 200, 'Homo_sapiens' => 200, 'Mm' => 202, 'M.musculus' => 202, 'Mus_musculus' => 202, 'Rn' => 204, 'R.norvegicus' => 204, 'Rattus_norvegicus' => 204, 'Ag' => 206, 'A.gambiae' => 206, 'Anopheles_gambiae' => 206, 'Pf' => 208, 'P.falciparum' => 208, 'Plasmodium_falciparum' => 208, 'Malaria' => 208 ); global $smwgNamespacesWithSemanticLinks; $smwgNamespacesWithSemanticLinks[NS_TALK] = true; $smwgNamespacesWithSemanticLinks[200] = true; $smwgNamespacesWithSemanticLinks[201] = true; $smwgNamespacesWithSemanticLinks[202] = true; $smwgNamespacesWithSemanticLinks[203] = true; $smwgNamespacesWithSemanticLinks[204] = true; $smwgNamespacesWithSemanticLinks[205] = true; $smwgNamespacesWithSemanticLinks[206] = true; $smwgNamespacesWithSemanticLinks[207] = true; $smwgNamespacesWithSemanticLinks[208] = true; $smwgNamespacesWithSemanticLinks[209] = true; global $smwgQDefaultNamespaces; $smwgQDefaultNamespaces = NULL; Cheers, Gu --- On Thu, 11/5/09, Carl Yao <cy...@cs...> wrote: > From: Carl Yao <cy...@cs...> > Subject: Re: [Semediawiki-user] Question about Namespace ID > To: joe...@gm... > Cc: how...@cs..., jam...@cs..., > sem...@li... > Date: Thursday, November 5, 2009, 2:56 AM Hello Joel, > > Thanks for all your help. Do you know if anyone has had success with > SMW queries with custom namespaces having IDs above 200? > > Kind regards, > Carl > > -----Original Message----- > From: Joel Natividad [mailto:joe...@gm...] > > Sent: Wednesday, November 04, 2009 11:49 PM > To: cy...@cs... > Cc: sem...@li... > Subject: Re: [Semediawiki-user] Question about Namespace ID > > Hhhmmm... strange. You may want to run SMW_refreshData.php in > extensions/SemanticMediawiki/maintenance and test your queries again. > > Betst, > Joel > > ======================================================= > jo...@na... > * wir...@na... > Think Different! > (http://en.wikipedia.org/wiki/Think_different#Text) > Imagine Different! (http://www.youtube.com/watch?v=H5tOgRD4EqY) > > > > On Wed, Nov 4, 2009 at 10:05 AM, Carl Yao <cy...@cs...> > wrote: > > Hello Joel, > > > > Yes, those links were set in Localsettings.php too. > > > > Thanks, > > Carl > > > > -----Original Message----- > > From: Joel Natividad [mailto:joe...@gm...] > > Sent: Wednesday, November 04, 2009 11:01 PM > > To: cy...@cs... > > Cc: sem...@li... > > Subject: Re: [Semediawiki-user] Question about > Namespace ID > > > > Carl, > > To confirm, you do have something like this in > LocalSettings, right? > > > > $smwgNamespacesWithSemanticLinks[NS_DE2] = true; > > $smwgNamespacesWithSemanticLinks[NS_DE2_TALK] = true; > > > > Joel > > > > > > On Wed, Nov 4, 2009 at 1:58 AM, Carl Yao <cy...@cs...> > wrote: > >> Hello Joe, > >> > >> Thanks for so much for your help. We did adjust > >> $smwgNamespacesWithSemanticLinks to include our > custom namespace. > >> However it still did not show any SMW query > results. > >> > >> Here are the namespace code we have in > Localsettings.php. > >> > >> $smwgNamespaceIndex = 998; > >> > include_once("$IP/extensions/SemanticMediaWiki/includes/SMW_Settings. > >> p > >> hp"); > >> enableSemantics('192.168.20.72'); > >> > include_once("$IP/extensions/SemanticForms/includes/SF_Settings.php") > >> ; > >> > >> We have the following for defining custom > namespace as well: > >> > >> define("NS_DE2", 1020); > >> define("NS_DE2_TALK", 1021); > >> $wgExtraNamespaces[NS_DE2] = "DE2"; $wgExtraNamespaces[NS_DE2_TALK] > >> = "DE2_talk"; > >> > >> Thanks again for your help! > >> Carl > >> > >> _____ > >> > >> From: Joel Natividad [mailto:joe...@gm...] > >> Sent: Wednesday, November 04, 2009 2:34 PM > >> To: cy...@cs... > >> Subject: Re: [Semediawiki-user] Question about > Namespace ID > >> > >> > >> Carl, > >> Be sure to adjust $smwgNamespacesWithSemanticLinks > > >> <http://semantic-mediawiki.org/wiki/Help:Configuration#smwgNamespac > >> es > >> W > >> ithSem > >> anticLinks> in LocalSettings.php > appropriately to include your > >> anticLinks> custom > >> namespaces. > >> > >> > >> See http://semantic-mediawiki.org/wiki/Help:Configuration > >> > >> Hope this helps, > >> Joel > >> > >> On Nov 3, 2009, at 9:21 AM, Carl Yao wrote: > >> > >> > >> Hello Evan, > >> > >> Thanks a lot for your response. This issue is > really with Semantic > >> Mediawiki extension. Yes, we have defined the > namespaces with IDs > >> 1000 and above correctly. All other extensions are > working fine these > >> custom namespaces except the queries with Semantic > Mediawiki which > >> don't > > produce any results. > >> > >> Thanks again for your help! > >> Carl > >> > >> _____ > >> > >> From: Evan Shaw [mailto:chi...@gm...] > >> Sent: Tuesday, November 03, 2009 10:12 PM > >> To: Jerry Wang > >> Cc: sem...@li...; > cy...@cs... > >> Subject: Re: [Semediawiki-user] Question about > Namespace ID > >> > >> > >> Jerry, > >> > >> > >> > >> $wgExtraNamespaces[1,000] = "Foo"; > >> $wgExtraNamespaces[1,001] = "Foo_talk"; > >> > >> > >> > >> Did you actually include the commas in the > numbers? If so, that's > >> your problem. As long as you're using a version of > MediaWiki that's > >> later than 1.5, the maximum namespace ID is a > 16-bit number, so 1000 > >> and > >> 1001 are well below the maximum. > >> > >> I hope that helps. > >> > >> - Evan > >> > >> > >> > --------------------------------------------------------------------- > >> - > >> ------ > >> -- > >> Let Crystal Reports handle the reporting - Free > Crystal Reports 2008 > >> 30-Day trial. Simplify your report design, > integration and deployment > >> - and focus on what you do best, core application > coding. Discover > >> what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july > >> _______________________________________________ > >> Semediawiki-user mailing list > >> Sem...@li... > >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > >> > >> > >> > >> -- > >> Joel Natividad > >> jo...@na... > >> Think > >> <http://web.archive.org/web/20010228171255/www.apple.com/thinkdiffe > >> re n t/> Different <http://www.youtube.com/watch?v=4oAB83Z1ydE> ! > >> > >> > >> > >> > --------------------------------------------------------------------- > >> - > >> -------- Let Crystal Reports handle the reporting > - Free Crystal > >> Reports 2008 30-Day trial. Simplify your report > design, integration > >> and deployment - and focus on what you do best, > core application > >> coding. Discover what's new with Crystal Reports > now. > >> http://p.sf.net/sfu/bobj-july > >> _______________________________________________ > >> Semediawiki-user mailing list > >> Sem...@li... > >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > >> > > > > > > > ---------------------------------------------------------------------- > > -------- Let Crystal Reports handle the reporting - > Free Crystal > > Reports 2008 30-Day trial. Simplify your report > design, integration > > and deployment - and focus on what you do best, core > application > > coding. Discover what's new with Crystal Reports now. > > > http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Semediawiki-user mailing list > > Sem...@li... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > > > > ---------------------------------------------------------------------- > -------- Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day trial. Simplify your report design, integration > and deployment - and focus on what you do best, core application > coding. Discover what's new with Crystal Reports now. > http://p.sf.net/sfu/bobj-july > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |