1{* $Id$ *}
2
3{title help="Social networks"}{tr}Social networks{/tr}{/title}
4
5{include file='tiki-mytiki_bar.tpl'}
6
7{tabset name="mytiki_user_preference"}
8	{tab name="{tr}Accounts{/tr}"}
9		<h2>{tr}Accounts{/tr}</h2>
10
11		<form action="tiki-socialnetworks.php" method="post">
12			<h2><img src="img/icons/twitter_t_logo_32.png" alt="Twitter" width="32" height="32"> Twitter</h2>
13			{if $twitterRegistered==0}
14				{remarksbox type="note" title="{tr}Note{/tr}"}
15					{tr}To use Twitter integration, the site admin must register this site as an application at <a href="http://twitter.com/oauth_clients/" class="alert-link" target="_blank">http://twitter.com/oauth_clients/</a> and allow write access for the application.{/tr}
16				{/remarksbox}
17			{else}
18				<div class="form-group row">
19					<div class="col-sm-12">
20					{if $twitter}
21						{button href="tiki-socialnetworks.php?remove_twitter=true" _text="{tr}Remove{/tr}"}
22						{tr}Twitter authorisation.{/tr}
23					{else}
24						{if $show_removal}
25							<a href="https://twitter.com/settings/connections" target="_blank">{tr}Click here{/tr}</a> {tr}to manage your authorisations at Twitter{/tr}.<br>
26						{else}
27							{* Can't use button here, we need the reload/redirect to work *}
28							<a class="button btn btn-primary" href="tiki-socialnetworks.php?request_twitter=true">Authorize</a>
29							{tr}this site with twitter.com to use Twitter integration of this site.{/tr}
30						{/if}
31					{/if}
32					</div>
33				</div>
34			{/if}
35			<h2><img src="img/icons/facebook-logo_32.png" alt="Facebook" width="32" height="32"> Facebook</h2>
36			{if $facebookRegistered==0}
37				{remarksbox type="note" title="{tr}Note{/tr}"}
38					{tr}To use Facebook integration, the site admin must register this site as an application at <a href="http://developers.facebook.com/setup/" class="alert-link" target="_blank">http://developers.facebook.com/setup/</a> first.{/tr}
39				{/remarksbox}
40			{else}
41				<div class="form-group row">
42					<div class="col-sm-12">
43					{if $facebook}
44						{button href="tiki-socialnetworks.php?remove_facebook=true" _text="{tr}Remove{/tr}"}
45						{tr}Facebook authorisation.{/tr}
46					{else}
47						{if $show_removal}
48							<a href="http://facebook.com/editapps.php" target="_blank">{tr}Click here{/tr}</a> {tr}to manage your authorizations at Facebook{/tr}.<br>
49						{else}
50							{* Can't use button here, we need the reload/redirect to work *}
51							<a class="button btn btn-primary" href="tiki-socialnetworks.php?request_facebook=true">Authorize</a>
52							{tr}this site within facebook.com to use Facebook integration with this site.{/tr}
53						{/if}
54					{/if}
55					</div>
56				</div>
57			{/if}
58			<h2>LinkedIn</h2>
59			{if $linkedInRegistered==0}
60				{remarksbox type="note" title="{tr}Note{/tr}"}
61					{tr}To use LinkedIn integration, the site admin must register this site as an application at <a href="https://www.linkedin.com/secure/developer" class="alert-link" target="_blank">https://www.linkedin.com/secure/developer</a> first.{/tr}
62				{/remarksbox}
63			{else}
64				<div class="form-group row">
65					<div class="col-sm-12">
66					{if $linkedIn}
67						{button href="tiki-socialnetworks_linkedin.php?remove=true" _text="{tr}Remove{/tr}"}
68						{tr}LinkedIn authorisation.{/tr}
69					{else}
70						<a class="button btn btn-primary" href="tiki-socialnetworks_linkedin.php?link=true">Authorize</a>
71						{tr}this site to link your user to your LinkedIn account.{/tr}
72					{/if}
73					</div>
74				</div>
75			{/if}
76			<h2>bit.ly</h2>
77			{if $prefs.socialnetworks_bitly_sitewide=='y'}
78				{remarksbox type="note" title="{tr}Note{/tr}"}
79					{tr}The site admin has set up a global account which will be used for this site{/tr}.
80				{/remarksbox}
81			{else}
82				<div class="form-group row">
83					<label class="col-form-label col-sm-3">{tr}bit.ly Login{/tr}</label>
84					<div class="col-sm-7">
85						<input type="text" name="bitly_login" value="{$bitly_login}" class="form-control">
86					</div>
87				</div>
88				<div class="form-group row">
89					<label class="col-form-label col-sm-3">{tr}bit.ly Key{/tr}</label>
90					<div class="col-sm-7">
91						<input type="text" name="bitly_key" value="{$bitly_key}" class="form-control">
92					</div>
93				</div>
94			{/if}
95			<div class="form-group row">
96				<div class="col-sm-12">
97					<input type="submit" class="btn btn-primary" name="accounts" value="{tr}Save changes{/tr}">
98				</div>
99			</div>
100		</form>
101	{/tab}
102{/tabset}
103