| Project: | Drupal.org Project applications |
| Component: | module |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
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



Comments
#1
#2
Hi,
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.)
#3
Thanks 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)
#4
I 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.
#5
Thx dman awesome!
I'll get on with these changes a soon I have the minute!
#6
Made 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.
#7
Duplicate.
#8
Needs someone to verify that clean install works and the module works.
#9
i think you should remove lines that you make them comment in development
like this one in line 141 in .module file
// '#required' => TRUE,and also in line 191
// $matches["<create>$tags"] = t($string, array('%term' => $tags));it's better that you user @return to explain about return type and object of a function
for example in lines 526 to 531
/*** Helper function for testing Onki service.
*
* Helper function to test if ONKI service is up and runnig or not.
* Return TRUE if ONKI is running and FALSE if a timeout occurs.
*/
if you fix theese your code is great
thank you ,
Mohsen
#10
#11
I fixed those three things. Now committed to head. Changed status to review and tested by the community.
#12
Don'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 :-)
#13
There are still some issues with the automated PAReview:
http://ventral.org/pareview/httpgitdrupalorgsandboxteelmo1596454git
Manual review:
#14
Sorry about RTBC'n my own issue :|
#15
Fixed 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().
#16
Changing project status.
#17
Hi,
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.
#18
Closing 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.
#19
Reopened 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
#20
Reviewed this with jaysire at Drupalcon.
manual review: