Jump to content

React to Downloads Files

Featured Replies

Posted

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. ❤️ 

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

  • Author
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?

  • Author

if someone can help me, i don't know how to create a plugin, anyway, thanks for any help.

We have a great documentation section https://invisioncommunity.com/developers/docs/development/plugins/overview-of-plugins-in-ips4-r41/ with a complete example plugin 

  • Author
37 minutes ago, Daniel F said:

We have a great documentation section https://invisioncommunity.com/developers/docs/development/plugins/overview-of-plugins-in-ips4-r41/ with a complete example plugin 

wooah, thank you, try to make one ❤️ 

  • Author
5 hours ago, Daniel F said:

We have a great documentation section https://invisioncommunity.com/developers/docs/development/plugins/overview-of-plugins-in-ips4-r41/ with a complete example plugin 

i cant create, i really don't know how to do this, if anyone helps, but anyway, thanks for helping Daniel.

Archived

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

Recently Browsing 0

  • No registered users viewing this page.