-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3791 from Spuds/ThemeUpdates
Theme updates
- Loading branch information
Showing
51 changed files
with
8,538 additions
and
1,568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
sources/ElkArte/Mentions/MentionType/Event/Watchedboard.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/** | ||
* Handles mentions of likes | ||
* | ||
* @package ElkArte Forum | ||
* @copyright ElkArte Forum contributors | ||
* @license BSD http://opensource.org/licenses/BSD-3-Clause (see accompanying LICENSE.txt file) | ||
* | ||
* @version 2.0 dev | ||
* | ||
*/ | ||
|
||
namespace ElkArte\Mentions\MentionType\Event; | ||
|
||
use ElkArte\Mentions\MentionType\AbstractEventBoardAccess; | ||
|
||
/** | ||
* Class WatchedBoard | ||
* | ||
* Handles viewing of watched topics/board mentions only, email is done separately | ||
*/ | ||
class Watchedboard extends AbstractEventBoardAccess | ||
{ | ||
/** {@inheritDoc} */ | ||
protected static $_type = 'watchedboard'; | ||
} |
77 changes: 77 additions & 0 deletions
77
sources/ElkArte/Mentions/MentionType/Notification/Watchedboard.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
|
||
/** | ||
* Handles mentioning for watched topics with new posts. | ||
* | ||
* @package ElkArte Forum | ||
* @copyright ElkArte Forum contributors | ||
* @license BSD http://opensource.org/licenses/BSD-3-Clause (see accompanying LICENSE.txt file) | ||
* | ||
* @version 2.0 dev | ||
* | ||
*/ | ||
|
||
namespace ElkArte\Mentions\MentionType\Notification; | ||
|
||
use ElkArte\Mentions\MentionType\AbstractNotificationMessage; | ||
|
||
/** | ||
* Class WatchedBoard | ||
* | ||
* Handles notifying of members whose watched topics have received new posts | ||
* | ||
*/ | ||
class Watchedboard extends AbstractNotificationMessage | ||
{ | ||
/** {@inheritDoc} */ | ||
protected static $_type = 'watchedboard'; | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getNotificationBody($lang_data, $members) | ||
{ | ||
// Email is handled elsewhere, this is only for on-site mentions | ||
return $this->_getNotificationStrings('', [ | ||
'subject' => static::$_type, | ||
'body' => static::$_type, | ||
], $members, $this->_task); | ||
} | ||
|
||
/** | ||
* We only use the mentions interface to allow on-site mention for new topics on watched boards | ||
* Email and digests are handled in a separate process due to all the complications | ||
*/ | ||
public static function isNotAllowed($method) | ||
{ | ||
// Don't let watched be allowed to use email, that is handled by PostNotificaions | ||
if (in_array($method, ['email', 'emaildaily', 'emailweekly'])) | ||
{ | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
/** | ||
* There is no interface for this, its always available as an on-site mention and members set | ||
* from profile options notifications | ||
* | ||
* @return true | ||
*/ | ||
public static function hasHiddenInterface() | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* Only called when hasHiddenInterface is true. Returns the application settings as if | ||
* they had been selected in the ACP notifications area | ||
* | ||
* @return array Returns an array containing the settings. | ||
*/ | ||
public static function getSettings() | ||
{ | ||
return ['enable' => 1, 'notification' => 1, 'default' => [0 => 'notification']]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.