Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow querying from private wikis #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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