I have some taxonomy terms that would benefit from being (at least in part) being based on wikipedia articles.

It looks possible to make a request via the wikipedia api in PHP, and then link that to my Term via Computed fields, but to make the initial request I need to relate the restful query to the term. I found something similar, but I have no idea how to make this work in my example...

Is there a module out there that would let me run a prefixsearch query to show autocomplete options while typing in the term name on the 'add new term' page, and then autopopulate using a parse query?

Is no module how would I go about coding this up? I don't have any PHP knowledge but it looks like it wouldn't be too hard to do.


To create your own autocomplete callback, you can see Textfield that uses autocomplete which shows a custom autocomplete.

Since all the data is stored of site though, you can save some time and load by implementing it client, since the user must rely on javascript anyway.

Managing JavaScript in Drupal 7 shows how to add the javascript to your site.

I'm not aware of any module, or even php/js library, that does all the wikipedia integration. If you go with the PHP option, you'll probably be interested in Guzzle. When I tried last, it was complicated to integrate composer packages with Drupal 7 though, but it looks like the situation may have improved through Composer manager.

|improve this answer|||||

The Puzzler module integrates with Wikipedia API. You might be able to use its PHP function puzzler_wikipedia() to retrieve just the piece of content that you need.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.