CartoGraf is an interactive web-based mapping application to enhance learning in history and geography classes in high schools. CartoGraf is mainly based on Maps, Drawings, PluginAppFrame and Trackers. It is a great example of how to use profiles in a general purpose app to make a very specific application using Tiki as a Framework.
To get your own copy of CartoGraf:
You need to get branches/15x (Tiki 15.x version from SVN) for the latest and greatest goodies :-)
Activate .htaccess by renaming _htaccess (even better is to link from .htaccess to _htaccess)
Note: rewrite rules are essential for this profile
You need to get the CartoGraf theme first and copy it over to the themes/ directory (see Theme section below)
Select and apply this CartoGraf_15 profile from tiki-admin.php?page=profiles
#instructions: Setup
preferences:
feature_search_fulltext: n
feature_search: y
feature_sefurl: y
allowRegister: n
browsertitle: CartoGraf Demo
tracker_refresh_itemlink_detail: y
geo_always_load_openlayers: y
url_after_validation: Account_Validated
feature_jquery_ui_theme: start
feature_left_column: n
tracker_clone_item: y
toolbar_trackers: bold,list,numlist,wikiplugin_youtube
layout_add_body_group_class: y
layout_tabs_optional: n
feature_wiki_ext_icon: n
feature_syntax_highlighter: n
search_error_missing_field: n
sitelogo_title: CartoGraf
sitelogo_alt: CartoGraf logo
Temporary
YAML
preferences:
validateUsers: n
feature_antibot: n
sitelogo_alt: CartoGraf logo
File Galleries Prefs
YAML
preferences:
fgal_tracker_existing_search: y
fgal_elfinder_feature: y
fgal_upload_from_source: y
fgal_quota_per_fgal: y
fgal_quota_default: 0
fgal_sort_mode: lastModif
fgal_list_name: n
fgal_list_description: y
fgal_list_last_user: y
fgal_list_author: o
fgal_list_created: o
fgal_list_lastModif: y
fgal_list_size: y
fgal_list_files: n
fgal_image_max_size_x: 800
User Files
YAML
preferences:
feature_userfiles: y
feature_use_fgal_for_user_files: y
userfiles_private: n
userfiles_hidden: y
userfiles_quota: 30
quota_show: bar_and_text
Limit username pattern
CartoGraf relies heavily on Unified Search (Zend_Search_Lucene). Because of this, a username jean-marc won't work. Since hypens are often used in emails, you can't use CartoGraf with the pref "Use email as username" (login_is_email). Space and quote should also not be permitted. Theoretically, underscore (_) should work, but tests have demonstrated that is doesn't. Thus, we are restricting to only numbers and letters, without any accents.
As of Tiki 12 the default unified search engine uses mysql which has a minimum searchable token length of 4, so setting minumum user name length to 5 to be safe.
YAML
preferences:
username_pattern: /^[_a-zA-Z0-9]*$/
login_is_email: n
min_username_length: 5
preferences:
theme: CartoGraf
feature_fixed_width: n
jquery_ui_selectmenu: y
feature_page_title: n
feature_sitelogo: y
wiki_edit_plugin: n
sitelogo_src: themes/CartoGraf/img/logo.gif
smarty_security_dirs: [themes/CartoGraf/img]
Menus
YAML
objects:
-
type: menu
ref: CartoGraf_Top_menu
data:
name: Top
description: A menu containing the base navigation of the site
collapse: none
items:
-
name: Home
url: ((HomePage))
-
name: Help
url: ((Help))
-
name: Setup
url: ((Setup))
permissions: [ admin ]
-
name: Admin
url: tiki-admin.php
permissions: [ admin ]
-
type: menu
ref: CartoGraf_RightEdge_menu
data:
name: RightEdge
description:
collapse: none
items:
-
name: Register
url: tiki-register.php
groups: [ Anonymous ]
-
name: Demo
url: ((Demo))
-
name: Contact
url: ((Contact))
Modules
YAML
preferences:
modseparateanon: y
objects:
-
type: module
ref: LiveHeaderMap_module
data:
position: top
order: 0
name: LiveHeaderMap
groups: [ Anonymous, Registered ]
params:
nobox: y
nopage: Map
custom: <div id="TheLiveHeaderMap" style="height:188px"></div>
-
type: module
ref: Footer_module
data:
position: bottom
order: 0
name: Footer
groups: [ Anonymous, Registered ]
params:
nobox: y
custom: "{if $prefs.language eq 'fr'}{wikiplugin _name='include' page='Footer' start='-FR-START-' stop='-FR-END-'}{/wikiplugin}{else}{wikiplugin _name='include' page='Footer' start='-EN-START-' stop='-EN-END-'}{/wikiplugin}{/if}"
-
type: module
ref: CustomDynamicCSS_module
data:
position: pagetop
order: 0
name: Custom Dynamic CSS
groups: [ Anonymous, Registered ]
params:
nobox: y
custom: "{if $prefs.search_error_missing_field eq 'n'}{literal}<style type='text/css'>#error_report .alert {display: none}</style>{/literal}{/if}"
-
type: module
ref: LocationSearch_module
data:
position: top
order: 49 #ensure the map location search is assigned as last module
name: map_search_location
groups: [ Registered ]
params:
legacy_mode: search_box
show_search_button: y
show_go_button: n
show_edit_button: n
default_button: search
page: Map
nobox: y
style: "float: right; margin-right: 15px" #most of the params ignored as the module is not standard and does have no module div rendered but just the form tag (TODO: fix in Tiki)
-
type: module
ref: TopMenu_module
data:
position: top
order: 1
name: menu
groups: [ Anonymous, Registered ]
params:
id: $CartoGraf_Top_menu
type: horiz
css: y
menu_id: TopMenu
translate: y
nobox: y
decorations: n
notitle: y
style: "float: left; margin-left: 350px"
-
type: module
ref: RightEdgeMenu_module
data:
position: right
order: 1
name: menu
groups: [ Anonymous ]
params:
bootstrap: n
id: $CartoGraf_RightEdge_menu
menu_id: RightEdgeMenu
nobox: y
nopage: Map
Features
YAML
preferences:
feature_wiki: y
feature_articles: n
feature_mytiki: n
feature_trackers: y
geo_tilesets: [openstreetmap, google_street, google_satellite, google_physical, google_hybrid, blank]
geo_google_streetview: y
geo_google_streetview_overlay: y
wikiplugin_appframe: y
wikiplugin_list: y
feature_search: y
feature_wiki_argvariable: y
trackerfield_geographicfeature: y
objects:
-
type: file_gallery
ref: iconContainer
data:
parent: 1
name: Icons
description: Icons available for selection in the map.
owner: admin
archives: 5
flags: [visible]
init_files:
- https://profiles.tiki.org/pics/icons/plugin.png
-
type: file_gallery
ref: imageBank
data:
parent: 1
name: Image Bank
description: Images uploaded by site admins, for use by teachers and students
owner: admin
archives: -1
flags: [visible]
image_max_size_x: 0
Streetview images loaded remotely from Google after saving the marker do not load (403 forbidden even with API key filled in to control panels - seems missing lib reference in html head for some reason?)
Uploading files (images) via modal dialog does not work (returns error "File empty") ( see https://dev.tiki.org/item6350 ) Workaround-ed by setting the height max size too.