Jump to content

React to Downloads Files


403 - Forbiddeen

Recommended Posts

It's possible to create a plugin which the member need to react, on Download App, to download the file? For example, the guests can download just ONE file without react, but when they register, they need to react the file to download it!. I suggest to create the permissions to select the group which need to react to download the file!

Similar to hide link and codes (they need to react or reply to see the hidden content), on the Download App, but just react it!

 

Thanks. ❤️ 

Link to comment
3 minutes ago, 403 - Forbideen said:

It's possible to create a plugin which the member need to react, on Download App, to download the file? For example, the guests can download just ONE file without react, but when they register, they need to react the file to download it!.

Similar to hide link and codes (they need to react or reply to see the hidden content), on the Download App, but just react it!

 

Thanks. ❤️ 

Sure - it'd be a simple hook on \IPS\downloads\File:

public function downloadCheck( array $record = NULL, \IPS\Member $member = NULL )
{
	$member = $member ?: \IPS\Member::loggedIn();
	if ( $member->member_id AND !$this->reacted( $member ) )
	{
		throw new \DomainException( 'download_no_react' );
	}
	return parent::downloadCheck( $record, $member );
}

For guests, you could either track if they've downloaded via cookie (which has limitations), or just use the built-in limit settings:

vy2AUZwnvBFRklKbyLLTjNnMZEpxzM.png

Link to comment
13 minutes ago, Ryan Ashbrook said:

Sure - it'd be a simple hook on \IPS\downloads\File:


public function downloadCheck( array $record = NULL, \IPS\Member $member = NULL )
{
	$member = $member ?: \IPS\Member::loggedIn();
	if ( $member->member_id AND !$this->reacted( $member ) )
	{
		throw new \DomainException( 'download_no_react' );
	}
	return parent::downloadCheck( $record, $member );
}

thank you <3, but how can i select the group needs to react to download?

Link to comment

Archived

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

  • Recently Browsing   0 members

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