function fp_add_message

7.x fp_add_message($msg, $type = "status", $bool_no_repeat = FALSE)
6.x fp_add_message($msg, $type = "status", $bool_no_repeat = FALSE)
4.x fp_add_message($msg, $type = "status", $bool_no_repeat = FALSE)
5.x fp_add_message($msg, $type = "status", $bool_no_repeat = FALSE)

Add a "message" to the top of the screen. Useful for short messages like "You have been logged out" or "Form submitted successfully."


String $msg: This is the string message itself.

String $type: The "type" of message. This string is added as a CSS class to the message, for theming later.

boolean $bool_no_repeat: Boolean. Should the message show more than once per page view? Set to TRUE if it should NOT.

74 calls to fp_add_message()
admin_add_degree_form_submit in modules/admin/
Submit handler for the add_degree_form.
admin_apply_draft_changes_form_submit in modules/admin/admin.module
Handles the actual moving of draft courses into production.
admin_copy_degree_form_submit in modules/admin/
admin_duplicate_year_form_submit in modules/admin/admin.module
This function should perform the actual copy of data!
admin_edit_course_form_submit in modules/admin/

... See full list


includes/, line 1834
This file contains misc functions for FlightPath


function fp_add_message($msg, $type = "status", $bool_no_repeat = FALSE) {

  $md5 = md5($type . $msg);

  if ($bool_no_repeat && isset($_SESSION ["fp_messages"]) && is_array($_SESSION ["fp_messages"])) {
    // Make sure this message isn't already in the session.
    foreach ($_SESSION ["fp_messages"] as $s) {
      if ($s ["md5"] == $md5) {

  $_SESSION ["fp_messages"][] = array("type" => $type, "msg" => $msg, "md5" => $md5);