Loading...
Use
Create
Develop
FAQ
Troubleshooting
History: Terms_of_Use_Demo
View page
Source of version: 20
(current)
{maketoc} The purpose of this profile is to make the users accept a terms of use on registration. Also existing users will be asked to fill in the terms of use on login if they are already registered prior to the terms of use implementation !!How to use this demo First on a FRESH EMPTY tiki, create a pre-existing user, and then apply the demo. And then look at how the registration happens, as well as what happens when the pre-existing user logs in. !!The User Tracker First you need a user tracker. You could already have a user tracker. If so, you don't need to create one. {CODE(caption=>YAML)} objects: - type: tracker ref: user_tracker data: name: User Tracker description: restrict_end: 0 restrict_start: 0 allow: - one_item_per_user - creator_modification show: - list_creation_date - status_admin_only - type: tracker_field ref: user_tracker_userselector data: name: User permname: userselector tracker: $profileobject:user_tracker$ options: autoassign: 1 type: user order: 0 flags: - searchable - public - mandatory {CODE} !!Pretty tracker registration Then you need to setup pretty tracker registration {CODE(caption=>YAML)} objects: - type: wiki_page ref: registration_tpl data: name: registration_tpl content: wikicontent:registration_tpl_include description: lang: {CODE} !!Features & settings {CODE(caption=>YAML)} preferences: feature_trackers: y allowRegister: true userTracker: true user_register_prettytracker: true user_register_prettytracker_tpl: registration_tpl wikiplugin_iframe: y wikiplugin_tracker: y wikiplugin_trackeritemfield: y wikiplugin_redirect: y {CODE} !!The Checkbox field You need to add the checkbox field to your user tracker {CODE(caption=>YAML)} objects: - type: tracker_field ref: user_tracker_acceptedTerms data: name: I have accepted the Terms of Use permname: acceptedTerms tracker: $profileobject:user_tracker$ options: type: checkbox order: 170 flags: - public - mandatory {CODE} !!You also need to set the group to have registration settings {CODE(caption=>YAML)} permissions: Registered: user_tracker: $profileobject:user_tracker$ user_tracker_field: $profileobject:user_tracker_userselector$ registration_fields: [$profileobject:user_tracker_acceptedTerms$] objects: - type: wiki_page id: registration_tpl allow: [ view, use_as_template ] deny: [ edit ] - type: wiki_page id: terms_tpl allow: [ view, use_as_template ] deny: [ edit ] - type: wiki_page id: terms allow: [ view ] deny: [ edit ] - type: wiki_page id: RenewTerms allow: [ view ] deny: [ edit ] - type: tracker id: $profileobject:user_tracker$ allow: [ view_trackers, create_tracker_items ] Anonymous: objects: - type: wiki_page id: registration_tpl allow: [ view, use_as_template ] deny: [ edit ] - type: wiki_page id: terms_tpl allow: [ view, use_as_template ] deny: [ edit ] - type: wiki_page id: terms allow: [ view ] deny: [ edit ] {CODE} !!The wiki pages needed {CODE(caption=>YAML)} objects: - type: wiki_page ref: renewterms data: name: RenewTerms content: wikicontent:RenewTerms_include description: lang: en - type: wiki_page ref: terms_tpl data: name: terms_tpl content: wikicontent:terms_tpl_include description: lang: en - type: wiki_page ref: terms data: name: Terms content: wikicontent:Terms_include description: lang: en {CODE} !! Example checker module that check the user has accepted or not. You can also simply include the TRACKERITEMFIELD on selected pages like the homepage {CODE(caption=>YAML)} objects: - type: module ref: terms_checker data: name: Terms Checker position: bottom order: 2 cache: 0 rows: 10 groups: - Registered params: custom: | {TRACKERITEMFIELD(fieldId="$profileobject:user_tracker_acceptedTerms$", test="1", value="y", trackerId="$profileobject:user_tracker$")} {ELSE} {REDIRECT(page="RenewTerms")}{REDIRECT} {TRACKERITEMFIELD} parse: true {CODE} Links to included wiki pages: ((registration_tpl_include)) ((RenewTerms_include)) ((terms_tpl_include)) ((Terms_include))
Menu
Featured profiles
Profiles in Wizard
Profiles Todos
Handlers
Profiles Tester
Admin
of this site
Current Profiles
Tiki version
21.x
24.x
26.x
27.x
28.x
Deprecated
25.x
state
Not fully functional yet
alpha
beta
release
type
Available in the Profiles Wizard (12+)
Featured profiles
Full profile (out of the box & ready to go)
Learning profile (to show off feature)
Long tail
Mini-profile (can be included in other)
Profile-snippet (optional but needs another "parent" profile)
Security
Tests
Latest Changes
Voting_System
test_profile_change
Test_all_tracker_field_types_profile
Scheduler_Presets_20
Tracker_as_Calendar_09
Tracker_as_Calendar_10
Hide Fixed Top Nav Bar on Scroll 19
Easy_GeoBlog
Profiles_in_Wizard
Random_header_images_14
Hide Fixed Top Nav Bar on Scroll 19
How to Create Profiles
Test_All_Plugins
JonnyBs_Luxury_Tiki_Setup
...more
Like almost all *.tiki.org sites, you can log in with your login from
https://tiki.org
(register over there)
Search
Find
Most Popular Tags
admin
agenda
alias
antibot
antibot captcha
app
archive
articles
banning
batch
blogs
calculations
calendars
cart
categories
cluster
codemirror
comments
computation
contact us
datachannel
debug
debug console
dropdown with other
error messages
features
file galleries
forums
geo
geocms
geolocation
group homepages
group watches
header
i18n
images
item link
items list
jquery
languages
location
map
maps
maths
menu
menupage
multilingual
ol3
ol5
openlayers
paypal
plugin
plugin alias
plugin datachannel
plugin fade
plugin tabs
plugin trackerlist
pretty trackers
print
project management
r
r project
realnames
rss
static
static text
statistics
stats
structures
syntax highlighter
tablesorter
template
trackers
user watches
visualization
watches
webservice
wiki
wiki argument variables
wiki structures
Tiki Newsletter
Subscribe to the Tiki newsletter.
Don't miss major announcements and other news!