A question about polls

General topics relating to phpBB3 to be posted in here.
Post Reply
GirlieGirl
Forum Member
Forum Member
Posts: 118
Joined: Fri May 30, 2008 4:06 am

A question about polls

Post by GirlieGirl »

Is there any way to set up a poll without allowing comments/posts? Id like to run a poll but keep it closed to people leaving responses.
Thank you.
User avatar
Ashley
Forum Member
Forum Member
Posts: 242
Joined: Fri May 30, 2008 10:15 pm

Re: A question about polls

Post by Ashley »

There surely must be a way. My first thought would be set up a new forum just for polls, allow voting but disallow new topics/replies.
GirlieGirl
Forum Member
Forum Member
Posts: 118
Joined: Fri May 30, 2008 4:06 am

Re: A question about polls

Post by GirlieGirl »

I didnt realize you could that. Ill give it a try and let you know how it goes. Thanks Ashley!
GirlieGirl
Forum Member
Forum Member
Posts: 118
Joined: Fri May 30, 2008 4:06 am

Re: A question about polls

Post by GirlieGirl »

Well, I didnt find how to set the forum to allow voting but disallow comments or replies.
I did find a mod that will allow voting in polls that are in locked threads but I have no idea if it will work with my modded phpbb. Here are the instructions, any clue?
Thanks.

#-----[ OPEN ]------------------------------------------
#
posting.php

#
#-----[ FIND ]------------------------------------------
#

else if ( $mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])

#
#-----[ BEFORE, ADD ]--------------------------------------
#

/*----------------------------------------------------------------------
// Vote in Locked Polls - Begin Code Alteration
// Added: ($mode != 'newtopic' && $mode != 'vote')
// Original phpBB Code:
else if ( $mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
*/

#
#-----[ IN-LINE FIND ]--------------------------------------
#

$mode != 'newtopic'

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------------
#

($mode != 'newtopic' && $mode != 'vote')

#
#-----[ AFTER, ADD ]--------------------------------------
#

//
// Vote in Locked Polls - End Code Alteration
//----------------------------------------------------------------------


#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
#

if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $forum_topic_data['topic_status'] == TOPIC_LOCKED )

#
#-----[ BEFORE, ADD ]--------------------------------------
#

//----------------------------------------------------------------------
// Vote in Locked Polls - Begin Code Alteration
// Removed: || $forum_topic_data['topic_status'] == TOPIC_LOCKED
// Added: /* removed lock check was here */
/* Original phpBB Code:
if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $forum_topic_data['topic_status'] == TOPIC_LOCKED )
*/

#
#-----[ IN-LINE FIND ]--------------------------------------
#

|| $forum_topic_data['topic_status'] == TOPIC_LOCKED

#
#-----[ IN-LINE REPLACE WITH ]--------------------------------------
#

/* removed lock check was here */

#
#-----[ AFTER, ADD ]--------------------------------------
#

//
// Vote in Locked Polls - End Code Alteration
//----------------------------------------------------------------------

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
User avatar
LDM
Site Admin
Site Admin
Posts: 1786
Joined: Thu May 29, 2008 6:51 pm

Re: A question about polls

Post by LDM »

Is that definitely for phpBB3 GG? If so, there is no reason why it won't work even with a modded phpBB forum as it shouldn't affect any mods, give it a go, remembering to back up the files first.
GirlieGirl
Forum Member
Forum Member
Posts: 118
Joined: Fri May 30, 2008 4:06 am

Re: A question about polls

Post by GirlieGirl »

Shit, no. I read your post and checked...tested on phpbb2. Thanks LDM.
Any ideas how I can make this work? The voting without replies thing, not this code stuff.
User avatar
LDM
Site Admin
Site Admin
Posts: 1786
Joined: Thu May 29, 2008 6:51 pm

Re: A question about polls

Post by LDM »

:D I thought it looked like 2 code.

You know, I have never tried polls without posts but then I've had no reason to do so I wouldn't know if it works.

Ashley's idea sounds good just having a polling forum for all your polls.

If that had of been code for phpBB3, I still wouldn't have really used it as your members will see locked posts and wouldn't think of going in to vote.

I'm thinking it has to be permissions based for sure so it looks like, other than a mod (which I haven't seen) you need to use Ashley's route?
GirlieGirl
Forum Member
Forum Member
Posts: 118
Joined: Fri May 30, 2008 4:06 am

Re: A question about polls

Post by GirlieGirl »

Ok, I figured out Ashleys way. Creeps me out messin with permissions. I have this nightmare that Im going to wake up the next morning and find I accidentally gave everyone admin status. :shock:
Thanks so much you guys!
Post Reply