diff --git a/modules/cotesud.php b/modules/cotesud.php new file mode 100644 index 0000000..3b660e1 --- /dev/null +++ b/modules/cotesud.php @@ -0,0 +1,43 @@ +. + */ + + +require_once "email.php"; + +class CoteSud extends Email +{ + function getName() { return "CoteSud"; } + + function getDescription() { return "Sends an email for each new notification that was created the current day between 7h am and 11h am"; } + + function manageNotification($fb_object, $notification) + { + // Invalid after 12h am + if (date("H") > 12) return; + + $cur_day = date("d"); + $d = date_parse($notification["created_time"]); + + // Today between 07h am and 11h am + if ($d["hour"] >= 07 && $d["hour"] <= 11 && $d["day"] == $cur_day) + parent::manageNotification($fb_object, $notification); + } +} +?> \ No newline at end of file diff --git a/modules/email.php b/modules/email.php index 8a226fa..0f0393a 100755 --- a/modules/email.php +++ b/modules/email.php @@ -70,16 +70,6 @@ class Email extends Module } $message = 'From ' . $notification["from"]["name"] . " :

"; - /* switch($notification["type"]) */ - /* { */ - /* case "video": */ - /* case "photo": */ - /* if (array_key_exists("message", $notification)) */ - /* $message .= '
'; */ - /* if (array_key_exists("caption", $notification)) */ - /* $message .= $notification["caption"] . "
"; */ - /* break; */ - /* } */ if (array_key_exists("picture", $notification)) $message .= '
'; diff --git a/ressources/f2email.css b/ressources/f2email.css index 70c456b..c8b3dd2 100644 --- a/ressources/f2email.css +++ b/ressources/f2email.css @@ -121,4 +121,8 @@ a.bulle:hover span { a.title_link, a.title_link:visited, a.title_link:hover { color:black; text-decoration:none; +} + +.remove { + display:inline; } \ No newline at end of file