source: extensions/oAuth/admin/template/providers.tpl @ 20373

Last change on this file since 20373 was 20373, checked in by mistic100, 11 years ago

Complete help for Yahoo

File size: 6.3 KB
Line 
1{combine_css path=$OAUTH_PATH|@cat:"admin/template/style.css"}
2
3{footer_script}{literal}
4jQuery("select.enable").change(function() {
5  var $top = $(this).closest("div.provider");
6  var p = $top.data('p');
7 
8  if ($(this).val()=='true') {
9    $top.find("td.keys").show();
10    $top.removeClass('disabled');
11    $top.addClass('enabled');
12  }
13  else {
14    $top.find("td.keys").hide();
15    $top.removeClass('enabled');
16    $top.addClass('disabled');
17  }
18});
19
20jQuery("#close_help").click(function() {
21  jQuery("#help_container").animate({"margin-right": "-550px"}, 'fast');
22  return false;
23});
24
25jQuery(".open-help").click(function() {
26  var $top = $(this).closest("div.provider");
27  var p = $top.data('p');
28 
29  $("#help_container h5").html($top.find("h4").html());
30  $("#help_container div").html($top.find("div.help").html());
31  $("#help_container").animate({"margin-right": "0px"}, 'fast');
32  return false;
33});
34{/literal}{/footer_script}
35
36
37<div class="titrePage">
38        <h2>OAuth</h2>
39</div>
40
41<div id="help_container">
42  <a href="#" id="close_help" title="{'Close'|@translate}">&times;</a>
43  <h5></h5>
44  <div></div>
45</div>
46
47<form method="post" action="" class="properties">
48<fieldset id="commentsConf">
49
50{foreach from=$PROVIDERS item=provider key=p}
51  <div data-p="{$p}" class="provider {$p} {if $CONFIG[$p].enabled}enabled{else}disabled{/if}">
52    <h4>{$provider.provider_name}</h4>
53   
54    <table><tr>
55      <td>
56        <img src="{$OAUTH_PATH}template/icons/38px/{$p|strtolower}.png">
57      </td>
58     
59      <td>
60        <select name="providers[{$p}][enabled]" class="enable">
61          <option value="true" {if $CONFIG[$p].enabled}selected="selected"{/if}>{'Enabled'|@translate}</option>
62          <option value="false" {if not $CONFIG[$p].enabled}selected="selected"{/if}>{'Disabled'|@translate}</option>
63        </select>
64        <br><a href="#" class="open-help">{'Help'|@translate}</a>
65      </td>
66     
67      {if $provider.new_app_link}
68      <td class="keys" {if not $CONFIG[$p].enabled}style="display:none;"{/if}>
69        {if $provider.require_client_id}
70          <label for="{$p}_app_id">Application ID</label>
71          <input type="text" id="{$p}_app_id" name="providers[{$p}][keys][id]" value="{$CONFIG[$p].keys.id}">
72        {else}
73          <label for="{$p}_key">Application Key</label>
74          <input type="text" id="{$p}_key" name="providers[{$p}][keys][key]" value="{$CONFIG[$p].keys.key}">
75        {/if}
76          <label for="{$p}_secret">Application Secret</label>
77          <input type="text" id="{$p}_secret" name="providers[{$p}][keys][secret]" value="{$CONFIG[$p].keys.secret}">
78          <br>
79      </td>
80      {/if}
81    </tr></table>
82   
83    <div class="help">
84    {if $provider.new_app_link}
85      <ol>
86        <li>{'Go to <a href="%s" target="_blank">%s</a> and create a new application'|@translate|sprintf:$provider.new_app_link:$provider.new_app_link}</li>
87       
88      {if $p=='Google'}
89        <li>{'On the <b>API Access</b> tab, <b>create an OAuth 2.0 Client ID</b>'|@translate}</li>
90        <li>{'Fill out any required fields such as the application name and description'|@translate}</li>
91        <li>{'On the <b>Create Client ID</b> popup, switch to advanced settings by clicking on <b>(more options)</b>'|@translate}</li>
92      {else}
93        <li>{'Fill out any required fields such as the application name and description'|@translate}</li>
94      {/if}
95       
96      {if $provider.callback}
97        <li>
98          {assign var=callback value=$OAUTH_CALLBACK|cat:$p}
99          {'Provide this URL as the Callback/Redirect URL for your application: <em>%s</em>'|@translate|sprintf:$callback}
100        </li>
101      {/if}
102     
103      {if $p=='Live'}
104        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|@translate|sprintf:'<b>Redirect Domain</b>':$SERVERNAME}</li>
105      {elseif $p=='Facebook'}
106        <li>{'Select <em>Website with facebook authentication</em> as application type'|@translate}</li>
107        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|@translate|sprintf:'<b>Site Url</b>, <b>App Domains</b>':$SERVERNAME}</li>
108      {elseif $p=='LinkedIn'}
109        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|@translate|sprintf:'<b>Website URL</b>':$SERVERNAME}</li>
110        <li>{'Set the <b>Application Type</b> to <em>Web Application</em>'|@translate}</li>
111      {elseif $p=='Yahoo'}
112        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|@translate|sprintf:'<b>Application URL</b>, <b>Application Domain</b>':$SERVERNAME}</li>
113        <li>{'Set the <b>Kind of Application</b> to <em>Web-based</em>'|@translate}</li>
114        <li>{'Set the <b>Access Scopes</b> to <em>This app will only access public...</em>'|@translate}</li>
115        <li>{'Once the application is registered update the permissions : set <b>Contacts</b> as <em>Read</em> and <b>Social Directory</b> as <em>Read Public</em>'|@translate}</li>
116      {elseif $p=='Twitter'}
117        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|@translate|sprintf:'<b>Application Website</b>, <b>Application Callback URL</b>':$SERVERNAME}</li>
118        <li>{'Set the <b>Default Access Type</b> to <em>Read only</em>'|@translate}</li>
119      {elseif $p=='Tumblr'}
120        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|@translate|sprintf:'<b>Application Website</b>, <b>Default Callback URL</b>':$SERVERNAME}</li>
121      {elseif $p=='Instagram'}
122        <li>{'Put your website domain in the %s fields. It should match with the current hostname: <em>%s</em>'|@translate|sprintf:'<b>Website</b>':$SERVERNAME}</li>
123      {/if}
124     
125        <li>{'Once you have registered, copy and past the created application credentials into this setup page'|@translate}</li>
126      </ol>
127    {else}
128      <p>{'No registration required for OpenID based providers'|@translate}</p>
129    {/if}
130    </div>
131  </div>
132{/foreach}
133
134</fieldset>
135
136<p style="text-align:left;"><input type="submit" name="save_config" value="{'Save Settings'|@translate}"></p>
137 
138</form>
139
140<div style="text-align:right;">
141  Icons from : <a href="http://www.wpzoom.com" target="_blank">WPZOOM</a> |
142  Library : <a href="http://hybridauth.sourceforge.net" target="_blank">HybridAuth</a>
143</div>
Note: See TracBrowser for help on using the repository browser.