Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -29,7 +29,7 @@ spl_autoload_register( function( $class )
|
||||
$titleLang = 'content_db_lang_su_' . $databaseId;
|
||||
$includeInSearch = $databases[ $databaseId ]->search ? "TRUE" : "FALSE";
|
||||
|
||||
$data = <<<EOF
|
||||
$data = <<<PHP
|
||||
namespace IPS\cms;
|
||||
class Records{$databaseId} extends Records
|
||||
{
|
||||
@@ -80,7 +80,7 @@ spl_autoload_register( function( $class )
|
||||
);
|
||||
public static \$pagePath;
|
||||
}
|
||||
EOF;
|
||||
PHP;
|
||||
eval( $data );
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ EOF;
|
||||
{
|
||||
$databaseId = \intval( mb_substr( $class, 23 ) );
|
||||
|
||||
$data = <<<EOF
|
||||
$data = <<<PHP
|
||||
namespace IPS\cms\Records;
|
||||
class Comment{$databaseId} extends Comment
|
||||
{
|
||||
@@ -99,7 +99,7 @@ EOF;
|
||||
public static \$title = 'content_record_comments_title_{$databaseId}';
|
||||
public static \$hideLogKey = 'ccs-records{$databaseId}-comments';
|
||||
}
|
||||
EOF;
|
||||
PHP;
|
||||
eval( $data );
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ EOF;
|
||||
{
|
||||
$databaseId = \intval( mb_substr( $class, 22 ) );
|
||||
|
||||
$data = <<<EOF
|
||||
$data = <<<PHP
|
||||
namespace IPS\cms\Records;
|
||||
class Review{$databaseId} extends Review
|
||||
{
|
||||
@@ -118,7 +118,7 @@ EOF;
|
||||
public static \$title = 'content_record_reviews_title_{$databaseId}';
|
||||
public static \$hideLogKey = 'ccs-records{$databaseId}-reviews';
|
||||
}
|
||||
EOF;
|
||||
PHP;
|
||||
eval( $data );
|
||||
}
|
||||
|
||||
@@ -134,12 +134,13 @@ EOF;
|
||||
}
|
||||
|
||||
$dbObject = $databases[ $databaseId ];
|
||||
$useClubContainer = ($dbObject->use_categories and $dbObject->allow_club_categories) ? "\n\t\t\tuse \\IPS\\Content\\ClubContainer;" : '';
|
||||
|
||||
$data = <<<EOF
|
||||
$data = <<<PHP
|
||||
namespace IPS\cms;
|
||||
class Categories{$databaseId} extends Categories
|
||||
{
|
||||
use \IPS\Node\Statistics;
|
||||
use \IPS\Node\Statistics;{$useClubContainer}
|
||||
|
||||
protected static \$multitons = array();
|
||||
protected static \$multitonMap = array();
|
||||
@@ -155,8 +156,99 @@ EOF;
|
||||
{
|
||||
return '{$dbObject->_title} ' . \IPS\Member::loggedIn()->language()->addToStack( static::\$nodeTitle . '_sg' );
|
||||
}
|
||||
|
||||
public static function clubAcpTitle()
|
||||
{
|
||||
return '{$dbObject->_title} ' . \IPS\Member::loggedIn()->language()->addToStack( static::\$nodeTitle );
|
||||
}
|
||||
|
||||
public function _saveClubForm( \IPS\Member\Club \$club, \$values )
|
||||
{
|
||||
\$class = static::class;
|
||||
preg_match( '/\\\\\\\\\_?Categories(\\\\d*)(?:\$|\\\\\\\\)/', \$class, \$databaseIdMatches );
|
||||
\$databaseId = \$databaseIdMatches[1];
|
||||
\$this->database_id = (int) \$databaseId;
|
||||
|
||||
if ( !\$this->id )
|
||||
{
|
||||
\$this->_updatePaths = TRUE;
|
||||
\$this->save();
|
||||
}
|
||||
|
||||
\$this->name = \$values['club_node_name'];
|
||||
\$clubIdColumn = \$this->clubIdColumn();
|
||||
\$this->\$clubIdColumn = \$club->id;
|
||||
\\IPS\\Lang::saveCustom( 'cms', 'content_cat_name_'.\$this->_id, \$this->name );
|
||||
|
||||
\$this->furl_name = \\IPS\\Http\\Url\\Friendly::seoTitle( \$this->name );
|
||||
\$this->_url = NULL;
|
||||
if ( \\IPS\\cms\\Categories::furlNameIsTaken( \$this->furl_name, \$databaseId, \$this->_id ?: null ) )
|
||||
{
|
||||
\$this->furl_name = \$this->_id . '_' . \$this->furl_name;
|
||||
}
|
||||
|
||||
if ( \\is_numeric( \$this->furl_name ) )
|
||||
{
|
||||
\$this->furl_name = 'n_' . \$this->furl_name;
|
||||
}
|
||||
|
||||
\$values['club_node_public'] = \$this->isPublic();
|
||||
if ( array_key_exists( 'page_can_view', \$values ) )
|
||||
{
|
||||
\$this->club_view_permission = implode( ',', \$values['page_can_view'] );
|
||||
\$values['club_node_public'] = \intval( \\in_array( 'member', \$values['page_can_view'] ) or \\mb_strpos( '*', \$this->club_view_permission ) !== false );
|
||||
unset( \$values['page_can_view'] );
|
||||
}
|
||||
|
||||
if ( array_key_exists( 'club_category_meta_index', \$values ) )
|
||||
{
|
||||
\$this->club_category_meta_index = (int) \$values['club_category_meta_index'];
|
||||
unset( \$values['club_category_meta_index'] );
|
||||
}
|
||||
elseif( !\in_array( 'nonmember', explode( ',', \$this->club_view_permission ) ) )
|
||||
{
|
||||
\$this->club_category_meta_index = 0;
|
||||
}
|
||||
|
||||
\$this->save();
|
||||
|
||||
\$this->setFullPath();
|
||||
}
|
||||
|
||||
public function clubForm( \\IPS\\Helpers\\Form \$form, \\IPS\\Member\\Club \$club ) : void
|
||||
{
|
||||
\$itemClass = static::\$contentItemClass;
|
||||
\$form->add( new \\IPS\\Helpers\\Form\\Text( 'club_node_name', \$this->_id ? \$this->_title : \\IPS\\Member::loggedIn()->language()->addToStack( static::clubFrontTitle() ), TRUE, array( 'maxLength' => 255 ) ) );
|
||||
\$form->add( new \\IPS\\Helpers\\Form\\TextArea( 'club_node_description', ( \$this->_id ? \$this->description : null ), false ) );
|
||||
if ( \$club->type !== \\IPS\\Member\\Club::TYPE_PUBLIC )
|
||||
{
|
||||
\$defaults = array( 'member', 'moderator' );
|
||||
\$current = \$this->club_view_permission;
|
||||
\$current = \mb_strpos( '*', \$current ) !== false ? ['nonmember','member','moderator'] : array_filter( explode( ',', \$current ) );
|
||||
if ( \$club->type !== \\IPS\\Member\\Club::TYPE_PRIVATE )
|
||||
{
|
||||
\$defaults[] = 'nonmember';
|
||||
}
|
||||
\$form->add( new \\IPS\\Helpers\\Form\\CheckboxSet( 'page_can_view', \$current, FALSE, array(
|
||||
'options' => array(
|
||||
'nonmember' => 'club_page_nonmembers',
|
||||
'member' => 'club_page_members',
|
||||
'moderator' => 'club_page_moderators'
|
||||
),
|
||||
'toggles' => array(
|
||||
'nonmember' => array( 'club_category_meta_index' )
|
||||
)
|
||||
) ) );
|
||||
}
|
||||
|
||||
/* Add the index setting if this page is shown to guests */
|
||||
if ( \$club->type !== \\IPS\\Member\\Club::TYPE_PRIVATE AND \\IPS\\Member::loggedIn()->group['gbw_club_manage_indexing'] )
|
||||
{
|
||||
\$form->add( new \\IPS\\Helpers\\Form\\YesNo('club_category_meta_index', \$this->club_category_meta_index, FALSE, [], NULL, NULL, NULL, 'club_category_meta_index' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF;
|
||||
PHP;
|
||||
|
||||
eval( $data );
|
||||
}
|
||||
@@ -165,7 +257,7 @@ EOF;
|
||||
{
|
||||
$databaseId = \intval( mb_substr( $class, 32 ) );
|
||||
|
||||
$data = <<<EOF
|
||||
$data = <<<PHP
|
||||
namespace IPS\cms\Records;
|
||||
class RecordsTopicSync{$databaseId} extends \IPS\cms\Records{$databaseId}
|
||||
{
|
||||
@@ -181,7 +273,7 @@ EOF;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
EOF;
|
||||
PHP;
|
||||
eval( $data );
|
||||
}
|
||||
|
||||
@@ -189,7 +281,7 @@ EOF;
|
||||
{
|
||||
$databaseId = \intval( mb_substr( $class, 32 ) );
|
||||
|
||||
$data = <<<EOF
|
||||
$data = <<<PHP
|
||||
namespace IPS\cms\Records;
|
||||
class CommentTopicSync{$databaseId} extends CommentTopicSync
|
||||
{
|
||||
@@ -199,7 +291,7 @@ EOF;
|
||||
public static \$itemClass = 'IPS\cms\Records\RecordsTopicSync{$databaseId}';
|
||||
public static \$title = 'content_record_comments_title_{$databaseId}';
|
||||
}
|
||||
EOF;
|
||||
PHP;
|
||||
eval( $data );
|
||||
}
|
||||
|
||||
@@ -427,7 +519,7 @@ class _Application extends \IPS\Application
|
||||
|
||||
$link = (string) \IPS\Http\Url::ips('docs/pages_docs');
|
||||
|
||||
$content = <<<EOF
|
||||
$content = <<<HTML
|
||||
<p>Welcome to Pages!</p>
|
||||
<p>Pages extends your site with custom content management designed especially for communities.
|
||||
Create brand new sections of your community using features like blocks, databases and articles,
|
||||
@@ -437,7 +529,7 @@ Build blocks that pull in all kinds of data from throughout your community to cr
|
||||
or use one of the ready-made widgets we include with the Invision Community.</p>
|
||||
<p><br></p>
|
||||
<p><a href="{$link}">View our Pages documentation</a></p>
|
||||
EOF;
|
||||
HTML;
|
||||
|
||||
$titleField = 'field_' . $database->field_title;
|
||||
$contentField = 'field_' . $database->field_content;
|
||||
@@ -494,7 +586,7 @@ EOF;
|
||||
|
||||
$defaultWidgets = array();
|
||||
$buttonUrl = (string) \IPS\Http\Url::internal( 'applications/cms/interface/default/block_arrow.png', 'none' );
|
||||
$defaultContent = <<<EOF
|
||||
$defaultContent = <<<HTML
|
||||
<p>
|
||||
<strong>Welcome to Pages!</strong>
|
||||
</p>
|
||||
@@ -503,7 +595,7 @@ EOF;
|
||||
<br>
|
||||
You can move, add and edit blocks without the need for complex coding!
|
||||
</p>
|
||||
EOF;
|
||||
HTML;
|
||||
|
||||
/* Default WYSIWYG widget */
|
||||
$defaultWidgets[] = array(
|
||||
|
||||
Reference in new issue
Block a user