[Pro] Sitelok

Hi, I am trying to setup Sitelok to add a log in section to my site. Adrian form Vibralogix has been so very helpful but doesn’t have freeway specific knowledge.
I have designed a customised log in form to match my site and am trying to add the sitelok code to it.

Adrian informs me I need to:

  1. Add this code at the very top of pagewithlogin.php (before DOCTYPE)
<?php $groupswithaccess="PUBLIC"; $loginpage="pagewithlogin.php"; $logoutpage="pagewithlogin.php"; $loginredirect=2; require_once("slpw/sitelokpw.php"); ?>
  1. Replace:

with

If freeway lets you define the action , method and name for the form you may be able to set these there.

  1. Anywhere between and is ok.
<?php siteloklogin(); ?>

Help with how to achieve this within Freeway would be fab :o) thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Aug 15, 2012, at 8:03 AM, gfel wrote:

Hi, I am trying to setup Sitelok to add a log in section to my site. Adrian form Vibralogix has been so very helpful but doesn’t have freeway specific knowledge.
I have designed a customised log in form to match my site and am trying to add the sitelok code to it.

Adrian informs me I need to:

  1. Add this code at the very top of pagewithlogin.php (before DOCTYPE)
<?php $groupswithaccess="PUBLIC"; $loginpage="pagewithlogin.php"; $logoutpage="pagewithlogin.php"; $loginredirect=2; require_once("slpw/sitelokpw.php"); ?>

To do this, use the Page / HTML Markup dialog, switch to Before HTML, and paste. Be sure to avoid any extra lines of white space before or after the <?php ?> delimiters.

  1. Replace:

with

Page / Form Setup. Use Extended to add the name attribute and onsubmit call, and paste the <?php print $startpage; ?> into the Action field.

If freeway lets you define the action , method and name for the form you may be able to set these there.

  1. Anywhere between and is ok.
<?php siteloklogin(); ?>

Draw or insert inline a single Markup Item to hold this last bit. It can go anywhere on the page, as Freeway always wraps the entire page contents with the form tag.

Walter

Help with how to achieve this within Freeway would be fab :o) thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter, 1 & 3 are clear thank you. However I do not fully follow 2). My form is text fields within a table. What do I click on to use the Extended and I am not sure which action field you mean?
Thanks :o)


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

From the main menu, choose Page / Form Setup. In there, you will see fields to set the form’s Action*, Method and Encoding, and on the other tabs, the hidden fields, and extended attributes of the form tag itself. onsubmit is one such extended attribute. To add this, follow these steps.

  1. Click on the Extended tab if it isn’t already selected.
  2. Click New.
  3. In the resulting dialog, enter onsubmit in the Name field and return validatelogin() in the Value field. Do not add any of the other punctuation or quotation marks that were included in the raw HTML example you quoted. (If you’re reading this in Mail, don’t include the back-tick characters I used to wrap the code, those tell the Web view of this list to style the type as code and not curl any quotes.)
  4. Okay out of the stack of dialogs.

When you publish, you should see the same HTML (more or less, order of attributes is not important) as the example you were working from.

Walter

*It’s a bit of a name collision – Action, in the context of a form, equals “where do I send this thing?”, rather than anything to do with Freeway Actions.

On Aug 15, 2012, at 9:26 AM, gfel wrote:

Thanks Walter, 1 & 3 are clear thank you. However I do not fully follow 2). My form is text fields within a table. What do I click on to use the Extended and I am not sure which action field you mean?
Thanks :o)


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter that’s great. Could I ask one more thing. Please can you tell me how to add this to a log out graphic button.

To add a logout you just need to create a link or button using <php
siteloklogout(); ?> as the hyperlink.

For example:-
Logout

Many thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sure. Just paste that code (<?php siteloklogout()?>) in the URL field of the Hyperlink dialog (external tab) when you make your logout button or text link. Command-K opens that dialog, or you can choose it from the main menu with Edit / Hyperlink.

Walter

On Aug 15, 2012, at 3:56 PM, gfel wrote:

Thanks Walter that’s great. Could I ask one more thing. Please can you tell me how to add this to a log out graphic button.

To add a logout you just need to create a link or button using <php
siteloklogout(); ?> as the hyperlink.

For example:-
Logout

Many thanks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter, Does the protocol selection remain on other?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you mean Method, that should be set to POST, according to the directions you got from SiteLok.

Walter

On Aug 16, 2012, at 4:22 AM, gfel wrote:

Thanks Walter, Does the protocol selection remain on other?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just to let you all know, Adrian from Virbralogix has kindly written us a Sitelok Manual specifically for Freeway Pro… :o))))
Free download here:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options