Jump to content

Search the Community

Showing results for tags 'login'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • Announcements
    • Business Discussion
    • Business Services
    • Sell and Buy
  • Themes & templates
    • KVS default theme
    • KVS tablet theme
    • KVS paysite theme
    • KVS basic theme 1
    • KVS basic theme 2
    • KVS basic theme 3
  • Educational / support
    • Technical Support
    • FAQ
    • Educational Series

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 2 results

  1. Most of KVS themes come with popups for utility forms, such as login and signup. If you need to refer login or signup popups, you can do that without actually having them as separate pages: https://kvs-demo.com/?login https://kvs-demo.com/?signup If you want to create separate pages for them with custom design, you can also do that by following this guide. Creating login page Step 1. In Website UI -> Pages create a new page with the following template code: {{assign var="page_title" value=$lang.html.login_title}} {{assign var="page_canonical" value=$lang.urls.login}} {{include file="include_header_general.tpl"}} <div class="content"> <div class="main-content"> <div class="main-container"> {{insert name="getBlock" block_id="logon" block_name="Logon Form"}} </div> </div> </div> {{include file="include_footer_general.tpl"}} Set page External ID to login, you can set title to Login, this is only title for admin panel. NOTE: if you have error message saying that there are no permissions to create files, you have 2 choices: Either put 777 permissions on the directory where KVS is installed (using FTP client or server File manager tool) Or manually create /login.php file in the document root with the following code: <?php require_once("admin/include/process_page.php");?> Step 2. After you saved page in Step 1, you should see Logon Form block added to this page's blocks list at the bottom. Open it for editing. Now open another browser tab and go to Website UI -> Global blocks -> Logon Form and copy template code and block parameters from there into the settings of Logon Form on the new login page. Step 3. In /.htaccess file in the root directory of your project find these 2 lines: RewriteRule ^login/$ index.php?mode=async&function=get_block&block_id=logon_logon_form&global=true [L,QSA] RewriteRule ^login-required/$ index.php?mode=async&function=get_block&block_id=logon_logon_form&global=true&error=only_for_members [L,QSA] and change them to these: RewriteRule ^login/$ login.php [L,QSA] RewriteRule ^login-required/$ login.php?error=only_for_members [L,QSA] Step 4. In Website UI -> Texts add new text for rendering title of your newly selected login page: External ID: html.login_title Default: Login Page Title Now you should be able to click on login link in header and see your new login page. Do you still see it is open in popup instead of separate page? If yes, please update this file on your server with a newer version from kvs-demo.com (only for KVS default theme): https://kvs-demo.com/static/js/main.min.js Creating signup page Step 1. In Website UI -> Pages create a new page with the following template code: {{assign var="page_title" value=$lang.html.signup_title}} {{assign var="page_canonical" value=$lang.urls.signup}} {{include file="include_header_general.tpl"}} <div class="content"> <div class="main-content"> <div class="main-container"> {{insert name="getBlock" block_id="signup" block_name="Signup Form"}} </div> </div> </div> {{include file="include_footer_general.tpl"}} Set page External ID to signup, you can set title to Signup, this is only title for admin panel. NOTE: if you have error message saying that there are no permissions to create files, you have 2 choices: Either put 777 permissions on the directory where KVS is installed (using FTP client or server File manager tool) Or manually create /login.php file in the document root with the following code: <?php require_once("admin/include/process_page.php");?> Step 2. After you saved page in Step 1, you should see Signup Form block added to this page's blocks list at the bottom. Open it for editing. Now open another browser tab and go to Website UI -> Global blocks -> Signup Form XXX and copy template code and block parameters from there into the settings of Signup Form on the new signup page. NOTE: There are multiple different signup forms support in KVS themes: Simple signup form is default, Simple2 signup form requires email as a login, Advanced signup form renders additional profile fields on signup; finally Premium signup form renders paid access options. Choose the form that you need and copy its template and settings. Step 3. In /.htaccess file in the root directory of your project find this line: RewriteRule ^signup/$ index.php?mode=async&function=get_block&block_id=signup_signup_form_simple&global=true [L,QSA] and change it to this: RewriteRule ^signup/$ signup.php [L,QSA] Step 4. In Website UI -> Texts add new text for rendering title of your newly selected signup page: External ID: html.signup_title Default: Signup Page Title Now you should be able to click on signup link in header and see your new signup page. Do you still see it is open in popup instead of separate page? If yes, please update this file on your server with a newer version from kvs-demo.com (only for KVS default theme): https://kvs-demo.com/static/js/main.min.js
  2. Signle Sign On (SSO) login feature is designed to provide easy integration of members from one site, either KVS or 3rd-party engine, into another KVS site. SSO requires user to have an active profile on original site and being logged in there. Then it is possible to render a special encrypted link from source site to KVS site and by clicking this link user will be automatically logged in to KVS site without need to register, or enter their credentials. So users will not even notice that they are being logged in to another site behind the scene. KVS will automatically create user's account in KVS database using some information provided in the encrypted link. Here are most common scenarios for using SSO in your projects: 1) You have a forum or any other site and you want to allow your forum users to upload videos into KVS, which could be installed somewhere in videos.domain.com subdomain. With very few lines of code on your forum's end you can link your forum pages to KVS upload page or KVS profile page without any other integration effort. 2) You have a primary KVS paysite and you want to provide additional access to several bonus sites also built with KVS. In this case you can build a page with listing bonus sites and providing SSO login link for every site. There are some limitations using SSO that should be well acknowledged: Users that are created by SSO will all have Active status. This means that if your KVS site has some content available to paid members only, it should be configured for Active members, not for Premium members. Users should not be allowed to register or login using other methods. SSO can't check for username or email duplicates and it basically expects that all your users are unique and managed in other application (e.g. forum or primary KVS site). By providing SSO link to your users you guarantee that each user has unique username and email. Creating SSO page in target KVS site Please go to Website UI -> Pages -> Add page and create a new page with the following data: - Title: SSO - External ID: sso - Template code: {{insert name="getBlock" block_id="logon" block_name="SSO login"}} Save and open SSO login block that will appear in this page editor after saving. In block's template code put anything that you want to be displayed in case of unexpected error, e.g.: The link you are using is not valid, please contact support Under block parameters enable these 2 (change secretkey to something random): - single_sign_on (String): secretkey - redirect_to (String): / Then save and you are done with KVS settings. Displaying SSO login links on source sites Here is the example code you need to use in your forum on any other 3rd-party site to display login link. Please note that it should only be displayed to users that are already logged in with your forum or site. Also this link should not be cached and it should be displayed in real time. Each link will expire after 1 hour. $username = 'admin'; $email = 'admin@site.com'; $time = time(); $secret_key = 'secretkey'; $sso_token = [ 'username' => $username, 'email' => $email, 'token' => $time, 'digest' => md5($username . $time . $secret_key) ]; echo "https://domain.com/sso.php?sso=" . base64_encode(json_encode($sso_token)); If you are using KVS on the other end as well, you can use the following code in KVS template (make sure to change secretkey and domain.com with your real data): {{if $smarty.session.user_id>0}} {{php}} $username = $_SESSION['user_info']['username']; $email = $_SESSION['user_info']['email']; $time = time(); $secret_key = 'secretkey'; $sso_token = [ 'username' => $username, 'email' => $email, 'token' => $time, 'digest' => md5($username . $time . $secret_key) ]; $this->assign('sso_link', "https://domain.com/sso.php?sso=" . base64_encode(json_encode($sso_token))); {{/php}} <a href="{{$sso_link}}" target="_blank">Click here to login to domain.com</a> {{/if}}
×
×
  • Create New...