How do I get access to SMW constants like SMW_NS_PROPERTY in 3rd party extension?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I get access to SMW constants like SMW_NS_PROPERTY in 3rd party extension?

Samuel Lampa-4
Question:

How do I get access to SMW constants like SMW_NS_PROPERTY in my extension?


More details:

I'm trying to make the use of title namespaces (such as 'Property:' and
'Category:') in RDFIO internationalized. It seems I should use

Title::makeTitleSafe( $ns, $title )

... but in for $ns, it seems I need access to the SMW_NS_PROPERTY and
SMW_NS_CATEGORY constants.

Best
// Samuel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: How do I get access to SMW constants like SMW_NS_PROPERTY in 3rd party extension?

Samuel Lampa-4
On 2017-07-27 16:08, Samuel Lampa wrote:
> Question:
>
> How do I get access to SMW constants like SMW_NS_PROPERTY in my
> extension?

I mean, it seems that some class from SMW has to be initialized somehow
in my extension?

I'm trying to study other 3rd party extensions like PageForms to see how
this is done, but haven't found the clue just yet.

Best
// Samuel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

[SOLVED] Re: How do I get access to SMW constants like SMW_NS_PROPERTY in 3rd party extension?

Samuel Lampa-4
In reply to this post by Samuel Lampa-4
Never mind.

The constants are available without any special hoops.

I was confused because category should be NS_CATEGORY, not SMW_NS_CATEGORY.

:")

// S

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user