bulding a open dictionary with Drupal: best approach?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
jacopo3001's picture

Hi all.
thanks to all the organizers of the last meetup, even thou unfortunately i had to leave earlier.

As i mentioned to Xiong during the meetup, i have a case i would like your guys help with:
I am trying to build a small open dictionary site, to let any user upload definition for any word.

it should work more or less like urbandictionary.com:

  • anyone can create a new word and input its definition
  • new word and its definition can created any time, regardless the word already existed in DB or not
  • all definition for the same word are listed together
    eg.:if 2 users input definition for the word LOVE, in the listings we'll display only 1 LOVE, but when click on it we can see both definitions
  • each definition should behave as a full node, as it should support taxonomy, comments, rating, etc

approach A
what urbandictionary apparently does is to create a completely new 'node' everytime somebody input a word, no matter if it existed before or not. so 2 entry of the word LOVE will be 2 completely independent objects, and then it will show them together just by creating custom view page.
this could be a fast way to implement it, but it could be a pain in longterm, as for all the search, sorting by popularity, tagging, by default drupal will act on each node individually, and not as a combination of the multiple entries.
so for example i want to sort words by popularity, where both LOVE and HATE have 3 definitions each.
when i sort by popularity, i'd mean sort the 2 words by the SUM of popularity of their definitions, and not sort the 6 definitions individually.
and similar problem would occur when doing searching or tagging.

approach B
another approach could be to create ONE node for Each word, and then append definitions to it.
so, the first user inputing a definition of LOVE will in fact generate a node LOVE.
if a second user try to input the same word, the system will look in DB, and if the word already exists it will just append the new definition to it. If not exist, it will create the new node.
problems of this approach:

  • i am not sure whether i can have taging, comment, rating on definitions in this case.
  • i am also not sure whether this is a good approach, as i cannot foreseen its problem

I know it's a very long post, and not very easy to understand at once.
but i hope somebody would be able to give it a thought, of course i would be willing to provide more details in case the above description is not clear enough..
anyway thanks everyone!

Comments

i am trying approach A,

jacopo3001's picture

i am trying approach A, using VIEWS and the predefined GLOSSARY view.
but i cannot group nodes with same title together, as I say here:
http://drupal.org/node/285368

anyone has an idea how to solve this?

ok, in understand you guys

jacopo3001's picture

ok, in understand you guys are not so worried about this issue. :)
anyway just for the sake of information i temporarily found a way to do this, as described in:
http://drupal.org/node/285368#comment-932229
Peace!

I may have another approach

hunvreus's picture

Hi jacopo, sorry for the late answer.

I actually thought a while ago about creating a dictionary and have a couple ideas on that precise matter. I think trying to do the way you want is going to require you a lot of painful actions to keep the overall glossary clean enough to be usable. You may think about using the revision system. Are you going to build a chinese/english dictionary?

--
Wiredcraft (http://wiredcraft.com) - Building Web and mobile solutions using Open Source technologies.

hi ronan, thanks for your

jacopo3001's picture

hi ronan, thanks for your reply.
i am actually working on a mono-language dictionary (only Spanish), where the whole idea is to keep it as free as possible, with multiple definition for the same term.

i think i managed so far to achieve what is was looking for only by using VIEWS.
for what concerns the approach i think i am well set.

right now i am stocked with some basics of Drupal, such as theme, hooks and others, due to my inexperience, nothing strictly relevant with the project itself.
A great help now would be to find a tutor to introduce me to drupal's basic, it's just taking me sooo long to try to figure out stuff myself.
do you know anyone who could be available for private tutoring, even in chinese?
thanks!
jacopo

hi ronan. i am still

jacopo3001's picture

hi ronan.
i am still struggling with my poor drupal skills, but somehow proceeding.
have you seen tubabel.com? they have very rich structure, eventhou it's only spanish, by working with same word in different countries they somehow deal with standard multi-lingual dictionary logics. check it out.

how about your dictionary? are you actually working on something, or it was just an idea? if you have a similar project it would be good if you good exchange some ideas about it.

Dictionary Module

kjv1611's picture

In case you're still thinking about this project, or put it on the backburner, I thought I'd mention a module I came across:
http://drupal.org/project/dictionary

If the above works as well as it does on the demo, it might give you just what you need. Then again, you may no longer care about it, since this post is now what 1 1/2 years old?

Shanghai

Group organizers

Group categories

Topic

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: