1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/12608] Add styling (CSS class) options to notifications

This will allow different notifications to have different styles

PHPBB3-12608
This commit is contained in:
PayBas
2014-05-28 22:49:16 +02:00
parent 72d29e76ce
commit 693cbd247c
9 changed files with 54 additions and 6 deletions

View File

@@ -309,6 +309,8 @@ abstract class base implements \phpbb\notification\type\type_interface
return array(
'NOTIFICATION_ID' => $this->notification_id,
'STYLING' => $this->get_styling(),
'AVATAR' => $this->get_avatar(),
'FORMATTED_TITLE' => $this->get_title(),
@@ -342,6 +344,16 @@ abstract class base implements \phpbb\notification\type\type_interface
return false;
}
/**
* Get the styling of the notification (fall back)
*
* @return string
*/
public function get_styling()
{
return '';
}
/**
* Get the user's avatar (fall back)
*

View File

@@ -30,6 +30,16 @@ class report_pm extends \phpbb\notification\type\pm
return 'report_pm';
}
/**
* Get the styling of the notification
*
* @return string
*/
public function get_styling()
{
return 'reported';
}
/**
* Language key used to output the text
*

View File

@@ -29,6 +29,16 @@ class report_post extends \phpbb\notification\type\post_in_queue
return 'report_post';
}
/**
* Get the styling of the notification
*
* @return string
*/
public function get_styling()
{
return 'reported';
}
/**
* Language key used to output the text
*

View File

@@ -87,6 +87,13 @@ interface type_interface
*/
public function load_special($data, $notifications);
/**
* Get the styling of the notification
*
* @return string
*/
public function get_styling();
/**
* Get the HTML formatted title of this notification
*