-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ideas Page #31
Comments
Sounds good, for point 4, I propose cookies + IP, since in some cases the IP is dynamic. (Specially in my country, My modem grabs a different IP any time it connects to the net) |
Ammending original comment. |
I propose a friendly way for reading routes. On config you have defined routes like: Module:Controller:Method, my propose is to distinguish module name and method in other way like: Module::Controller@Method. And for more complex controllers you can use a point to refer folder controllers. Example: Module::path.to.controller@method. I think, this way is more friendly readable. |
Hi Miguel, From a simple perspective there's no technical advantage on changing a ":" to a "@". This is syntax being re-used from the Symfony2 component library which is in our advantage to be consistent with. There may be a need for revising the syntax if a developer would like to use sub-controllers to further organise their /Controllers/ directory. However deviating from the globally known ":" syntax does seem disadvantageous. Regards,
|
Hi Everyone, The IP check would be easily bypassed via a proxy and cookies can be removed by the user. My opinion is that anonymous votes should not be allowed and that users who wish to contribute should create an account and vote that way. Opinions? |
I like @benthedesigner 's opinion, if anyone wants to contribute/vote, there's no harm for a 2 minutes registration form. |
@benthedesigner Good points. Lets roll this out, and then we can debate over making it secure and unique at the end. I have some things I can to achieve first, before I allow user registrations, that's why. Cheers :) |
Found a website similar to what we're looking to do: http://puu.sh/15Evn |
Purpose
The purpose of this page is to let users input their suggestions of what's missing in PPI, and let people vote on these ideas, similar to stack overflow, where the item with the most votes is at the top.
Implementation
The route for this should be at /ideas (
/modules/Application/resources/config/routes.yml
)This should be mapped to an Ideas controller (
Application/Controller/Ideas.php
)There should be an
ideas
database table containing fields.id, title, vote_score
3.1) There should be a Storage class to map to the
ideas
table named:Application/Storage/Ideas.php
3.2) Their should be an
Application\Entity\Idea
class to be returned by the above Storage classThe issue of duplication should be avoided, so we need to match on IP Address and cookie, thus a second database table is needed.
4.1) DB table named:
ideas_votes
with fields.id, idea_id, ip_address
this will let us determine if a user of a specific ip_address has already voted on thisidea_id
before.4.2) A cookie will be set on this named
ppi_idea_x
where X is the ID of the idea, this will let them still vote on multiple ideas.When someone is voting it will maintain the
ideas.vote_score
field, either incrementing or decrementing the value.5.1) When displaying the ideas a simple
ORDER BY ideas.vote_score DESC
will be enough to show ideas with the highest votes.The text was updated successfully, but these errors were encountered: