Jump to content

Search the Community

Showing results for tags 'upload'.

  • 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 paysite theme
  • 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 1 result

  1. There is no built-in functionality in KVS to require users verify their documents or selfie, but there is alternative way to use Posts functionality for that. Even posts don't allow users to upload files, so it will be required to ask users to upload their documents to their own cloud services and specify secure link to the uploaded file. Here is how to configure that. Creating post type for the task and configuring global block for the users Step 1. Please go to Posts -> Post types and create new post type with the following data: Title: any of your choice, e.g. Identity Confirmation External ID: identity_confirmation Post page URL pattern: 404.php?%ID% Step 2. Go to Website UI -> Global blocks and add block with the following parameters: Block name: Identity Confirmation Block type: post_edit Cache: 86400 (default value) After saving global blocks list you will notice Identity Confirmation block added to the end. Click to edit this block. Step 3. Set the following Template code for this block: {{query_kvs select="single" table="posts_types" where_external_id='identity_confirmation' assign='post_type'}} {{query_kvs select="list" table="posts" where_user_id=$smarty.session.user_id where_post_type_id=$post_type.post_type_id assign='post'}} {{if $async_submit_successful=='true'}} <div class="success" data-fancybox="refresh"> {{$lang.edit_profile.success_message_identity_confirmation_requested}} </div> {{else}} <strong class="popup-title">{{$lang.edit_profile.title_identity_confirmation}}</strong> <div class="popup-holder"> {{if count($post)>0}} <div class="success" data-fancybox="refresh"> {{$lang.edit_profile.success_message_identity_confirmation_requested}} </div> {{elseif $smarty.session.status_id==6}} <div class="success" data-fancybox="refresh"> {{$lang.edit_profile.success_message_identity_confirmed}} </div> {{else}} <form action="{{$lang.urls.identity_confirmation}}" data-form="ajax" method="post"> <div class="generic-error hidden"></div> <p> {{$lang.edit_profile.field_identity_confirmation|replace:"%site%":$lang.project_name|smarty:nodefaults}} </p> <div class="row"> <input type="text" name="content" class="textfield"/> <div class="field-error down"></div> </div> <div class="bottom"> {{if $use_captcha==1}} <label>{{$lang.common_forms.field_captcha_hint}}</label> <div class="captcha-control"> {{if $recaptcha_site_key!=''}} <div data-name="code"> <div data-recaptcha-key="{{$recaptcha_site_key}}" data-recaptcha-theme="{{if $lang.theme.style=='metal'}}dark{{else}}light{{/if}}"></div> <div class="field-error down"></div> </div> {{else}} <div class="image"> <img src="{{$lang.urls.captcha|replace:"%ID%":"signup"}}?rand={{$smarty.now}}" alt="{{$lang.common_forms.field_captcha_image}}"/> <label for="identity_confirmation_code" class="field-label required">{{$lang.common_forms.field_captcha}}</label> <input type="text" name="code" id="identity_confirmation_code" class="textfield" autocomplete="off"/> <div class="field-error up"></div> </div> {{/if}} </div> {{/if}} <input type="hidden" name="action" value="add_new_complete"/> <input type="hidden" name="title" value="Identity Confirmation"/> <input type="submit" class="submit" value="{{$lang.edit_profile.btn_request}}"/> </div> </form> {{/if}} </div> {{/if}} Under block parameters change the following: post_type (String): identity_confirmation duplicates_allowed (On/Off): switch ON optional_description (On/Off): switch ON optional_tags (On/Off): switch ON optional_categories (On/Off): switch ON use_captcha (On/Off): switch ON, if you want users to solve captcha puzzle Step 4. Go to Website UI -> Language files -> default and add the following texts at the end. Feel free to adjust as needed: memberzone.profile_member_action_identity_confirmation = Verify your account here. edit_profile.title_identity_confirmation = Account Verification edit_profile.field_identity_confirmation = Create a selfie of yourself holding an A4 sheet with our site name written by hand:<br/><br/><b>%site%</b><br/><br/>Then upload this image to a cloud of your choice (e.g. Google Docs) and send us link to the uploaded file: edit_profile.success_message_identity_confirmation_requested = Thank you! Your account confirmation request was successfully registered and will be reviewed by our team soon. edit_profile.success_message_identity_confirmed = Your account has already been confirmed. edit_profile.btn_request = Submit Request edit_video.warning_upload = Only verified accounts can upload videos. urls.identity_confirmation = /confirm-account/ Step 5. You need to edit .htaccess file that is located in www root with your FTP client, or any other File Manager that might be provided by your server panel. Add the following line (could be added in the beginning, or next to RewriteRule ^delete-profile/$): RewriteRule ^confirm-account/$ index.php?mode=async&function=get_block&block_id=post_edit_identity_confirmation&global=true [L,QSA] Changing upload block to allow upload only for verified users To be noted, it will be required to use webmaster status to manually control which users are allowed to upload. In member profile editor in admin panel you should manually change member status to webmaster as a result of account verification process. Step 6. In order to change video upload block behavior, please go to Website UI -> Theme settings and scroll down to Functionality options group. Click on Video Edit link there to open video upload block settings. In Template code, your first line should look like this: {{if $async_submit_successful=='true'}} If it has something else, your video edit template is modified and you will need to adjust the proposed code to your template changes. The proposed code is to replace this line with this block: {{if $smarty.session.status_id!=6}} <div class="headline"> <h2> {{$lang.edit_profile.title_identity_confirmation}} </h2> </div> <div class="box"> {{$lang.edit_video.warning_upload}} <a href="{{$lang.urls.identity_confirmation}}" data-fancybox="ajax" style="text-decoration: underline; font-weight: bold">{{$lang.memberzone.profile_member_action_identity_confirmation}}</a> </div> {{elseif $async_submit_successful=='true'}} You may notice that we actually leave the old line almost there, with slightly changed from {{if}} to {{elseif}} syntax. This template change will hide video upload form for non-webmaster users and instead will show a link to verify their account: Step 7. However this may not stop bots, that could upload bypassing the actual site GUI, so you may need to add some small additional protection to make sure that bots can't upload as well. In the same video edit block settings activate the following parameters: max_duration (Integer): 1 max_duration_webmaster (Integer): 9999 These settings mean that all users will not be able to upload virtually any video, because of duration limit of 1 second. While webmaster users will be able to upload videos with duration up to 9999 seconds. So only webmaster users can actually upload videos. Testing all together Now log in with non-webmaster profile and go to upload page. You should see link to verify your account. If you see a white or partial page, you did wrong paste at step #6. You can go to Website UI -> Change history and look at your recent change to video edit block. There you can find original template version and return it back if needed, or check what you did wrong here. By clicking the account verification link you should see the popup to verify account. Submit something into the text field. This should show you success message that your data is submitted. If it shows any error, you did something wrong at step #3 with block parameters. If you go to admin panel start page, you may notice that it will show you alert like the following: Click this link and you will see Account Verification post submitted by you seconds ago. Open it and check the link under Content area. If you want to verify it, you first need to manually open user profile editor for this user and change their status to webmaster. Then approve this account verification post. If you want to reject it, you just need to delete it, so that user can re-submit again. Unfortunately KVS for now doesn't support any automated messages to be sent to users on different admin actions; if you want to notify user about some issue with their verification, you will need to manually submit a message to this user via Memberzone -> Messages.
×
×
  • Create New...