Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -245,6 +245,10 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
case 'view':
|
||||
case 'read':
|
||||
default:
|
||||
if( $this->isPublic() )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return $club->canRead( $member );
|
||||
}
|
||||
}
|
||||
@@ -1183,7 +1187,7 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
public function coverPhoto()
|
||||
{
|
||||
$photo = parent::coverPhoto();
|
||||
$photo->overlay = \IPS\Theme::i()->getTemplate( 'view', 'blog' )->coverPhotoOverlay( $this );
|
||||
$photo->overlay = \IPS\Theme::i()->getTemplate('view', 'blog')->coverPhotoOverlay($this);
|
||||
return $photo;
|
||||
}
|
||||
|
||||
@@ -1305,7 +1309,7 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
* @param \IPS\Helpers\Form $form Form object
|
||||
* @return void
|
||||
*/
|
||||
public function clubForm( \IPS\Helpers\Form $form )
|
||||
public function clubForm( \IPS\Helpers\Form $form, \IPS\Member\Club $club )
|
||||
{
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_view.js', 'blog', 'front' ) );
|
||||
|
||||
@@ -1317,6 +1321,11 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'blog_enable_rss', $this->id ? $this->settings['allowrss'] : TRUE ) );
|
||||
}
|
||||
|
||||
if( $club->type == 'closed' )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'club_node_public', $this->id ? $this->isPublic() : FALSE ) );
|
||||
}
|
||||
|
||||
/* Categories */
|
||||
if ( $this->id )
|
||||
@@ -1432,4 +1441,36 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
{
|
||||
return $this->last_edate ? \IPS\DateTime::ts( $this->last_edate ) : NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The class of the ACP \IPS\Node\Controller that manages this node type
|
||||
*/
|
||||
protected static $acpController = "IPS\\calendar\\modules\\admin\\calendars\\calendars";
|
||||
|
||||
|
||||
/**
|
||||
* Get the URL of the AdminCP page for this node
|
||||
*
|
||||
* @param string|NULL $do The "do" query parameter of the url (e.g. 'form', 'permissions', etc).
|
||||
*
|
||||
* @return \IPS\Http\Url | NULL
|
||||
*/
|
||||
public function acpUrl( $do="form" )
|
||||
{
|
||||
try
|
||||
{
|
||||
$parentCol = static::$parentNodeColumnId;
|
||||
$parent = \IPS\blog\Category::load( $this->$parentCol );
|
||||
$url = parent::acpUrl( $do );
|
||||
if ( $url !== NULL )
|
||||
{
|
||||
$this->_acpUrls[$do] = $url->setQueryString([ 'subnode' => $this->$parentCol ]);
|
||||
}
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
$this->_acpUrls[$do] = NULL;
|
||||
}
|
||||
return $this->_acpUrls[$do];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user