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 Wikiperso.extract_user_name : string -> string option
val Wikiperso.wiki_path : string -> string list
val Wikiperso.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 Wikiperso.default_welcome_page : string
val Wikiperso.default_wikicss : string
val Wikiperso.template_container_pagename : string
val Wikiperso.template_css_pagename : string
val Wikiperso.template_container : unit -> string Lwt.t
val Wikiperso.template_wiki_css : unit -> string Lwt.t
val Wikiperso.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 Wikiperso.find_user : string -> User_sql.Types.userid option Lwt.t
val Wikiperso.can_have_wikiperso : User_sql.Types.user
val Wikiperso.cannot_have_wikiperso : User_sql.Types.user
val Wikiperso.f_can_have_wikiperso : User_sql.Types.user -> bool Lwt.t
class wikiperso_rights : object..end
val Wikiperso.wikiperso_rights : wikiperso_rights
val Wikiperso.wikiperso_model : Wiki_types.wiki_model Lwt.t
val Wikiperso.gen : unit -> Ocsigen_extensions.answer Lwt.t
The function that answers for the extension.
val Wikiperso.users_root :
(unit, unit,
[> `Attached of
([> `Internal of [> `Service ] ], [> `Get ]) Eliom_service.a_s ],
[ `WithoutSuffix ], unit, unit,
[< Eliom_service.registrable > `Registrable ], 'a)
Eliom_service.service
