Auto add vote on user submission
whatever1 - June 1, 2007 - 22:11
| Project: | DrupalIt |
| Version: | 5.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Is there any way to make this module auto vote when a user submits a story/node/link etc, i.e If I submit a story that story automatically gets one vote?

#1
Yes it is, but not now cause I don't consider it fair to vote your own node, but if you really wanna do it you can after submitting it ;), it only takes one click.
#2
Thanks for the Reply, I just think if you are submitting a story surely you are voting for it as well. I know what you mean by doing it after it has been submitted. The problem I have is if you use my bookmarklet then you don't get the same page where you can do this. Therefore some of the stories aren't getting voted on and they are not showing until I go in and add a vote. Is there any way you can tell me how I can implement this on my site, I understand if you don't want to add it as a standard feature but i could really do with it. Even if I can make the default setting 1 vote instead of 0.
Cheers
Dan
#3
If you know any php programming, just look in the module where I set the votes to 0 and change that to 1.
#4
Hi there,
I am not that good with php. I have looked but am unable to find where I must change the code. Would it be possible for you to send me the instructions or post them here for me.
Thanks
#5
Hit There,
Just wondering if someone could give me an update.
Thanks
#6
We needed the same kind of function so I added a small module to our system. Documented here:
http://drupal.org/node/176560
Just tweak for content types and score you want to add.
YMMV, but enjoy.
#7
You really don't need a module to accomplish this. Simply look for this line in the file "drupalit.module":
$data['votes'] = ($votes_data) ? $votes_data->votes : '0';
and change it to
$data['votes'] = ($votes_data) ? $votes_data->votes : '1';
#8
I would argue one does need a module for this, otherwise when you update the drupalit module your code change will be lost. Dunno about anyone else but I'd prefer not to have to remember tweaks made to core/modules and re-do them during an upgrade.