Jump to content

Customized edit time restriction


kodif

Recommended Posts

Edit time restriction  should also be customized like " Can edit own content? " option is.

For example, in topic user can edit only in 10 minutes to fix errors, but in own galleries he should have unlimeted time, otherwise he can not add note to image.

Discussion in topics differs from presenting own works in gallery.

 

screenshot-localhost-2018-05-23-19-01-35.png

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 3 weeks later...
  • 4 months later...

Developerd broke a brain on this (in downloads/files/) - Authors can always edit their own files!!! 

	/**
	 * Can edit?
	 * Authors can always edit their own files
	 *
	 * @param	\IPS\Member|NULL	$member	The member to check for (NULL for currently logged in member)
	 * @return	bool
	 */
	public function canEdit( $member=NULL )
	{
		$member = $member ?: \IPS\Member::loggedIn();

		if ( !$member->member_id )
		{
			return FALSE;
		}

		return ( $member->member_id == $this->author()->member_id ) or parent::canEdit( $member );
	}

and this (looks like we can disable files edit, but...)

Clipboard02.thumb.jpg.d765af885ca30236fca7fd7d3e5c5dbc.jpg

It's absolutely as intended (c) bfarber

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Archived

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

  • Recently Browsing   0 members

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