bwanders / dokuwiki-strata

Strata - a Semi-Structured Data plugin for Dokuwiki
https://www.dokuwiki.org/plugin:strata
17 stars 8 forks source link

Scoped mode #55

Closed fkaag71 closed 2 years ago

fkaag71 commented 2 years ago

Dear Mr Wanders,

I have used your Strata plugin to improve a DokuWiki based tool that I use for risks analysis.

I needed some extra features, and implemented them the best I could:

I implemented them as well as I could with the attached changes.

The scoped mode relies upon a new "scope" column in the data table, that receives the namespace of the subject page. Depending upon the "scoped" configuration attribute, a filter on this column is added to the SELECT request.

The enumerated type is fully contained in the enum.php file. It displays the full text for a shorthand code or value, taking the replacement from a resource identified by the hint attribute. For example, Criterion [enum::params#criteria]: C displays as 'Confidentiality' since the Confidentiality: C entry exists in the params#criteria fragment.

At least for the scoped mode, I would be grateful if you could consider to include it into the plugin, rather that maintaining it on my own. I can probably handle the enum in a separate plugin if you think it is not relevant.

Strata delta.zip Strata diff.txt

Best regards, François KAAG

fkaag71 commented 2 years ago

EDIT - After writing this I realized that for the scoped mode I had a much simpler solution, that did not require to alter the data table, thus preserved immediate compatibility. Beside the additional configuration parameter, the only change is in the Triples helper where the scope is searched as the beginning of the graph name.

The only functional difference is actually an improvement, where a page in a namespace will be granted visibility to data in the namespace children. Strata delta2.zip

bwanders commented 2 years ago

Due to time constraints I am no longer able to maintain the set of Strata dokuwiki plugins. Which, unfortunately, has lead me to archive the repositories.

I'm sorry that your first experience on github is someone archiving the repository your wanted to contribute to. I hope this does not turn you away form contributing to other open source projects!