Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -64,6 +64,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
$this->blog->clubCheckRules();
|
||||
|
||||
/* Build table */
|
||||
$tableUrl = $this->blog->url();
|
||||
$where = array();
|
||||
if ( !\in_array( $this->blog->id, array_keys( \IPS\blog\Blog::loadByOwner( \IPS\Member::loggedIn() ) ) ) AND !\IPS\blog\Entry::canViewHiddenItems( \IPS\Member::loggedIn(), $this->blog ) )
|
||||
{
|
||||
@@ -77,6 +78,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
try
|
||||
{
|
||||
$category = \IPS\blog\Entry\Category::load( \IPS\Request::i()->cat );
|
||||
$tableUrl = $tableUrl->setQueryString( [ 'cat' => $category->id ] );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
@@ -88,7 +90,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
$where[] = array( "entry_category_id=?", $category->id );
|
||||
}
|
||||
|
||||
$table = new \IPS\Helpers\Table\Content( 'IPS\blog\Entry', $this->blog->url(), $where, $this->blog );
|
||||
$table = new \IPS\Helpers\Table\Content( 'IPS\blog\Entry', $tableUrl, $where, $this->blog );
|
||||
|
||||
$table->tableTemplate = array( \IPS\Theme::i()->getTemplate( 'view' ), 'blogTable' );
|
||||
if ( \IPS\Settings::i()->blog_allow_grid )
|
||||
@@ -175,7 +177,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
'@type' => 'Person',
|
||||
'name' => \IPS\Member::load( $this->blog->member_id )->name,
|
||||
'url' => (string) \IPS\Member::load( $this->blog->member_id )->url(),
|
||||
'image' => \IPS\Member::load( $this->blog->member_id )->get_photo()
|
||||
'image' => \IPS\Member::load( $this->blog->member_id )->get_photo( TRUE, TRUE )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -185,7 +187,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
}
|
||||
|
||||
\IPS\Output::i()->breadcrumb = array();
|
||||
\IPS\Output::i()->breadcrumb['module'] = array( \IPS\Http\Url::internal( 'app=blog', 'front' ), \IPS\Member::loggedIn()->language()->addToStack( '__app_blog' ) );
|
||||
\IPS\Output::i()->breadcrumb['module'] = array( \IPS\Http\Url::internal( 'app=blog', 'front', 'blogs' ), \IPS\Member::loggedIn()->language()->addToStack( '__app_blog' ) );
|
||||
|
||||
try
|
||||
{
|
||||
@@ -539,14 +541,25 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
*/
|
||||
protected function manageCategories()
|
||||
{
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_view.js', 'blog', 'front' ) );
|
||||
|
||||
if( !$this->blog->canEdit() )
|
||||
{
|
||||
\IPS\Output::i()->error( 'no_module_permission', '2B201/A', 403, '' );
|
||||
}
|
||||
|
||||
$form = new \IPS\Helpers\Form;
|
||||
$form->addHtml( \IPS\Theme::i()->getTemplate( 'view', 'blog', 'front' )->manageCategories( $this->blog ) );
|
||||
$form->hiddenValues['submitted'] = 1;
|
||||
|
||||
if( $values = $form->values() )
|
||||
{
|
||||
\IPS\Output::i()->redirect( $this->blog->url() );
|
||||
}
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('blog_manage_entry_categories');
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'view', 'blog', 'front' )->manageCategories( \IPS\blog\Entry\Category::roots( NULL, NULL, array( 'entry_category_blog_id=?', $this->blog->id ) ), $this->blog );
|
||||
\IPS\Output::i()->output = $form->error ? $form : \IPS\Theme::i()->getTemplate( 'view', 'blog', 'front' )->rssImport( $form->customTemplate( array( \IPS\Theme::i()->getTemplate( 'forms', 'core' ), 'popupTemplate' ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user