Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -63,14 +63,24 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
{
|
||||
/* Build table */
|
||||
$where = array();
|
||||
if ( !in_array( $this->blog->id, array_keys( \IPS\blog\Blog::loadByOwner( \IPS\Member::loggedIn() ) ) ) )
|
||||
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 ) )
|
||||
{
|
||||
$where[] = array( "entry_status!='draft'" );
|
||||
}
|
||||
|
||||
$table = new \IPS\Helpers\Table\Content( 'IPS\blog\Entry', $this->blog->url(), $where, $this->blog );
|
||||
|
||||
$table->tableTemplate = array( \IPS\Theme::i()->getTemplate( 'view' ), 'blogTable' );
|
||||
$table->rowsTemplate = array( \IPS\Theme::i()->getTemplate( 'view' ), 'rows' );
|
||||
if ( \IPS\Settings::i()->blog_allow_grid )
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'grid.css', 'blog', 'front' ) );
|
||||
$table->rowsTemplate = array( \IPS\Theme::i()->getTemplate( 'view' ), 'rowsGrid' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$table->rowsTemplate = array( \IPS\Theme::i()->getTemplate( 'view' ), 'rows' );
|
||||
}
|
||||
|
||||
$table->title = \IPS\Member::loggedIn()->language()->addToStack('entries_in_this_blog');
|
||||
$table->sortBy = \IPS\Request::i()->sortby ?: 'date';
|
||||
|
||||
@@ -85,7 +95,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
);
|
||||
|
||||
/* Online User Location */
|
||||
\IPS\Session::i()->setLocation( $this->blog->url(), array(), 'loc_blog_viewing_blog', $this->blog->member_id ? array( $this->blog->_title => FALSE ) : array( "blogs_blog_{$this->blog->id}" => TRUE ) );
|
||||
\IPS\Session::i()->setLocation( $this->blog->url(), array(), 'loc_blog_viewing_blog', array( "blogs_blog_{$this->blog->id}" => TRUE ) );
|
||||
|
||||
/* Output */
|
||||
\IPS\Output::i()->title = $this->blog->_title;
|
||||
@@ -100,7 +110,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
'@context' => "http://schema.org",
|
||||
'@type' => "Blog",
|
||||
'url' => (string) $this->blog->url(),
|
||||
'name' => htmlspecialchars( $this->blog->_title, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE ),
|
||||
'name' => $this->blog->_title,
|
||||
'description' => strip_tags( $this->blog->description ),
|
||||
'commentCount' => $this->blog->_comments,
|
||||
'interactionStatistic' => array(
|
||||
@@ -136,7 +146,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
{
|
||||
\IPS\Output::i()->jsonLd['blog']['author'] = array(
|
||||
'@type' => 'Person',
|
||||
'name' => htmlspecialchars( \IPS\Member::load( $this->blog->member_id )->name, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE ),
|
||||
'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()
|
||||
);
|
||||
@@ -313,7 +323,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'blog_rss_import_auth_pass', $feed ? $feed->auth_pass : NULL, FALSE, array(), NULL, NULL, NULL, 'blog_rss_import_auth_pass' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'blog_rss_import_show_link', $feed->import_show_link ?: \IPS\Member::loggedIn()->language()->addToStack('blog_rss_import_show_link_default' ), FALSE, array(), NULL, NULL, NULL, 'blog_rss_import_show_link' ) );
|
||||
|
||||
$options = array( 'autocomplete' => array( 'unique' => TRUE, 'source' => \IPS\Content\Item::definedTags( $this->blog ), 'freeChoice' => ( \IPS\Settings::i()->tags_open_system ? TRUE : FALSE ) ) );
|
||||
$options = array( 'autocomplete' => array( 'unique' => TRUE, 'minimized' => FALSE, 'source' => \IPS\Content\Item::definedTags( $this->blog ), 'freeChoice' => ( \IPS\Settings::i()->tags_open_system ? TRUE : FALSE ) ) );
|
||||
if ( \IPS\Settings::i()->tags_force_lower )
|
||||
{
|
||||
$options['autocomplete']['forceLower'] = TRUE;
|
||||
|
||||
Reference in new issue
Block a user