Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -91,11 +91,17 @@ class _browse extends \IPS\Dispatcher\Controller
|
||||
$count = \IPS\blog\Entry::getItemsWithPermission( $where, 'entry_date desc', NULL, 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, 0, NULL, TRUE, FALSE, FALSE, TRUE );
|
||||
$entries = \IPS\blog\Entry::getItemsWithPermission( $where, 'entry_date desc', array( ( $perpage * ( $page - 1 ) ), $perpage ), 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, 0, NULL, TRUE );
|
||||
|
||||
$queryString = 'app=blog&module=blogs&controller=browse';
|
||||
if( $category )
|
||||
{
|
||||
$queryString .= '&id=' . $category->_id;
|
||||
}
|
||||
$paginationUrl = \IPS\Http\Url::internal( $queryString, 'front', ( $category ) ? 'blog_category' : 'blogs' );
|
||||
$pagination = array(
|
||||
'page' => $page,
|
||||
'pages' => ceil( $count / $perpage ),
|
||||
'perpage' => $perpage,
|
||||
'url' => \IPS\Http\Url::internal( 'app=blog&module=blogs&controller=browse', 'front', 'blogs' )
|
||||
'url' => $paginationUrl
|
||||
);
|
||||
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'grid.css', 'blog', 'front' ) );
|
||||
|
||||
@@ -120,7 +120,8 @@ class _entry extends \IPS\Content\Controller
|
||||
'@type' => "Blog",
|
||||
'url' => (string) $this->entry->container()->url(),
|
||||
'name' => $this->entry->container()->_title,
|
||||
'description' => strip_tags( $this->entry->container()->description ),
|
||||
'description' => \IPS\Member::loggedIn()->language()->addToStack( \IPS\blog\Blog::$titleLangPrefix . $this->entry->container()->_id . \IPS\blog\Blog::$descriptionLangSuffix, TRUE, array( 'striptags' => TRUE, 'escape' => TRUE ) ),
|
||||
|
||||
'commentCount' => $this->entry->container()->_comments,
|
||||
'interactionStatistic' => array(
|
||||
array(
|
||||
@@ -255,7 +256,19 @@ class _entry extends \IPS\Content\Controller
|
||||
|
||||
/* Breadcrumb */
|
||||
\IPS\Output::i()->breadcrumb = array();
|
||||
\IPS\Output::i()->breadcrumb['module'] = array( \IPS\Http\Url::internal( 'app=blog', 'front', 'blogs' ), \IPS\Member::loggedIn()->language()->addToStack( '__app_blog' ) );
|
||||
if ( $club = $this->entry->container()->club() )
|
||||
{
|
||||
\IPS\core\FrontNavigation::$clubTabActive = TRUE;
|
||||
\IPS\Output::i()->breadcrumb = array();
|
||||
\IPS\Output::i()->breadcrumb[] = array( \IPS\Http\Url::internal( 'app=core&module=clubs&controller=directory', 'front', 'clubs_list' ), \IPS\Member::loggedIn()->language()->addToStack('module__core_clubs') );
|
||||
\IPS\Output::i()->breadcrumb[] = array( $club->url(), $club->name );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->breadcrumb['module'] = array( \IPS\Http\Url::internal( 'app=blog', 'front', 'blogs' ), \IPS\Member::loggedIn()->language()->addToStack( '__app_blog' ) );
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -128,7 +128,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
|
||||
if ( \IPS\Member::loggedIn()->member_id )
|
||||
{
|
||||
$key = md5( ( \IPS\Member::loggedIn()->members_pass_hash ?: \IPS\Member::loggedIn()->email ) . \IPS\Member::loggedIn()->members_pass_salt );
|
||||
$key = \IPS\Member::loggedIn()->getUniqueMemberHash();
|
||||
|
||||
\IPS\Output::i()->rssFeeds['blog_rss_title'] = \IPS\Output::i()->rssFeeds['blog_rss_title']->setQueryString( array( 'member' => \IPS\Member::loggedIn()->member_id , 'key' => $key ) );
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class _view extends \IPS\Helpers\CoverPhoto\Controller
|
||||
'@type' => "Blog",
|
||||
'url' => (string) $this->blog->url(),
|
||||
'name' => $this->blog->_title,
|
||||
'description' => strip_tags( $this->blog->description ),
|
||||
'description' => $this->blog->member_id ? $this->blog->desc : \IPS\Member::loggedIn()->language()->addToStack( \IPS\blog\Blog::$titleLangPrefix . $this->blog->_id . \IPS\blog\Blog::$descriptionLangSuffix, TRUE, array( 'striptags' => TRUE, 'escape' => TRUE ) ),
|
||||
'commentCount' => $this->blog->_comments,
|
||||
'interactionStatistic' => array(
|
||||
array(
|
||||
@@ -187,7 +187,19 @@ 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', 'blogs' ), \IPS\Member::loggedIn()->language()->addToStack( '__app_blog' ) );
|
||||
if ( $club = $this->blog->club() )
|
||||
{
|
||||
\IPS\core\FrontNavigation::$clubTabActive = TRUE;
|
||||
\IPS\Output::i()->breadcrumb = array();
|
||||
\IPS\Output::i()->breadcrumb[] = array( \IPS\Http\Url::internal( 'app=core&module=clubs&controller=directory', 'front', 'clubs_list' ), \IPS\Member::loggedIn()->language()->addToStack('module__core_clubs') );
|
||||
\IPS\Output::i()->breadcrumb[] = array( $club->url(), $club->name );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->breadcrumb['module'] = array( \IPS\Http\Url::internal( 'app=blog', 'front', 'blogs' ), \IPS\Member::loggedIn()->language()->addToStack( '__app_blog' ) );
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user