root/ip/trunk/includes/functions.php
| 159 | 161 | ||
|---|---|---|---|
3324 | 3324 | ||
3325 | // Mighty Gorgon - Advanced Switches - BEGIN | 3325 | // Mighty Gorgon - Advanced Switches - BEGIN |
3326 | 3326 | ||
3327 | $new_pm_switch = false; | ||
3328 | $new_private_chat_switch = false; | ||
3329 | |||
3327 | // LOGGED IN CHECK - BEGIN | 3330 | // LOGGED IN CHECK - BEGIN |
3328 | if (!$userdata['session_logged_in']) | 3331 | if (!$userdata['session_logged_in']) |
3329 | { | 3332 | { |
... | ... | ||
3363 | $l_privmsgs_text = $lang['Login_check_pm']; | 3366 | $l_privmsgs_text = $lang['Login_check_pm']; |
3364 | $l_privmsgs_text_unread = ''; | 3367 | $l_privmsgs_text_unread = ''; |
3365 | $s_privmsg_new = 0; | 3368 | $s_privmsg_new = 0; |
3369 | |||
3370 | $icon_private_chat = $images['private_chat']; | ||
3371 | $u_private_chat = '#'; | ||
3366 | } | 3372 | } |
3367 | else | 3373 | else |
3368 | { | 3374 | { |
... | ... | ||
3437 | 3443 | ||
3438 | if ($userdata['user_new_privmsg'] && !$config['privmsg_disable']) | 3444 | if ($userdata['user_new_privmsg'] && !$config['privmsg_disable']) |
3439 | { | 3445 | { |
3446 | $new_pm_switch = true; | ||
3440 | $l_message_new = ($userdata['user_new_privmsg'] == 1) ? $lang['New_pm'] : $lang['New_pms']; | 3447 | $l_message_new = ($userdata['user_new_privmsg'] == 1) ? $lang['New_pm'] : $lang['New_pms']; |
3441 | $l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']); | 3448 | $l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']); |
3442 | 3449 | ||
... | ... | ||
3462 | $icon_pm = $images['pm_no_new_msg']; | 3469 | $icon_pm = $images['pm_no_new_msg']; |
3463 | } | 3470 | } |
3464 | 3471 | ||
3472 | $icon_private_chat = $images['private_chat']; | ||
3473 | if (!empty($userdata['user_private_chat_alert'])) | ||
3474 | { | ||
3475 | $new_private_chat_switch = true; | ||
3476 | $icon_private_chat = $images['private_chat_alert']; | ||
3477 | $u_private_chat = append_sid('ajax_shoutbox.' . PHP_EXT . '?chat_room=' . $userdata['user_private_chat_alert']); | ||
3478 | } | ||
3479 | |||
3465 | if ($userdata['user_unread_privmsg']) | 3480 | if ($userdata['user_unread_privmsg']) |
3466 | { | 3481 | { |
3467 | $l_message_unread = ($userdata['user_unread_privmsg'] == 1) ? $lang['Unread_pm'] : $lang['Unread_pms']; | 3482 | $l_message_unread = ($userdata['user_unread_privmsg'] == 1) ? $lang['Unread_pm'] : $lang['Unread_pms']; |
... | ... | ||
3901 | 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, | 3916 | 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, |
3902 | 'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new, | 3917 | 'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new, |
3903 | 'PRIVMSG_IMG' => $icon_pm, | 3918 | 'PRIVMSG_IMG' => $icon_pm, |
3919 | 'NEW_PM_SWITCH' => $new_pm_switch, | ||
3904 | 3920 | ||
3921 | 'PRIVATE_CHAT_IMG' => $icon_private_chat, | ||
3922 | 'U_PRIVATE_CHAT' => $u_private_chat, | ||
3923 | 'NEW_PRIVATE_CHAT_SWITCH' => $new_private_chat_switch, | ||
3924 | |||
3905 | 'L_USERNAME' => $lang['Username'], | 3925 | 'L_USERNAME' => $lang['Username'], |
3906 | 'L_PASSWORD' => $lang['Password'], | 3926 | 'L_PASSWORD' => $lang['Password'], |
3907 | 'L_LOGIN_LOGOUT' => $l_login_logout, | 3927 | 'L_LOGIN_LOGOUT' => $l_login_logout, |
Download diff