Loading...
 
page id: 397 How to create a custom repository Documentation

Custom Repository

Other Tiki sites in addition to this one can be made into profile repositories. Such custom repositories can then be listed in the profiles admin panel (Admin Home > Profiles > Repositories) of the same or another site where the profile is to be applied. This page explains the steps necessary to do the following:
  1. Make a Tiki site a profile repository
  2. Add individual profiles to the repository
  3. Access the repository's profiles from another site.

 Note

Custom repositories may be helpful for testing or in cases where there are firewall issues. But please remember to contribute useful profiles to this site as well so that they are available to the Tiki Community.


Creating the repository

Making a Tiki site into a profile repository is just a matter of:
  1. Creating a category to apply to profile pages
  2. Allowing the Anonymous group certain permissions (view, export, viewing categories)
  3. (optional) Adding a rewrite rule to the .htaccess file to keep the repository url short

Once the repository is ready, all you need to do is assign any profile pages to the new category as you create them.

Below are the steps in detail, either using a profile to set up the repository or manually.

Use a Profile to Create a Repository

Manually Create a Repository

If the above profiles don't work, then the same thing can be achieved manually by doing the following:
  • Create a category called "My Profiles"

  • Assign the following permissions to the Anonymous group:
    • tiki_p_view
    • tiki_p_export_wiki
    • for 3.x:
      tiki_p_view_categories
      tiki_p_view_categorized
    • for 4.x+:
      tiki_p_view_category

  • Add the following line to the .htaccess file below the "RewriteEngine on" line (towards the beginning):
    RewriteRule ^profiles$ tiki-browse_categories.php?parentId=XX&deep=on&type=plain&maxRecords=1000000 [L]
    (where XX is the ID number of the My Profiles category that you created)

    Note: This step is optional. It makes a difference below when accessing the repository.

Creating Individual Profiles

Once a Tiki site has been made into a repository, profiles can be added to it by simply creating wiki pages and adding the appropriate YAML syntax within {CODE} tags. For each profile page:
  • Assign to the "My Profiles" category
  • Assign tiki_p_view to the Anonymous group

Accessing the repository

On the site where you want to apply a profile from the custom repository you've created:
  • Go to Admin Home > Profiles and find the repository URLs listed (under the Advanced tab in 4.x)

  • Add the URL for the custom repository as follows:
    • If .htaccess has been modified as described above:
      http://yourdomain.com/profiles
      Note: add "/profiles" to the end of the main url for the site

    • Use localhost/profiles if the repository site is also the site where the profiles will be applied. (Note: try http://yourdomain/profiles if localhost/profiles doesn't work.)

    • If .htaccess has not been modified, add the following to the url path (instead of "/profiles"):
      tiki-browse_categories.php?parentId=XX&deep=on&type=&plain&maxRecords=1000000
      (where XX is the ID number of the My Profiles category that you created)

  • Click save

  • The repository and its profiles should be available for listing and applying - see Administration Interface for more information and screenshots.
Category: Documentation