Skip to content

Conversation

tosfos
Copy link

@tosfos tosfos commented Oct 21, 2018

  • Code by WikiWorks

* Code by WikiWorks
@tosfos
Copy link
Author

tosfos commented Oct 21, 2018

This address enhancement issue #28

@tosfos
Copy link
Author

tosfos commented Oct 21, 2018

This patch works as is. It should be configured similar to:

$GLOBALS['smwgQuerySources'] = array(
    'somewiki' => 'SMWExternalAskQueryLookup',
);

$GLOBALS['seqlgExternalRepositoryEndpoints'] = array(
    'somewiki' => array(
        'http://somewiki.local/w/index.php/$1',
        'http://somewiki.local/w/api.php',
        true
    )
);

$GLOBALS['seqlgExternalRepositoryCredentials'] = array(
    'somewiki' => array(
        'username' => 'Admin@Remote',
        'password' => 'awdawda3ra34fs4faserfsefdasefsef'
    )
);

// Define constants for my additional namespaces.
define("NS_PROTECTED_QUERY", 3000);
define("NS_PROTECTED_QUERY_TALK", 3001);

// Add namespace
$wgExtraNamespaces[NS_PROTECTED_QUERY] = "ProtectedQuery";
$wgExtraNamespaces[NS_PROTECTED_QUERY_TALK] = "ProtectedQuery talk";

$GLOBALS['seqlgExternalQueryEnabledNamespaces'] = array(
    NS_PROTECTED_QUERY
);

@tosfos
Copy link
Author

tosfos commented Oct 21, 2018

SEQL.SMW3.diff.txt

... But in order to get the "enabled namespaces" feature working, the attached patch to SemanticMediaWiki (version 3) is required. The patch is based off of SMW commit b14c053 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant