Jump to content

(SD) Hide Poll Votes


Spanner

Recommended Posts

index.php?app=downloads&module=display&s



File Name: (SD) Hide Poll Votes

File Submitter: Spanner

File Submitted: 03 Oct 2013

File Category: User and Social Engagement

Supported Versions: IP.Board 3.3.x, IP.Board 3.4.x



Author: Dawid Baruch (IPSBeyond.pl)

Opis: Hook pozwala na ukrywanie wyników ankiet dla wybranych grup w wybranych forach do czasu zamknięcia tematu.
Description: Hook allows to hide poll votes from selected groups in selected forums until topic was closed.



here to download this file

Link to comment
Share on other sites

  • 4 months later...
  • 8 months later...
  • 5 months later...

There's a bug in it, if you use the quick edit feature then it resets the checkmark for hiding the results!

​I never posted the fix I came up with:

Open the xml and find (~ line 268):

	public function handleData( $insert )
	{
	    $this->DB->update( 'topics', array( 'sd_hpv' => intval( $this->request[ 'sd_hpv' ] ) ), "tid={$insert[ 'post_data' ][ 'topic_id' ]}" );
	}

Replace with this:

	public function handleData( $insert )
	{
		if (!IPS_IS_AJAX)
		{
			$this->DB->update( 'topics', array( 'sd_hpv' => intval( $this->request[ 'sd_hpv' ] ) ), "tid={$insert[ 'post_data' ][ 'topic_id' ]}" );
		}
	}

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...