Onki module integrates Onki ontology services into Drupal taxonomies.
About Onki
The ONKI service contains Finnish and international ontologies, vocabularies and thesauri needed to publishing your content with support for linked data. Ontologies are conceptual models identifying the concepts of a domain. They contain machine "understandable" descriptions of the relations between the concepts.
ONKI is published and currently maintained by Semantic Computing Research Group SeCo. The Finnish Government is also involved in the development and future proofing - press release in Swedish, Finnish and English (Google translate).
Onki module
Onki Drupal module integrates Onki service with Drupal taxonomies. This way you can use Onki terms to describe (tag) desired content types.
Preparations
To set up ONKI module you have to have at least one content type (i.e. article) and a taxonomy (i.e. tags) configured in your system.
To create a content type browse to:
/admin/structure/types/add
To create a taxonomy browse to:
/admin/structure/taxonomy/add
To use this module you need to register an API key for Onki service. The API key is per IP address.
Install and configure
1. Download or clone ONKI module from Sandbox:
- git clone http://git.drupal.org/sandbox/teelmo/1596454.git onki
- http://drupal.org/sandbox/teelmo/1596454
2. Enable ONKI module:
- /admin/modules
3. Configure ONKI module's settings:
- /admin/config/content/onki
There are many settings options, but the example values provided work in most cases.
After you have set up all the settings you can try the service. If you attached Onki to the article content type you browse to:
- /node/add/article
You should see an Onki field which allows you to add new terms. The autocomplete feature should kick in when you start to type in your terms. If not, check your settings and specially your language and API key settings.
After you save your article you see the Onki URL, not the human-readable title. You can fix this by managing content type's display. So for example if you are using the article content type you browse to:
admin/structure/types/manage/article/display
where you can select "Onki field" as the format. You should do this for both default and teaser display modes.
Thats it! Congratz!
Other information
This module was developed & sponsored by svenska.yle.fi (part of Yle - Finnish Broadcasting Company). The developers are Teemo Tebest (Yleisradio) and Tomi Mikola (Wunderkraut). The module is currently used in production by Svenska Yle (Launch april 2012).
Onki module makes use of CSS3.
Project's sandbox page:
http://drupal.org/sandbox/teelmo/1596454
Git repository usage:
git clone teelmo@git.drupal.org:sandbox/teelmo/1596454.git onki
The above command should be run for example in your {drupal_root}/sites/all folder.
Drupal Version:
Drupal 7.x, tested with 7.17
Comment | File | Size | Author |
---|---|---|---|
#2 | Collapsed.png | 61.13 KB | igoen |
Comments
Comment #1
teelmo CreditAttribution: teelmo commentedComment #2
igoen CreditAttribution: igoen commentedHi,
I do automated project review, and there's many errors of coding style, you should check it in ventral.org.
And after I install it, there something collapsed. See screenshots.
Sorry I just review for layout, and for module work I'm still looking up.
( I'm also beginner in drupal.)
Comment #3
teelmo CreditAttribution: teelmo commentedThanks for the review.
I will look into these as soon as I have the time.
(I did the coding style check with coder module but I will look into that ventral.org too)
Comment #4
dman CreditAttribution: dman commentedI did a line-by-line visual and test review with teelmo @ drupalcon today.
The utility this provides is useful, appropriate, and leverages and provides a useful service. It's a good thing to have.
Suggested that exactly *what* it does and why you'd want it should be added to the top of the project page above the technical details. (screenshot or diagram?)
No direct conflict with other modules, but do compare with (and add a link to cross-reference to) web_taxonomy project which has a number of similarities thought the method and architecture is different.
* minor indentation cleanups recommended - todo
* an amount of redundant unused code (functions from earlier attempts & SOAP stuff) to remove (hook_install & the URI funcs).
* old 'features' inc files to remove.
* Configuration settings page - very good and clear.
* Proper use of Drupal APIs throughout : 90% (some DB queries could be DBTNG, but they are not wrong)
* No apparent security issues
* well structured, well commented code.
However
* didn't actually work on a fresh install. That should be fixed offline.
Make it *work* and get a clean report from Ventral, and I'd say the *code* review is done and it should be RTBC.
.dan.
Comment #5
teelmo CreditAttribution: teelmo commentedThx dman awesome!
I'll get on with these changes a soon I have the minute!
Comment #5.0
teelmo CreditAttribution: teelmo commentedClarifications
Comment #5.1
teelmo CreditAttribution: teelmo commentedCompletely rewrote the description. Made it clearer and more structured.
Comment #6
teelmo CreditAttribution: teelmo commentedMade Coder review and fixed some error regarding punctuation. Now returning:
Coder found 1 projects, 6 files, 0 warnings were flagged to be ignored
Also made a review in Ventral.org and fixed some more things based on it.
http://ventral.org/pareview/httpgitdrupalorgsandboxteelmo1596454git-7x-1x
Now both reviews say that the code is clean.
Also updated the documentation and installation instruction and fixed some bugs that caused a clean install to fail. Now tested that clean install works. Also removed the master branch and started using the version specific branch instead.
Comment #7
teelmo CreditAttribution: teelmo commentedDuplicate.
Comment #7.0
teelmo CreditAttribution: teelmo commentedAdded short description and changed h2 to h3.
Comment #7.1
teelmo CreditAttribution: teelmo commentedAdded Onki logo.
Comment #7.2
teelmo CreditAttribution: teelmo commentedAdded images.
Comment #7.3
teelmo CreditAttribution: teelmo commentedReadded images with smaller versions and links to full versions.
Comment #8
teelmo CreditAttribution: teelmo commentedNeeds someone to verify that clean install works and the module works.
Comment #9
mohs3n71 CreditAttribution: mohs3n71 commentedi think you should remove lines that you make them comment in development
like this one in line 141 in .module file
and also in line 191
it's better that you user @return to explain about return type and object of a function
for example in lines 526 to 531
if you fix theese your code is great
thank you ,
Mohsen
Comment #10
mohs3n71 CreditAttribution: mohs3n71 commentedComment #11
teelmo CreditAttribution: teelmo commentedI fixed those three things. Now committed to head. Changed status to review and tested by the community.
Comment #11.0
teelmo CreditAttribution: teelmo commentedUpdated git repository url. No longer master.
Comment #11.1
seiplax CreditAttribution: seiplax commentedImproved instructions
Comment #12
klausiDon't RTBC your own issues, see http://drupal.org/node/532400
We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #13
robinvdvleuten CreditAttribution: robinvdvleuten commentedThere are still some issues with the automated PAReview:
http://ventral.org/pareview/httpgitdrupalorgsandboxteelmo1596454git
Manual review:
Comment #14
teelmo CreditAttribution: teelmo commentedSorry about RTBC'n my own issue :|
Comment #14.0
teelmo CreditAttribution: teelmo commentedAdded sponsor info
Comment #15
teelmo CreditAttribution: teelmo commentedFixed the issues given by the automated PAReview. There were some CSS style's styling issues and couple of comment's styling issues. Also changed join() function calls to implode().
Comment #16
teelmo CreditAttribution: teelmo commentedChanging project status.
Comment #17
robinvdvleuten CreditAttribution: robinvdvleuten commentedHi,
I see that you have a 'onki.features.field.inc' file in your repo. What's the purpose of this file? I don't see any references to the features module or usage of this file.
Why do you set a status message after uninstalling your module? When the uninstallation process doesn't throw any errors, it is very obvious that it is correctly uninstalled.
If db_query is better than db_select is a point of discussion, but for now I do not see any real issues here after reviewing the query.
Comment #18
PA robot CreditAttribution: PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #19
jcalais CreditAttribution: jcalais commentedReopened after fixing the following:
* Unnecessary file removed
* Code cleaned to be compliant with ventral.org
* Drupal_set_message removed from uninstall hook
* Spelling errors fixed and comments cleaned
Comment #20
klausiReviewed this with jaysire at Drupalcon.
manual review:
Comment #21
jcalais CreditAttribution: jcalais commentedThanks for the help @ Drupalcon in Portland, Klausi! I've now addressed all the issues and cleaned up the module considerably. It should be ready for community testing now.
Comment #22
kscheirerIn onki_menu() you have
'access arguments' => array('create article content')
which doesn't really match up to your use case. Since Onki is a tags taxonomy, perhaps you could check to see if the user has permission to use/view that vocabulary instead? Or maybe create your own permission like klausi suggested?There's also a fair number of code style issues found at: http://ventral.org/pareview/httpgitdrupalorgsandboxteelmo1596454git.
The syntax issues are minor, but setting to needs work for the access issue. Otherwise this is RTBC from me.
----
Top Shelf Modules - Enterprise modules from the community for the community.
Comment #23
jcalais CreditAttribution: jcalais commentedThanks for looking at the module, kscheirer!
What is the best practice concerning custom permissions? Would it be ok to automatically grant these permissions to administrators from the install hook of the module or should it always only be the responsibility of the module user to decide who gets what permissions?
Comment #24
jcalais CreditAttribution: jcalais commentedI have addressed all of the coding style issues (except some comments split on several lines that still get warnings).
I've also created a custom permission "use ONKI" instead of using built in ones. The "use ONKI" permission is granted to administrators automatically in the module install hook. Sorry if this is against best practice.
Comment #25
kscheirerThanks! Using a custom permission and adding it to the admin role seems fine to me. There is a variable called
user_admin_role
that will give you the rid of the admin role - that's a little safer than querying for "administrator".----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #26
klausiI'll look at this now in the Project applications sprint
Comment #27
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
But otherwise looks good, so ...
Thanks for your contribution, jaysire!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #28.0
(not verified) CreditAttribution: commentedAdded a notice about CSS3
Comment #29
seiplax CreditAttribution: seiplax commentedThe full project for Onki (ontology service now called Finto) can be found at https://drupal.org/project/onki