|
Setting | Description | Default |
---|---|---|
Object Type | Select the Tiki objects from the existing site to export | Preferences |
Export modified preferences as YAML | Use this section to filter or select specific objects to export ot YAML |
You can do so in Tracker Export and select the last option to export as yaml code for tiki profiles.
Available from Tiki12. Unlike the earlier tools to export as profiles, the command line tools, such as Console, cover the entire workflow of profile creation and perform better reference tracking between objects, allowing to create profiles that are more complete out of the box.
These early screencasts explain how the process works. The program tiki in the first video is a shortcut for php console.php in Tiki's root.
Something might be wrong with the second video and you can see a green screen only.
Process overview:
php console.php profile:export:init Some_Profile_Name
php console.php profile:export:recent-changes --since "2 week ago"
php console.php profile:export:tracker
, php console.php profile:export:wiki-page
, ... to include objects in your profile
php console.php profile:export:finalize
If you are within a MultiTiki instance, you need to append the extra param --site=site1.example.com
, so that tiki knows which tiki should search the objects in (site1.example.com in this example), among all the instances within the same multitiki installation (site2.example.com, site3.foo, site4.bar, ...).
profile:export:activity-rule-set profile:export:activity-stream-rule profile:export:all-modules profile:export:article profile:export:article-topic profile:export:article-type profile:export:category profile:export:file-gallery profile:export:forum profile:export:goal profile:export:goal-set profile:export:group profile:export:include-profile profile:export:menu profile:export:module profile:export:preference profile:export:rating-config profile:export:rating-config-set profile:export:recent-changes profile:export:rss profile:export:tracker profile:export:tracker-field profile:export:tracker-item profile:export:wiki-page
Some new options added in Tiki18: files get exported also.
php console.php profile:export:file-gallery --include-files 4
Also added in Tiki18: export of tracker items
php console.php profile:export:tracker-item --reference name 1
php console.php profile:export:tracker-item --items 1 --fields 2 --reference name 1
Since Tiki18 it is also possible to export tracker items, defining one tracker and filter a list of items (optional) and a list of fields (optional).
If you want to install this profile elsewhere, copy the local profile (usually from folder ./profiles), place it at the new server or new tikiroot path, and execute in the terminal at the tikiroot path:
php console.php profile:apply Some_Profile_Name file://profiles
Tip: in Windows OS you also need to use this syntax "file://profiles" (and not "file:\\profiles").
See Local profiles
Using the following will create a profile with the tracker Id 1 (empty from items) and the 2 Wiki pages (homepage and contact-)
php console.php profile:export:init Contacts php console.php profile:export:tracker --reference name 1 php console.php profile:export:wiki-page homepage php console.php profile:export:wiki-page contact- php console.php profile:export:finalize
To apply this profile on a different tiki, you have to copy the profile folder ("Contacts" in that example) from within the "profiles" directory from your Tiki source (where you created the profile) and to place it in the "profiles" folder of your Tiki destination.
Once it is done (and permission set according to your setup) use the following command to apply it.
php console.php profile:apply Contacts file://profiles php console.php i:r
Using the following will create a profile with the tracker Id 1 with all the items plus one Wiki pages (homepage)
php console.php profile:export:init Contacts php console.php profile:export:tracker --reference name 1 php console.php profile:export:tracker-item 1 php console.php profile:export:wiki-page homepage php console.php profile:export:finalize
To apply this profile on a different tiki, you have to copy the profile folder ("Contacts" in that example) from within the "profiles" directory from your Tiki source (where you created the profile) and to place it in the "profiles" folder of your Tiki destination.
Once it is done (and permission set according to your setup) use the following command to apply it.
php console.php profile:apply Contacts file://profiles php console.php i:r
In some cases, you may have used some custom jquery code in wiki pages or in tracker fields of type 'static text', with hardcoded references to tracker ids, tracker field ids, or category ids, and those numbers are not renamed by default to the corresponding profile reference for that tiki object, since that a complex case to handle properly. A compromise for such cases has been added so that if you add some extra comment at the end of the line indicating that the preceding line has some value to be replaced by the corresponding profile reference, Tiki will do so for you.
That means that the profile exporter will catch the lines within jquery code in which the user has added a specific comment as a flag for tiki to do a replacement there in these three cases:
javascript-code // profile_reference=tracker javascript-code // profile_reference=tracker_field javascript-code // profile_reference=category
Examples:
trackerId: 13, // profile_reference=tracker var user_fields = ['230', '302', '303']; // profile_reference=tracker_field $("select[name='ins_160[]']").val("26").trigger('chosen:updated').parents(".form-group").hide(); // profile_reference=category
In fact, we support any profile reference already implemented such as wiki_page (other than just tracker, tracker_field and category). The full list is in lib/core/Tiki/Profile/InstallHandler dir, which is documented online also here:
https://profiles.tiki.org/Handlers
Profile Export | Profile Symbols | ProfileSymbols | profileexport | localprofile | localprofiles | Profile Export | ProfileExport