Difference between revisions of "Adding the SmartSimple Login to your Website"

From SmartWiki
Jump to: navigation, search
m
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
{{Deprecated}}
 +
 +
 
==Overview==
 
==Overview==
 +
These instructions explain how to embed the [[SmartSimple]] login process within your website.
  
These instructions explain how to embed the [[SmartSimple]] login process within your website.
+
* Connecting the [[SmartSimple]] login to your website makes it easier for people to remember where to go. It also increases the exposure of the company's website to people using [[SmartSimple]].
* Connecting the [[SmartSimple]] login to your website makes it easier for people to remember where to go. It also increases the exposure of the company's website to people using [[SmartSimple]].  
+
* Every organization using [[SmartSimple]] can log into the system using the standard login (i.e. '''alias.smartsimple.com''') entry point.
* Every organization using [[SmartSimple]] can log into the system using the standard login ('''http://alias.smartsimple.com''') entry point.
 
 
* [[Alias]] is the short form reference that you create in the company settings page.
 
* [[Alias]] is the short form reference that you create in the company settings page.
These instructions assume that you are familiar with HTML and have access read/write to the web page on which you wish to enable this feature.
+
 
 +
These instructions assume that you are familiar with HTML and have access  
 +
read/write to the web page on which you wish to enable this feature.
  
 
The following examples show how these login pages can look:
 
The following examples show how these login pages can look:
  
 
[[Image:Login1.png]][[Image:Login2.png]][[Image:Login3.png]][[Image:Login4.png]]
 
[[Image:Login1.png]][[Image:Login2.png]][[Image:Login3.png]][[Image:Login4.png]]
+
 
==Step by Step Instructions==  
+
==Step by Step Instructions==
  
 
1. Use your '''Web Page Editor''' to open the website page to which you wish to add the [[SmartSimple]] login.
 
1. Use your '''Web Page Editor''' to open the website page to which you wish to add the [[SmartSimple]] login.
Line 17: Line 22:
 
2. Paste or type the following code into the required location on the page.
 
2. Paste or type the following code into the required location on the page.
  
[[Image:Login.png]]
+
<form action="http://xxxx.smartsimple.com/exlogin.jsp" method="post" name="login"><input name="alias" type="hidden" value="xxxx" />
 +
{| border="0" width="100%" cellspacing="0" cellpadding="0"
 +
|-
 +
||Username:
 +
||<input name="user" size="10" type="text" />
 +
|-
 +
||Password:
 +
||<input name="password" size="10" type="text" />
 +
|-
 +
||&nbsp;
 +
||<input name="Submit" type="submit" value="Login" />
 +
|}</form>
  
3. Replace '''xxxx''' with the company [[Alias]].
+
3. Replace '''xxxx''' with the company [[Alias]]
  
4. '''Save''' the page.
+
4. If you wish to use SSL replace http''':'''//alias.smartsimple.xxx with http'''s'''://alias.smartsimple.xxx
  
5. Add any '''additional formatting''' as required.
+
5. '''Save''' the page.
  
6. '''Test''' the page to ensure you can login successfully.
+
6. Add any '''additional formatting''' as required.
 +
 
 +
7. '''Test''' the page to ensure you can login successfully.
  
 
==Returning to the Custom Login Page when Logging Out==
 
==Returning to the Custom Login Page when Logging Out==
 
 
When a user logs out of SmartSimple they are returned to the generic "Alias" login page – not a login page that you have established using the technique shown in this document.
 
When a user logs out of SmartSimple they are returned to the generic "Alias" login page – not a login page that you have established using the technique shown in this document.
  
 
Use the following technique to take a user back to your web site login page when they log out.
 
Use the following technique to take a user back to your web site login page when they log out.
  
You should not make this change until you are sure your login page is functioning correctly, otherwise you will not be able to log into [[SmartSimple]]. If this happens please contact the help desk.
+
You should not make this change until you are sure your login page is functioning correctly, otherwise you will not be able to log into [[SmartSimple]]. If this happens please contact [[How the SmartSimple Support Desk Works|SmartSimple Support]].
  
 
7. Click the '''Configuration''', '''Global Settings''' link.
 
7. Click the '''Configuration''', '''Global Settings''' link.
Line 39: Line 56:
 
8. Go to '''Branding & Visual Settings''' section.
 
8. Go to '''Branding & Visual Settings''' section.
  
9. Select and delete all the content in the '''Login screen content''' text box.
+
9. Click the "Source" button, select and delete all the content in the '''Login screen content''' text box.
  
10. Add the following script.
+
10. Add the following variable.
  
[[Image:Login5.png]]
+
@redirect='''<nowiki>http://www.yourdomain.com/yourloginpage.html</nowiki>'''@
  
