TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 194
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 172
  • Total: 172

Vote = Karma Question

Started by Sledge, May 19, 2006, 04:44:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sledge

I know this is an SMF question, and I have a post on their board about it but so far no one has replied. I thought I'd ask here, maybe it's something simple to do.

I'm trying to mod my SMF so whenever someone votes in a poll, their karma gets bumped up one. I see the poll feature in SSI.php, and I've disected karma.php, but I don't know enough about coding to edit what I need to edit to get this to work. Is there anyone who can help?

Xarcell

Don't you think people would abuse thier karma this way?

People could create polls, and then vote on them. Unnesscary polls...

If you disable polls for a board, then you can't create one either. I like teh overall idea, but I think it would create more modding than you think to keep it from being abused.

EDIT: actually I just did some experimenting. You could change a board to "reply only", and the admin/moderator can still post polls.

Xarcell

I would like to get my hands on this mod as well.

Sledge

Quote from: Xarcell on May 19, 2006, 04:53:37 PM
Don't you think people would abuse thier karma this way?

People could create polls, and then vote on them. Unnesscary polls...

If you disable polls for a board, then you can't create one either. I like teh overall idea, but I think it would create more modding than you think to keep it from being abused.

EDIT: actually I just did some experimenting. You could change a board to "reply only", and the admin/moderator can still post polls.

My site is a political polling and debate site and I intend to reward users for participating in polls by giving them "Political Capital (karma)" for each vote. Users can't award each other karma, and yes, I'll have the permission for posting polls turned off for regular users. The Political Capital can be cashed to enter drawings for prizes, etc.

Sledge

Got it. The folks at SMF were very helpful. Here's what we did, if anyone else is interested:

Quote from: mytreo on May 20, 2006, 01:11:13 AM
For SMF 1.1 [and 1.0.7] see line 184 in Poll.php

Add this....

// Change by one.
updateMemberData($ID_MEMBER, array('karmaGood' => '+'));


Before this....

// Return to the post...
redirectexit('topic=' . $topic . '.' . $_REQUEST['start']);


I haven't tested this. It may not even work, but if it doesn't then it's probably just an include file missing which is easily fixed.

Chris

:up:

This website is proudly hosted on Crocweb Cloud Website Hosting.