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

Last change on this file since 29087 was 29087, checked in by mistic100, 10 years ago

add Vkontakte

File size: 7.9 KB
Line 
1{combine_css path=$OAUTH_PATH|cat:'admin/template/style.css'}
2{combine_css path=$OAUTH_PATH|cat:'template/oauth_sprites.css'}
3
4{footer_script}
5jQuery("select.enable").change(function() {
6  var $top = $(this).closest("div.provider");
7  var p = $top.data('p');
8 
9  if ($(this).val()=='true') {
10    $top.find("td.keys").show();
11    $top.removeClass('disabled');
12    $top.addClass('enabled');
13  }
14  else {
15    $top.find("td.keys").hide();
16    $top.removeClass('enabled');
17    $top.addClass('disabled');
18  }
19});
20
21jQuery("#close_help").click(function() {
22  jQuery("#help_container").animate({ "margin-right": "-550px" }, 'fast');
23  return false;
24});
25
26jQuery(".open-help").click(function() {
27  var $top = $(this).closest("div.provider");
28  var p = $top.data('p');
29 
30  $("#help_container h5").html($top.find("h4").html());
31  $("#help_container div").html($top.find("div.help").html());
32  $("#help_container").animate({ "margin-right": "0px" }, 'fast');
33  return false;
34});
35{/footer_script}
36
37
38<div class="titrePage">
39        <h2>Social Connect</h2>
40</div>
41
42<div id="help_container">
43  <a href="#" id="close_help" title="{'Close'|translate}">&times;</a>
44  <h5></h5>
45  <div></div>
46</div>
47
48<form method="post" action="" class="properties">
49<fieldset id="commentsConf">
50
51{foreach from=$PROVIDERS item=provider key=p}
52  <div data-p="{$p}" class="provider {$p} {if $CONFIG[$p].enabled}enabled{else}disabled{/if}">
53    <h4>{$provider.name}</h4>
54   
55    <table><tr>
56      <td>
57        <span class="oauth_38px {$p|strtolower}"></span>
58      </td>
59     
60      <td>
61        <select name="providers[{$p}][enabled]" class="enable">
62          <option value="true" {if $CONFIG[$p].enabled}selected="selected"{/if}>{'Enabled'|translate}</option>
63          <option value="false" {if not $CONFIG[$p].enabled}selected="selected"{/if}>{'Disabled'|translate}</option>
64        </select>
65        <br><a href="#" class="open-help">{'Help'|translate}</a>
66      </td>
67     
68      {if $provider.new_app_link}
69      <td class="keys" {if not $CONFIG[$p].enabled}style="display:none;"{/if}>
70        {if $provider.require_client_id}
71          <label for="{$p}_app_id">Application/Client ID</label>
72          <input type="text" id="{$p}_app_id" name="providers[{$p}][keys][id]" value="{$CONFIG[$p].keys.id}">
73        {else}
74          <label for="{$p}_key">Application Key</label>
75          <input type="text" id="{$p}_key" name="providers[{$p}][keys][key]" value="{$CONFIG[$p].keys.key}">
76        {/if}
77          <label for="{$p}_secret">Application Secret</label>
78          <input type="text" id="{$p}_secret" name="providers[{$p}][keys][secret]" value="{$CONFIG[$p].keys.secret}">
79          <br>
80      </td>
81      {/if}
82    </tr></table>
83   
84    <div class="help">
85    {if $provider.new_app_link}
86      {assign var=callback_url value=$OAUTH_CALLBACK|cat:$p}
87     
88      <ol>
89        <li>{'Go to <a href="%s" target="_blank">%s</a> and create a new application'|translate:$provider.new_app_link:$provider.new_app_link}</li>
90        <li>{'Fill out any required fields such as the application name and description'|translate}</li>
91       
92      {if $p=='Facebook'}
93        <li>{'Go to <b>Settings -> Advanced</b> and set <b>Valid OAuth redirect URIs</b> to <em>%s</em>'|translate:$callback_url}</li>
94        <li>{'Go to <b>Settings -> Basic</b> and fill the contact email'|translate}</li>
95        <li>{'Click on <b>Add Platform</b>, choose <b>Website</b> and set the <b>Site URL</b> to <em>%s</em>'|translate:$WEBSITE}</li>
96        <li>{'Go to <b>Status & Review</b> and set the app public by clicking the big button on top-right'|translate}</li>
97       
98      {elseif $p=='Google'}
99        <li>{'Once the process is finished, click on the newly created project'|translate}</li>
100        <li>{'On the <b>APIS & AUTH -> Credentials</b> tab, and click <b>Create new client ID</b>'|translate}</li>
101        <li>{'Set <b>%1s</b> to <em>%2s</em>'|translate:'Application Type':'Web Application'}</li>
102        <li>{'Put your website domain in the <b>%1s</b> field. It must match with the current hostname: <em>%2s</em>'|translate:'<b>Authorized Javascript origins</b>':$SERVERNAME}</li>
103        <li>{'Enter <em>%1s</em> for <b>%2s</b>'|translate:$callback_url:'Authorized redirect URI'}</li>
104     
105      {elseif $p=='Instagram'}
106        <li>{'Put your website domain in the <b>%1s</b> field. It must match with the current hostname: <em>%2s</em>'|translate:'<b>Website</b>':$WEBSITE}</li>
107        <li>{'Enter <em>%1s</em> for <b>%2s</b>'|translate:$callback_url:'OAuth redirect_uri'}</li>
108       
109      {elseif $p=='LinkedIn'}
110        <li>{'Put your website domain in the <b>%1s</b> field. It must match with the current hostname: <em>%2s</em>'|translate:'<b>Website URL</b>':$WEBSITE}</li>
111        <li>{'Set <b>%1s</b> to <em>%2s</em>'|translate:'Default Scope':'r_basicprofile & r_emailaddress'}</li>
112        <li>{'Enter <em>%1s</em> for <b>%2s</b>'|translate:$callback_url:'OAuth 2.0 Redirect URLs'}</li>
113     
114      {elseif $p=='Tumblr'}
115        <li>{'Put your website domain in the <b>%1s</b> field. It must match with the current hostname: <em>%2s</em>'|translate:'<b>Application website</b>':$WEBSITE}</li>
116        <li>{'Enter <em>%1s</em> for <b>%2s</b>'|translate:$callback_url:'Default callback URL'}</li>
117     
118      {elseif $p=='Twitter'}
119        <li>{'Put your website domain in the <b>%1s</b> field. It must match with the current hostname: <em>%2s</em>'|translate:'<b>Website</b>':$WEBSITE}</li>
120        <li>{'Enter <em>%1s</em> for <b>%2s</b>'|translate:$callback_url:'Callback URL'}</li>
121     
122      {elseif $p=='Live'}
123        <li>{'Go to <b>API Parameters</b> and set <em>%s</em> for <b>Redirect URL</b>'|translate:$WEBSITE}
124       
125      {elseif $p=='Vkontakte'}
126        <li>{'Set <b>%1s</b> to <em>%2s</em>'|translate:'Category':'Website'}</li>
127        <li>{'Set <b>%1s</b> to <em>%2s</em>'|translate:'Site address':$WEBSITE}</li>
128        <li>{'Put your website domain in the <b>%1s</b> field. It must match with the current hostname: <em>%2s</em>'|translate:'<b>Base domain</b>':$SERVERNAME}</li>
129        <li>{'Go to the <b>Settings</b> tab after creating the app'|translate}</li>
130     
131      {elseif $p=='Yahoo'}
132        <li>{'Set <b>%1s</b> to <em>%2s</em>'|translate:'Kind of Application':'Web-based'}</li>
133        <li>{'Put your website domain in the <b>%1s</b> field. It must match with the current hostname: <em>%2s</em>'|translate:'<b>Home Page URL</b>':$WEBSITE}</li>
134        <li>{'Set <b>%1s</b> to <em>%2s</em>'|translate:'Access Scopes':'This app requires access to private user data'}</li>
135        <li>{'Enter <em>%1s</em> for <b>%2s</b>'|translate:$callback_url:'Callback Domain'}</li>
136        <li>{'Select these APIs: <b>Contacts</b> as <em>Read</em> and <b>Social Directory</b> as <em>Read Public</em>'|translate}</li>
137     
138      {elseif $p=='px500'}
139        <li>{'Put your website domain in the <b>%1s</b> field. It must match with the current hostname: <em>%2s</em>'|translate:'<b>Application URL</b>':$WEBSITE}</li>
140        <li>{'Enter <em>%1s</em> for <b>%2s</b>'|translate:$callback_url:'Callback URL'}</li>
141        <li>{'Once the application is created, click <b>See application details</b>'|translate}</li>
142     
143      {/if}
144     
145        <li>{'Once you have registered, copy and past the created application credentials into this setup page'|translate}</li>
146      </ol>
147    {else}
148      <p style="text-align:left;">
149      {if $p=='Flickr' or $p=='Steam' or $p=='Wordpress'}
150        {'Based on OpenID'|translate}</br>
151      {/if}
152      {'No registration required'|translate}<br>
153      <a href="{$provider.about_link}" target="_blank">{'About'|translate}</a>
154      </p>
155    {/if}
156    </div>
157  </div>
158{/foreach}
159
160</fieldset>
161
162<p style="text-align:left;"><input type="submit" name="save_config" value="{'Save Settings'|translate}"></p>
163 
164</form>
165
166<div style="text-align:right;">
167  Icons from : <a href="http://www.wpzoom.com" target="_blank">WPZOOM</a> |
168  Library : <a href="http://hybridauth.sourceforge.net" target="_blank">HybridAuth</a>
169</div>
Note: See TracBrowser for help on using the repository browser.