]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - Classes/class-hook.php
really fix, thanks Mi_92
[irc/unrealircd/unrealircd-webpanel.git] / Classes / class-hook.php
index 30912a2149cd186d12231874d909522e36d9437a..1f6878f91e5c3ad2cfe1d13681e9d7e68b41cfa7 100644 (file)
@@ -25,13 +25,16 @@ define('HOOKTYPE_NAVBAR', 100);
  * This doesn't receive anything, however you must still specify an
  * parameter for your hook function, because it's referring to memory. Sorry =]
  * 
- * Currently this is only used by the "sql_auth" plugin by Valware in order to
- * redirect users immediately to the login page.
- * 
  * Putting HTML in this hook is not a good idea.
  */
 define('HOOKTYPE_PRE_HEADER', 101);
 
+/** HOOKTYPE_HEADER
+ * 
+ * This is run after/during the header is sent. You can call your global scripts, global css or whatnot from here.
+ */
+define('HOOKTYPE_HEADER', 119);
+
 /** HOOKTYPE_PRE_OVERVIEW_CARD
  * 
  * @param object $stats
@@ -83,19 +86,79 @@ define('HOOKTYPE_NOTIFICATION', 104);
 
 
 /** HOOKTYPE_PRE_FOOTER
- * $param array $empty - Doesn't do anything
+ * @param array $empty - Doesn't do anything
  * 
  * This runs inside the footer body before anything else.
  */
 define('HOOKTYPE_PRE_FOOTER', 105);
 
 /** HOOKTYPE_FOOTER
- * $param array $empty - Doesn't do anything
+ * @param array $empty - Doesn't do anything
  * 
  * This runs inside the footer body after everything else.
  */
 define('HOOKTYPE_FOOTER', 106);
+
+/** HOOKTYPE_USER_LOOKUP
+ * @param array $user [name, id]
+ */
+define('HOOKTYPE_USER_LOOKUP', 107);
+
+/** HOOKTYPE_USERMETA_ADD
+ * @param array $meta [[id, key, value], (object)PanelUser]
+ */
+define('HOOKTYPE_USERMETA_ADD', 108);
+
+/** HOOKTYPE_USERMETA_ADD
+ * @param array $meta [id, key, value]
+ */
+define('HOOKTYPE_USERMETA_DEL', 109);
+
+/** HOOKTYPE_USERMETA_ADD
+ * @param array $meta [id, key, value]
+ */
+define('HOOKTYPE_USERMETA_GET', 110);
+
+/** HOOKTYPE_USER_CREATE
+ * @param array $userinfo []
+ */
+define('HOOKTYPE_USER_CREATE', 111);
+
+/** HOOKTYPE_GET_USER_LIST
+ * @param array $userlist []
+ */
+define('HOOKTYPE_GET_USER_LIST', 112);
+
+define('HOOKTYPE_USER_DELETE', 113);
+
+define('HOOKTYPE_USER_LOGIN', 114);
+
+define('HOOKTYPE_USER_LOGIN_FAIL', 115);
+
+define('HOOKTYPE_USER_PERMISSION_LIST', 116);
+
+define('HOOKTYPE_EDIT_USER', 117);
+
+define('HOOKTYPE_RIGHTCLICK_MENU', 118);
+
+/* 119 = HOOKTYPE_HEADER (See under HOOKTYPE_PRE_HEADER) */
+
+define('HOOKTYPE_GENERAL_SETTINGS', 120);
+
+/* Array passed is $_POST[] */
+define('HOOKTYPE_GENERAL_SETTINGS_POST', 121);
+
+
+
+/** Send out a request to ask if there are any plugins which provide authentication */
+define('HOOKTYPE_AUTH_MOD', 200);
+
+/** An upgrade has been detected.
+ * @param array        $versioninfo[]
+ * Array contains: "old_version" and "new_version"
+ */
+define('HOOKTYPE_UPGRADE', 201);
+
 /** 
  *  Class for "Hook"
  * This is the main function which gets called whenever you want to use a Hook.
@@ -154,7 +217,6 @@ class Hook {
         * @param string $function The name of the function that we are removing.
         * @return void Does not reuturn anything.
         */
-
        public static function del($Hook, $function)
        {
                for ($i = 0; isset(self::$actions[$Hook][$i]); $i++)