[MODDB] Poll Vote Reminder

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

[MODDB] Poll Vote Reminder

Post by mtrs »

Modification Name: Poll Vote Reminder
Author: mtrs

Modification Description: Sets compulsory to vote topics at ACP, and redirects users to vote those topics. Also, one can add one topic to redirect for force reading once.

Modification Version: 1.0.0

Modification Download: Poll Vote Reminder

Features:
  • ACP control module to add compulsory polls
  • Remind all users to vote in compulsory topics
  • One once force read redirect topic add feature
  • List and see compulsory polls and who voted list at ACP module
  • User permission to ignore compulsory polls
ACP screenshot:

ACP -> Posting -> Poll vote reminder
Image

*****************
Made upon request in this topic.
Last edited by mtrs on Sat Sep 26, 2009 9:07 am, edited 12 times in total.
I abandoned all of my mods.
updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by updown »

Great! Again an other useful mtrs-MOD - Thanks!
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by ChriZathens »

Heh....
Nice idea... Sometimes users are yelling for a poll in order for us to decide what to do about eg an event, but after you create the vote they don't vote... :roll:
Let's see now if they will do this again... :twisted:
Lollll
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...
ddaddy
Registered User
Posts: 100
Joined: Sun Dec 21, 2008 6:24 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by ddaddy »

Will it allow only 1 vote/post across the whole board to be forced?

Can we mayber have a setting when setting up the poll for it to be a forced poll?

Many Thanks
ddaddy
Registered User
Posts: 100
Joined: Sun Dec 21, 2008 6:24 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by ddaddy »

I've just stalled this, and I dont have the setting in the acp :-(

I can see the button under resync section, but ACP -> General -> Load Settings -> ?
I have no 'Posting' under Load Settings!
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by mtrs »

ddaddy wrote:ACP -> General -> Load Settings -> ?
Sorry for the packaging mistake, :oops:
that should be
ACP -> General -> Post Settings -> Posting
Last edited by mtrs on Tue Jun 23, 2009 5:25 pm, edited 2 times in total.
I abandoned all of my mods.
ddaddy
Registered User
Posts: 100
Joined: Sun Dec 21, 2008 6:24 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by ddaddy »

Found it :-)

Its under ACP --> Board Configuration --> Post Settings --> Posting

Cheers for this dude.
ddaddy
Registered User
Posts: 100
Joined: Sun Dec 21, 2008 6:24 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by ddaddy »

Sorry, 1 more question.

Do you think this will work with this questionnaire mod?
http://www.phpbb.com/mods/db/index.php? ... ib_id=3129
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by mtrs »

It should work but, you need to change sql query.
The principle of this mod is running an sql query on POLL_VOTES_TABLE, and learning if user user voted in the topic ID entered at ACP.
If user has already voted, USERS_TABLE is set and mod disabled for that user.
if not, user will be redirected to poll topic to vote.

So, you should change the query for the relevant tables if tabulated surveys are filled or not.
I abandoned all of my mods.
ddaddy
Registered User
Posts: 100
Joined: Sun Dec 21, 2008 6:24 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by ddaddy »

Many Thanks mtrs, I'm sure I can do that.

I'll be installing the questionnaire mod tomorrow, so will let you know how it goes.

Thanks
ddaddy
Registered User
Posts: 100
Joined: Sun Dec 21, 2008 6:24 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by ddaddy »

mtrs, which file would I need to modify the sql query in?

Cheers
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by mtrs »

includes/functions_vote_reminder.php
I abandoned all of my mods.
ddaddy
Registered User
Posts: 100
Joined: Sun Dec 21, 2008 6:24 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by ddaddy »

Thanks, maybe if you dont mind you can help me a little as i'm not very good with the phpbb/mysql coding?

I can see how this mod works, and also how the questionnaire mod works.
This MOD can see if a users voted by looking for their userid in the poll table where the poll has the relevant topicid.

Code: Select all

$sql = 'SELECT poll_option_id
FROM ' . POLL_VOTES_TABLE . '
WHERE topic_id = ' . $topic_id . '
AND vote_user_id = ' . $user->data['user_id'];
With the questionnaire MOD, i'd have to check the table _survey to get survey_id where topic_id= $topic_id
Then look in table _survey_answers for the user_id where survey_id=(surveyid from above).

I'm just not sure how to get the survey_id into a variable, so I can query the results.

Many Thanks
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by mtrs »

ddaddy wrote:Thanks, maybe if you dont mind you can help me a little as i'm not very good with the phpbb/mysql coding?

I can see how this mod works, and also how the questionnaire mod works.
This MOD can see if a users voted by looking for their userid in the poll table where the poll has the relevant topicid.

Code: Select all

$sql = 'SELECT poll_option_id
FROM ' . POLL_VOTES_TABLE . '
WHERE topic_id = ' . $topic_id . '
AND vote_user_id = ' . $user->data['user_id'];
With the questionnaire MOD, i'd have to check the table _survey to get survey_id where topic_id= $topic_id
Then look in table _survey_answers for the user_id where survey_id=(surveyid from above).

I'm just not sure how to get the survey_id into a variable, so I can query the results.

Many Thanks

Code: Select all

$survey_id = $topic_id;//Since you look for survey_id, change name

$sql = 'SELECT *
FROM ' . SURVEY_ANSWERS_TABLE . '
WHERE survey_id = ' . $survey_id . '
AND user_id = ' . $user->data['user_id'];
Your code should be similar to above.

As a side note, I work on a new version of this mod, and your changes will not work on 0.0.2.
I abandoned all of my mods.
ddaddy
Registered User
Posts: 100
Joined: Sun Dec 21, 2008 6:24 pm

Re: [BETA] Poll Vote Reminder (0.0.1)

Post by ddaddy »

What's changing in 0.0.2?
Locked

Return to “[3.0.x] MODs in Development”