Hello, I'm a complete Drupal newbie, although I'm liking everything I've seen so far.

I'll try to formulate my question as clearly as possible, here's what I have in mind:

I wish to create a website where users are able to submit and review items. I know this much is possible right out of the box. But here's the twist: I would like to sort those items according to the number of reviews their author has made.

In other words, if you have contributed an item, you obviously wish for other people to review it. And to get more people to review it, you would like your item to float up in the page and show up first before other items. I want to make it so that the only way to do that, to make your item float up, is by reviewing other people's items. I'm hoping to create a positive loop where you have to review others in order to improve the chances of getting yourself reviewed.

Was this clear enough, did it make sense?

If this much was possible, nice-to-haves would be a drop down where you could complement your text reviews with a 1 to 5 star rating, a way to judge reviews by the number of characters used, block spam, etc etc.

But so far, do you think Drupal is the right way to go to create this system? And how hard do you think creating this in Drupal would be?

Thanks so much for any insights!

Marco

Comments

FableForge’s picture

Alright, let me tell you what I did.
I'm using the views module, extensively. I'm also using the userpoints module. And the profile module. And Video CCK (works beautifully, btw!)

However, "author userpoints" does not appear as a field at all when creating a new view. I noticed that profile fields do appear, so I hacked userpoints to maintain a copy of the user's points in the user's profile. That part works well.
So now finally I have an "author's userpoints" field when creating views, is just that it comes from the profile_values table instead of the userpoints table, but thats okay.
Remember: my goal is to create a view that sorts nodes by their author's points, descending.
So in the view maker, I made a view as follows:

Name: films_by_karma
Access: none checked
Description: (gave description)
Page
Provide Page View: Yes
URL: "films/karma"
View Type: Teaser
Title: "Films by Karma"
Use Pager: Yes
Breadcrumb Trail: No
Nodes Per Page: 10
(Nothing more in this section)
Block
Provide Block: Yes
View Type: Table
Title: "Films by Karma"
Nodes per Block: 10
More Link: Yes
(Nothing more in this section)
Fields
Node Title: | Label: Title | Handler: Normal | Option: As Link | Sortable: No | Default Sort: None
Author Name: | Label: Author | Sortable: No | Default Sort: None
Profile Weekly Karma Points: | Label: Author | Sortable: No | Default Sort: None
Embedded Video URL: | Label: (blank) | Handler: Do Not Group | Option: Thumbnail | Sortable: No | Default Sort: None

(notes: Embedded Video comes from the Video CCK module. And yup, I've tried using the Default Sort of the Weekly points instead of using Sort Criteria below. Neither method works).

Arguments
(None)

Filters
Node Type: Is "Film" (new content type I made, works fine)

Exposed Filters
(None)

Sort Criteria
Profile Weekly Karma Points: Descending

--------------

Thats it. Am I doing anything wrong? I have two problems: 1) It doesnt sort things correctly. Right now, the list I'm getting is obviously wrong:

Saturday Night Movie (1 min edit) reincarnut 80 See Video
Homework - Version 2 reincarnut 80 See Video
Camera Guy Marco 60 See Video
The Undying Memories (JoaG Ep 1) Marco 60 See Video
Driving Down Memory Lane (JoaG Ep 2) Marco 60 See Video
EVOLUTION OF A CRIMINAL BLOOPERS STEWIE Mach II 53 See Video
Mad Cool WA Section from My New film STEWIE Mach II 53 See Video
Horny Poodle Goals (IAFU-1) FableForge 335 See Video
Toodles (IAFU-2) FableForge 335 See Video
Vulnerability mbbarnett 20 See Video

See the 335 near the end? Shouldnt that be on top?

Problem number 2, is that clicking the "more" link leads to a page titled "Films by" (the "Karma" is missing, although its clearly written as page title), which is empty, it lists nothing.

Thank you for any help. I already tried clearing the views cache by using the button under "tools" in the views module UI.

Please let me know if I should copy paste this to another forum and I will. I really appreciate any help, I've wasted hours here, and its the core functionality of my site.

Thanks everyone,

Marco

So

FableForge’s picture

Okay, I think the problem is that the field I'm storing the points into inside the profile_values table is a text field instead of a number field.
Can anyone tell me how to turn that field into a number field? I'm almost there...

FableForge’s picture

I used the LPAD function of SQL to pad the value with zeros as its inserted into the table. That way, when the view sorts, even though its sorting alphabetically because its a string, the order is still correct because all "strings" have the same amount of characters in them.

If anyone would like to reply how to include the userpoints into a view field, that would make a whole lot of hacking unnecessary, so feel free to :)

Oh, and visit my site sometime, http://www.karmacritic.com - a community for serious filmmakers.