login_shadowbox.pages.inc

Functions

File

sites/all/modules/local_contrib/shadowbox/login_shadowbox/login_shadowbox.pages.inc
View source
  1. <?php
  2. function login_shadowbox_login() {
  3. _login_shadowbox_js_css();
  4. // LOGIN FORM BEGIN
  5. $login_form = '<div id="shadowbox_login" class="shadowbox_login_wrapper">';
  6. $login_form .= '<button class="shadowbox_login_close_button">x</button>';
  7. // add login form
  8. $form = drupal_get_form("user_login");
  9. $login_form .= drupal_render($form);
  10. // add the registration and reset password links
  11. if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
  12. $items[] = l(t('Create new account'), 'user/register', array('attributes' => array('title' => t('Create a new user account.'))));
  13. }
  14. $items[] = l(t('Request new password'), 'user/password', array('attributes' => array('title' => t('Request new password via e-mail.'))));
  15. $links['links'] = array('#markup' => theme('item_list', array('items' => $items)));
  16. $login_form .= drupal_render($links);
  17. $login_form .= '</div>';
  18. // LOGIN FORM END
  19. print theme('login_shadowbox_page', array(
  20. 'title' => 'Login',
  21. 'content' => $login_form,
  22. ));
  23. return NULL;
  24. }
  25. function login_shadowbox_register() {
  26. _login_shadowbox_js_css();
  27. // REGISTRATION FORM BEGIN
  28. $register_form = '<div id="shadowbox_register" class="shadowbox_login_wrapper">';
  29. $register_form .= '<button class="shadowbox_login_close_button">x</button>';
  30. if (user_register_access()) $register_form .= drupal_render(drupal_get_form("user_register_form"));
  31. $register_form .= '</div>';
  32. // REGISTRATION FORM END
  33. print theme('login_shadowbox_page', array(
  34. 'title' => 'Registration',
  35. 'content' => $register_form,
  36. ));
  37. return NULL;
  38. }
  39. function login_shadowbox_password() {
  40. _login_shadowbox_js_css();
  41. // RESET PASSWORD FORM BEGIN
  42. module_load_include('inc', 'user', 'user.pages');
  43. $password_form = '<div id="shadowbox_password" class="shadowbox_login_wrapper">';
  44. $password_form .= '<button class="shadowbox_login_close_button">x</button>';
  45. $password_form .= drupal_render(drupal_get_form("user_pass"));
  46. $password_form .= '</div>';
  47. // RESET PASSWORD FORM END
  48. print theme('login_shadowbox_page', array(
  49. 'title' => 'Registration',
  50. 'content' => $password_form,
  51. ));
  52. return NULL;
  53. }
  54. function _login_shadowbox_js_css() {
  55. $path = drupal_get_path('module', 'login_shadowbox');
  56. $css_path = variable_get('login_shadowbox_css', $path . '/css/login_shadowbox.css');
  57. drupal_add_css($css_path, array('group' => 'CSS_DEFAULT'));
  58. drupal_add_js($path . '/scripts/login_shadowbox_messages.js');
  59. }
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.