Plugin: Improve FB login button

pull/3294/head
Angel Fernando Quiroz Campos 5 years ago
parent c00a9c1173
commit 77d90fdc9f
  1. BIN
      plugin/add_facebook_login_button/img/cnx_fb.png
  2. 0
      plugin/add_facebook_login_button/img/index.html
  3. 2
      plugin/add_facebook_login_button/index.php
  4. 15
      plugin/add_facebook_login_button/template.tpl

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

@ -7,7 +7,7 @@ if (api_is_anonymous()) {
require_once api_get_path(SYS_CODE_PATH)."auth/external_login/facebook.inc.php"; require_once api_get_path(SYS_CODE_PATH)."auth/external_login/facebook.inc.php";
$_template['show_message'] = true; $_template['show_message'] = true;
// the default title // the default title
$button_url = api_get_path(WEB_PLUGIN_PATH)."add_facebook_login_button/img/cnx_fb.png"; $button_url = '';
$href_link = facebookGetLoginUrl(); $href_link = facebookGetLoginUrl();
if (!empty($plugin_info['settings']['add_facebook_login_button_facebook_button_url'])) { if (!empty($plugin_info['settings']['add_facebook_login_button_facebook_button_url'])) {
$button_url = api_htmlentities($plugin_info['settings']['add_facebook_login_button_facebook_button_url']); $button_url = api_htmlentities($plugin_info['settings']['add_facebook_login_button_facebook_button_url']);

@ -1,5 +1,14 @@
{% if add_facebook_login_button.show_message %} {% if add_facebook_login_button.show_message %}
<a href="{{add_facebook_login_button.facebook_href_link}}"> <hr>
<img src="{{add_facebook_login_button.facebook_button_url}}" style="margin-left:15px; border-radius:0"/> {% if add_facebook_login_button.facebook_button_url %}
</a> <a href="{{ add_facebook_login_button.facebook_href_link }}" title="{{ 'FacebookMainActivateTitle'|get_lang }}">
<img src="{{ add_facebook_login_button.facebook_button_url }}"
alt="{{ 'FacebookMainActivateTitle'|get_lang }}" style="display: block; margin: 0 auto;">
</a>
{% else %}
<a href="{{ add_facebook_login_button.facebook_href_link }}" class="btn btn-primary btn-block">
<span class="fa fa-facebook fa-fw" aria-hidden="true"></span> {{ 'FacebookMainActivateTitle'|get_lang }}
</a>
{% endif %}
<hr style="margin-bottom: 10px;">
{% endif %} {% endif %}

Loading…
Cancel
Save