Jump to content


- - - - -

(IM) Poll Permission


  • Please log in to reply
26 replies to this topic

#1 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 19 March 2009 - 10:23 PM

Posted Image

File Name: (IM) Poll Permission
File Submitter: m4rtin
File Submitted: 19 Mar 2009
File Category: IP.Board v2.3.x & v2.2.x Mods

File Information
Resource Type: Modification
Version: 1.0
Compatibility: IP.Board 2.2 & 2.3


Description
Poll Permissions allows you to set which groups can view the results of a poll after voting and whether guests have the ability to vote.


Released with upgrade permission from Phil Mossop.

Click here to download this file

#2 Kiran

Kiran

    n00b

  • Banned
  • Pip
  • 2 posts
  • IPB Version:v2.3.x

Posted 21 March 2009 - 02:15 PM

Awesome Mod

Just need help i m not getting groups which  Allow these groups to view the results of this poll Below this
i want only root admin can see the result

#3 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 21 March 2009 - 02:19 PM

Open ./sources/classes/post/class_post_edit.php and ./sources/classes/post/class_post_new.php (Same edit in both files)
Find:
$this->ipsclass->DB->build_query( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => 'g_is_supmod=0 AND g_access_cp=0' ) );
Replace with:
$this->ipsclass->DB->build_query( array( 'select' => 'g_id, g_title', 'from' => 'groups' ) );
Save and upload

All groups, even moderators and admins, should be in the group list.

#4 Kiran

Kiran

    n00b

  • Banned
  • Pip
  • 2 posts
  • IPB Version:v2.3.x

Posted 21 March 2009 - 02:39 PM

i cannot see any group list Martin i m posting screen shot can you tell me what is left :$

Posted Image

#5 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 22 March 2009 - 11:09 PM

Double check your file edits. None of the guys who tested this mod before I released it had any issues with it.

#6 alphega

alphega

    n00b

  • Members
  • Pip
  • 1 posts
  • Location:Bordeaux (France)
  • Real Name:Guillaume
  • IPB Version:v2.3.x

Posted 11 June 2009 - 12:20 PM

Hello,

At first, thank you for this great mod.

I think i have a problem. Not sure but it seems when a guest has voted, he cannot vote any more in any poll (same ip ?)

Thanks  ;)

edit : sorry, it's ok now. I saw that i had to modify permission for guests in each poll after install.

Edited by alphega, 11 June 2009 - 01:19 PM.


#7 DyCe

DyCe

    Coder

  • Banned
  • PipPipPipPipPip
  • 126 posts
  • Real Name:DyCe
  • IPB Version:v2.3.x

Posted 12 June 2009 - 08:32 AM

1) i have installed terabyte 2.3 poll logs mod could this be work with tht?
2) if guest give member vote then can root admin see the ip adress of guest for Acknowleg which guest give which vote to which members etc ?

#8 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 12 June 2009 - 09:34 AM

#1: No. That mod only logs the members ID, and a guests ID will always be 0, so you'll never know who's who.
#2: If that's related to #1, then no.

#9 roobns

roobns

    n00b

  • Members
  • Pip
  • 3 posts
  • Real Name:Ruben
  • IPB Version:v2.3.x

Posted 17 June 2009 - 06:39 AM

I installed the mod and modded all the files but when i try to vote as guest it says that i'm not allowe to reply in the topic

#10 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 17 June 2009 - 07:08 AM

Have to enabled the settings that bumps the topic when a vote is given in a poll?

#11 roobns

roobns

    n00b

  • Members
  • Pip
  • 3 posts
  • Real Name:Ruben
  • IPB Version:v2.3.x

Posted 17 June 2009 - 07:34 AM

View Postm4rtin, on Jun 17 2009, 02:08 AM, said:

Have to enabled the settings that bumps the topic when a vote is given in a poll?

I enabled that option, and still gives me the error message that i'm not allowed to reply the discussion ;) i uploaded the files, installed with uniersal and edited all the files

#12 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 17 June 2009 - 11:06 AM

I meant that enabling that feature could give you that error.

Did you remember to edit the poll so that guest can vote? That is a per poll setting, and is not turned on by default in all polls.

#13 roobns

roobns

    n00b

  • Members
  • Pip
  • 3 posts
  • Real Name:Ruben
  • IPB Version:v2.3.x

Posted 17 June 2009 - 01:39 PM

No actually i just disabled them, the polls are marked as guests can vote and didnt select any user group to view the results, is there a way to just enable guests to vote always?

#14 Bagdad

Bagdad

    n00b

  • Members
  • Pip
  • 1 posts
  • Location:Moscow
  • Real Name:Nick
  • IPB Version:v2.3.x

