Elgg  Version 1.9
login_dropdown.php
Go to the documentation of this file.
1 <?php
6 if (elgg_is_logged_in()) {
7  return true;
8 }
9 
11 if (elgg_get_config('https_login')) {
12  $login_url = str_replace("http:", "https:", elgg_get_site_url());
13 }
14 
15 $body = elgg_view_form('login', array('action' => "{$login_url}action/login"), array('returntoreferer' => TRUE));
16 ?>
17 <div id="login-dropdown">
18  <?php
19  echo elgg_view('output/url', array(
20  'href' => 'login#login-dropdown-box',
21  'rel' => 'popup',
22  'class' => 'elgg-button elgg-button-dropdown',
23  'text' => elgg_echo('login'),
24  ));
25  echo elgg_view_module('dropdown', '', $body, array('id' => 'login-dropdown-box'));
26  ?>
27 </div>
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
Definition: sessions.php:56
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1197
fieldset div
Definition: admin.php:462
if(elgg_get_config('https_login')) $body
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg echo
Translates a string.
Definition: languages.js:43
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition: views.php:1280
if(elgg_is_logged_in()) $login_url
Elgg drop-down login form.