Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -26,6 +26,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
use \IPS\Content\ClubContainer;
|
||||
use \IPS\Node\Colorize;
|
||||
use \IPS\Node\Statistics;
|
||||
use \IPS\Content\ViewUpdates;
|
||||
|
||||
/**
|
||||
* @brief [ActiveRecord] Multiton Store
|
||||
@@ -1100,7 +1101,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$form->addHeader( 'tags' );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'bw_disable_tagging', !$this->forums_bitoptions['bw_disable_tagging'], FALSE, array( 'togglesOn' => array( 'bw_disable_prefixes', 'forum_tag_predefined' ) ), NULL, NULL, NULL, 'bw_disable_tagging' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'bw_disable_prefixes', !$this->forums_bitoptions['bw_disable_prefixes'], FALSE, array(), NULL, NULL, NULL, 'bw_disable_prefixes' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'forum_tag_predefined', $this->tag_predefined ?: NULL, FALSE, array( 'autocomplete' => array( 'unique' => 'true' ), 'nullLang' => 'forum_tag_predefined_unlimited' ), NULL, NULL, NULL, 'forum_tag_predefined' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'forum_tag_predefined', $this->tag_predefined ?: NULL, FALSE, array( 'autocomplete' => array( 'unique' => 'true', 'alphabetical' => \IPS\Settings::i()->tags_alphabetical ), 'nullLang' => 'forum_tag_predefined_unlimited' ), NULL, NULL, NULL, 'forum_tag_predefined' ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1957,6 +1958,9 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'club_node_public', $this->id ? $this->isPublic() : 0, TRUE, array( 'options' => array( '0' => 'club_node_public_no', '1' => 'club_node_public_view', '2' => 'club_node_public_participate' ) ) ) );
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'bw_enable_answers_moderator', $this->id ? $this->forums_bitoptions['bw_enable_answers_moderator'] : FALSE, FALSE, array( 'togglesOn' => array( 'bw_enable_answers__member' ) ), NULL, NULL, NULL, 'forum_best_answer' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'bw_enable_answers__member', $this->id ? $this->forums_bitoptions['bw_enable_answers_member'] : FALSE, FALSE, array(), NULL, NULL, NULL, 'bw_enable_answers__member' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1983,6 +1987,23 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( array( 'bw_enable_answers_member', 'bw_enable_answers_moderator' ) as $k )
|
||||
{
|
||||
if( isset( $values[ $k ] ) )
|
||||
{
|
||||
/* If we're disabling bw_enable_answers_moderator for discussion forums, we need to make sure bw_enable_answers_member is also disabled */
|
||||
if ( $k == 'bw_enable_answers_moderator' AND !$values[ $k ] )
|
||||
{
|
||||
$this->forums_bitoptions['bw_enable_answers_moderator'] = FALSE;
|
||||
$this->forums_bitoptions['bw_enable_answers_member'] = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->forums_bitoptions[ $k ] = $values[ $k ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Use default priority for sitemaps */
|
||||
$this->ipseo_priority = -1;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ class _Topic extends \IPS\Content\Item implements
|
||||
\IPS\Content\Followable,
|
||||
\IPS\Content\Shareable,
|
||||
\IPS\Content\ReadMarkers,
|
||||
\IPS\Content\Views,
|
||||
\IPS\Content\Polls, \SplObserver,
|
||||
\IPS\Content\Ratings,
|
||||
\IPS\Content\Searchable,
|
||||
@@ -37,7 +36,7 @@ class _Topic extends \IPS\Content\Item implements
|
||||
\IPS\Content\Anonymous,
|
||||
\IPS\Content\FuturePublishing
|
||||
{
|
||||
use \IPS\forums\Topic\LiveTopic, \IPS\Content\Reactable, \IPS\Content\Reportable, \IPS\Content\Statistics, \IPS\Content\Solvable { toggleSolveComment as protected _toggleSolveComment; }
|
||||
use \IPS\forums\Topic\LiveTopic, \IPS\Content\Reactable, \IPS\Content\Reportable, \IPS\Content\Statistics, \IPS\Content\ViewUpdates, \IPS\Content\Solvable { toggleSolveComment as protected _toggleSolveComment; }
|
||||
|
||||
/**
|
||||
* @brief Not archived
|
||||
@@ -1302,7 +1301,13 @@ class _Topic extends \IPS\Content\Item implements
|
||||
{
|
||||
if ( $container and $container->tag_predefined )
|
||||
{
|
||||
return explode( ',', $container->tag_predefined );
|
||||
$return = explode( ',', $container->tag_predefined );
|
||||
if ( \IPS\Settings::i()->tags_alphabetical )
|
||||
{
|
||||
natcasesort( $return );
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
return parent::definedTags( $container );
|
||||
@@ -2295,6 +2300,11 @@ class _Topic extends \IPS\Content\Item implements
|
||||
*/
|
||||
public function showSummaryOnDesktop()
|
||||
{
|
||||
/* Hide the summary for future topics */
|
||||
if ( $this->isFutureDate() )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if ( ! \IPS\Settings::i()->forums_topics_activity_pages_show OR ( (int) \IPS\Settings::i()->forums_topics_activity_pages_show <= (int) $this->commentPageCount() ) )
|
||||
{
|
||||
$viewSettings = json_decode( \IPS\Settings::i()->forums_topic_activity, TRUE );
|
||||
@@ -2314,6 +2324,11 @@ class _Topic extends \IPS\Content\Item implements
|
||||
*/
|
||||
public function showSummaryOnMobile()
|
||||
{
|
||||
/* Hide the summary for future topics */
|
||||
if ( $this->isFutureDate() )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if ( ! \IPS\Settings::i()->forums_topics_activity_pages_show OR ( (int) \IPS\Settings::i()->forums_topics_activity_pages_show <= (int) $this->commentPageCount() ) )
|
||||
{
|
||||
$viewSettings = json_decode( \IPS\Settings::i()->forums_topic_activity, TRUE );
|
||||
|
||||
Reference in new issue
Block a user