Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Wikiperso

module Wikiperso : sig..end

Author(s): Vincent Balat, Boris Yakobowski


Wikiperso is an eliom extension that can be used to provide personal wikis. That is, when the user accesses a page such as webserver.org/~bla/foo, a personal wiki is created for the user bla, and registered to the url ~bla

Wikiperso currently takes two config options (in this order)

  • username is a regexp with one parameter, which must extract from an url the name of the user for which the wiki must be created, or fail if no wiki must be created.
  • wikiroot is a regexp containing the string $USER. Replacing $USER by the user for which the wiki must be created must result in the root url for this wiki (of course relative to the current eliom root url). Correct values could be ~$USER or perso/$USER

An example configuration is given below

<eliommodule module="/path/to/wikiperso.cmo"> <options username="~(^/* ).*" wikiroot="~$USER" /> </eliommodule>

val extract_user_name : string -> string option
val wiki_path : string -> string list
val external_user : string -> User_sql.Types.userid option Lwt.t

Template pages, for the containers and the css of the new wikis. They are copied each time a new wiki is created

val default_welcome_page : string
val default_wikicss : string
val template_container_pagename : string
val template_css_pagename : string
val template_container : unit -> string Lwt.t
val template_wiki_css : unit -> string Lwt.t
val create_wikiperso : 
  model:Wiki_types.wiki_model ->
  wiki_title:string ->
  userdata:User_sql.Types.userdata -> Wiki_types.wiki Lwt.t

The function that creates the wikiperso when needed

val find_user : string -> User_sql.Types.userid option Lwt.t
val can_have_wikiperso : User_sql.Types.user
val cannot_have_wikiperso : User_sql.Types.user
val f_can_have_wikiperso : User_sql.Types.user -> bool Lwt.t
class wikiperso_rights :  object..end
val wikiperso_rights : wikiperso_rights
val wikiperso_model : Wiki_types.wiki_model Lwt.t
val gen : unit -> Ocsigen_extensions.answer Lwt.t

The function that answers for the extension.

val users_root : 
  (unit, unit, [< Eliom_service.service_method > `Get ],
   [< Eliom_service.attached > `Attached ],
   [< Eliom_service.service_kind > `Service ], [ `WithoutSuffix ],
   unit, unit, [< Eliom_service.registrable > `Registrable ],
   [> Eliom_service.appl_service ])
  Eliom_service.service