11. Replace the hyperlink reference with a reference to your '''custom login page'''.
+
11. Replace the hyperlink reference (<nowiki>http://www.yourdomain.com/yourloginpage.html</nowiki>) with a reference to your '''custom login page'''.
  
 
12. Click the '''Save''' button.
 
12. Click the '''Save''' button.
Line 53: Line 70:
 
Note: you can redirect users to any page that you wish, not just the custom login page.
 
Note: you can redirect users to any page that you wish, not just the custom login page.
  
[[Category:System Management]][[Category:JavaScript Examples]]
+
==Returning invalid login error message==
 +
If you wish to return an invalid username or password error message to your login page you can place the
 +
following script in the head portion of your login page.
 +
 
 +
You can change the “Invalid Username or Password.” message located in the showmsg function to
 +
whatever message you wish to display.
 +
 
 +
<pre>
 +
<script language="javascript">// <![CDATA[
 +
function _getrequestvar(name)
 +
{ var url= location.href;
 +
var hasQueryString = url.indexOf('?');
 +
if (hasQueryString != -1)
 +
return url.substring(hasQueryString+2+name.length ).replace(/%20/g,'
 +
').replace(/\+/g,' ');
 +
else
 +
return "";
 +
}
 +
function showmsg()
 +
{
 +
if( _getrequestvar('errmsg').length>0)
 +
return "Invalid Username or Password.";
 +
else
 +
return "";
 +
}
 +
// ]]></script>
 +
</pre>
 +
 
 +
Additionally you will need to place this second script within the area you wish the error message to be
 +
printed.
 +
 
 +
<pre>
 +
<script language="javascript">// <![CDATA[
 +
document.write(showmsg());
 +
// ]]></script>
 +
</pre>
 +
 
 +
Alternatively, if you are using a server page as your login page you can choose to use the parameter
 +
“errmsg=Invalid+User+Login.” which is passed back to your page in order to display the error message.
 +
 
 +
==See Also==
 +
* [[Providing a Customized Login Hyperlink that Redirects the User to a Specific Record]]

Latest revision as of 13:45, 25 June 2019


Ambox warning pn.png This feature is deprecated and should no longer be used, but may still be available for reasons of backwards compatibility.


Overview

These instructions explain how to embed the SmartSimple login process within your website.

  • Connecting the SmartSimple login to your website makes it easier for people to remember where to go. It also increases the exposure of the company's website to people using SmartSimple.
  • Every organization using SmartSimple can log into the system using the standard login (i.e. alias.smartsimple.com) entry point.
  • Alias is the short form reference that you create in the company settings page.
These instructions assume that you are familiar with HTML and have access 
read/write to the web page on which you wish to enable this feature.

The following examples show how these login pages can look:

Login1.pngLogin2.pngLogin3.pngLogin4.png

Step by Step Instructions

1. Use your Web Page Editor to open the website page to which you wish to add the SmartSimple login.

2. Paste or type the following code into the required location on the page.

<form action="http://xxxx.smartsimple.com/exlogin.jsp" method="post" name="login"><input name="alias" type="hidden" value="xxxx" />

Username: <input name="user" size="10" type="text" />
Password: <input name="password" size="10" type="text" />
  <input name="Submit" type="submit" value="Login" />
</form>

3. Replace xxxx with the company Alias

4. If you wish to use SSL replace http://alias.smartsimple.xxx with https://alias.smartsimple.xxx

5. Save the page.

6. Add any additional formatting as required.

7. Test the page to ensure you can login successfully.

Returning to the Custom Login Page when Logging Out

When a user logs out of SmartSimple they are returned to the generic "Alias" login page – not a login page that you have established using the technique shown in this document.

Use the following technique to take a user back to your web site login page when they log out.

You should not make this change until you are sure your login page is functioning correctly, otherwise you will not be able to log into SmartSimple. If this happens please contact SmartSimple Support.

7. Click the Configuration, Global Settings link.

8. Go to Branding & Visual Settings section.

9. Click the "Source" button, select and delete all the content in the Login screen content text box.

10. Add the following variable.

@redirect=http://www.yourdomain.com/yourloginpage.html@

11. Replace the hyperlink reference (http://www.yourdomain.com/yourloginpage.html) with a reference to your custom login page.

12. Click the Save button.

Users now logging out from SmartSimple will be redirected to this page.

Note: you can redirect users to any page that you wish, not just the custom login page.

Returning invalid login error message

If you wish to return an invalid username or password error message to your login page you can place the following script in the head portion of your login page.

You can change the “Invalid Username or Password.” message located in the showmsg function to whatever message you wish to display.

<script language="javascript">// <![CDATA[
function _getrequestvar(name)
{ var url= location.href;
var hasQueryString = url.indexOf('?');
if (hasQueryString != -1)
return url.substring(hasQueryString+2+name.length ).replace(/%20/g,'
').replace(/\+/g,' ');
else
return "";
}
function showmsg()
{
if( _getrequestvar('errmsg').length>0)
return "Invalid Username or Password.";
else
return "";
}
// ]]></script>

Additionally you will need to place this second script within the area you wish the error message to be printed.

<script language="javascript">// <![CDATA[
document.write(showmsg());
// ]]></script>

Alternatively, if you are using a server page as your login page you can choose to use the parameter “errmsg=Invalid+User+Login.” which is passed back to your page in order to display the error message.

See Also