Posted 23 June 2009 - 03:47 PM

Got probs. Guest can't vote if other guest voted before.
Changed from your code:
if( $voter['member_id'] == $this->ipsclass->member['id'] OR ( $voter['member_id'] == 0 AND $voter['ip_address'] == $this->ipsclass->ip_address ) )
			{
				$member_voted = 1;
			}
to:
if(($voter['member_id'] != 0)) {
				if( $voter['member_id'] == $this->ipsclass->member['id'])
				{
					$member_voted = 1;
				}
			}
			if(($voter['member_id'] == 0) AND ($voter['ip_address'] == $this->ipsclass->ip_address)) {
				$member_voted = 1;
			}
and
$this->ipsclass->DB->simple_construct( array( 'select' => 'member_id', 'from' => 'voters', 'where' => "tid={$this->topic['tid']} and ( member_id={$this->ipsclass->member['id']} OR ( member_id=0 AND ip_address='{$this->ipsclass->ip_address}'))" ) );
to:
if($this->ipsclass->member['id'] != 0) {
			$this->ipsclass->DB->simple_construct( array( 'select' => 'member_id', 'from' => 'voters', 'where' => "tid={$this->topic['tid']} and member_id={$this->ipsclass->member['id']}" ) );
		} else {
			$this->ipsclass->DB->simple_construct( array( 'select' => 'member_id', 'from' => 'voters', 'where' => "tid={$this->topic['tid']} and member_id=0 AND ip_address='{$this->ipsclass->ip_address}'" ) );
		}
Guest can vote from different IP now.

#15 DyCe

DyCe

    Coder

  • Banned
  • PipPipPipPipPip
  • 126 posts
  • Real Name:DyCe
  • IPB Version:v2.3.x

Posted 03 July 2009 - 04:32 AM

is this fix version m4rtin ? or required some fixing like as above member said ?

#16 Makaaveli

Makaaveli

    Post-aholic

  • Members
  • PipPipPipPipPipPipPip
  • 579 posts
  • Real Name:Anthony
  • IPB Version:v3.2.x

Posted 10 July 2009 - 11:02 AM

Hey martin, anyway to do this so mods/admins can't see the results either?

#17 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 10 July 2009 - 11:22 AM

Sort of untested, but give it a try.

Open ./sources/action_public/topics.php
Find:
if ( strstr( ",{$poll_data['result_permission']},", $this->ipsclass->member['mgroup'] )
			OR $this->ipsclass->member['is_mod'] OR $this->ipsclass->member['g_is_supmod'] OR $this->ipsclass->member['g_access_cp'] OR $poll_data['result_permission'] == 'all' )
Replace with:
if ( strstr( ",{$poll_data['result_permission']},", $this->ipsclass->member['mgroup'] ) OR $poll_data['result_permission'] == 'all' )
Save and upload

Open  ./sources/classes/post/class_post_new.php and ./sources/classes/post/class_post_edit.php (Same edit in both files)
Find:
$this->ipsclass->DB->build_query( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'where' => 'g_is_supmod=0 AND g_access_cp=0' ) );
Replace with:
$this->ipsclass->DB->build_query( array( 'select' => 'g_id, g_title', 'from' => 'groups' ) );
Save and upload

#18 Makaaveli

Makaaveli

    Post-aholic

  • Members
  • PipPipPipPipPipPipPip
  • 579 posts
  • Real Name:Anthony
  • IPB Version:v3.2.x

Posted 10 July 2009 - 04:38 PM

Thanks it worked =)

Any idea how to get rid of the message in edit view where it says "admins, super mods, mods can see the results" etc.?

#19 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 10 July 2009 - 06:13 PM

Edit the language bit "result_permission" in lang_post.

#20 DyCe

DyCe

    Coder

  • Banned
  • PipPipPipPipPip
  • 126 posts
  • Real Name:DyCe
  • IPB Version:v2.3.x

Posted 15 July 2009 - 02:56 PM

i have installed and try it and found problem.

first i have created poll topic and enable guest vote and select root admin can see results.
now after creating top it show i have not voted in this poll now i log out and become guest and vote to my choice and resigning in . when i reback in topic there show only result on admin ID and it's means i have already voted but i voted as guest not with admin ID.

second problem it's happend with all IDs that i logged in on my PC

3rd. the options available for alls members and moderators they moderator poll topic but it's more great if this all options only available on group choice from ACP

4th. also this mod have no option to select forum where this option can available and viewable on admins choice

5th make this mod only with Root admin & Norml admin groups friendly they can see result but all others group cannot see the results without admins permision from ACP

Edited by DyCe, 15 July 2009 - 02:59 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users