Difference between revisions of "expert"

From GeneWeb
Jump to navigation Jump to search
 
(20 intermediate revisions by 4 users not shown)
Line 8: Line 8:
  
 
For further analysis, explore the various other [[templates|template]] files, and on last resort, explore the Ocaml source files!!
 
For further analysis, explore the various other [[templates|template]] files, and on last resort, explore the Ocaml source files!!
 +
 +
WARNING: one of the main issue with template programming is that all functions are not permanently available on all pages! Describing which are available where is beyond reach, and trial and error is the only solution, but being aware of the problem is important!!
  
 
Programming constructs:
 
Programming constructs:
Line 22: Line 24:
 
Functions callable with %apply:
 
Functions callable with %apply:
  
   capitalize
+
  a_of_b ("aaa", "bbb")
   language_name
+
  a_of_b2 ("aaa", "bbb", "ccc") test vowel at beginning of "ccc"
 +
  a_of_b_gr_eq_lev (??)
 +
   capitalize ("aaa")
 +
   language_name ("fr")
 
   nth("aaa"/"bbb"/"ccc"/"ddd", n)
 
   nth("aaa"/"bbb"/"ccc"/"ddd", n)
 
   nth_c("abcdef", n)
 
   nth_c("abcdef", n)
Line 32: Line 37:
 
Arithmetic and booleans:
 
Arithmetic and booleans:
  
   +, -, /, *, %, =, !=, <, <=, >, >=, "and", "or", "not", "in"
+
   +, -, /, *, %, =, !=, <, <=, >, >=, "and", "or", "not", "is_substr" or "in"
  
 
WARNING: all functions may not be fully available depending on the execution context!
 
WARNING: all functions may not be fully available depending on the execution context!
Line 97: Line 102:
 
</pre>
 
</pre>
  
 +
=== List of commands ===
 
This list does not claim to be exhaustive (but pretty close!!). A good way to understand the semantic of these commands is to explore the template files and observe how they are used (grep is your friend).
 
This list does not claim to be exhaustive (but pretty close!!). A good way to understand the semantic of these commands is to explore the template files and observe how they are used (grep is your friend).
  
 +
Most of the commands are interpreted by the files perso.ml or templ.ml. When this is not the case, the name of the interpreter file is associated with the command.
  
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4">
+
<div style="column-count:1;-moz-column-count:1;-webkit-column-count:1">
 
<pre>
 
<pre>
"access_by_key"
+
  "a_of_b"
"access"
+
  "a_of_b2"
"action"
+
  "a_of_b_gr_eq_lev"
"age"
+
  "acc_if_titles", updateInd.ml
"alias"
+
  "acc_private", updateInd.ml
"add_in_sorted_list"
+
  "acc_public", updateInd.ml
"add_in_sorted_listb"
+
  "acces", historyDiffDisplay.ml
"add_in_sorted_listc"
+
  "access", dagDisplay.ml, history.ml, historyDiffDisplay.ml
"anc_sosa"  
+
  "access_by_key"
"ancestor_level"  
+
  "action"
"ancestor_level2"  
+
  "add_in_sorted_list"
"ancestor_surname"  
+
  "add_in_sorted_listb"
"ancestor_tree_line"  
+
  "add_in_sorted_listc"
"ancestor"  
+
  "add_in_sorted_listd"
"are_divorced"
+
  "add_in_sorted_liste"
"are_engaged"
+
  "after", historyDiffDisplay.ml
"are_married"
+
  "age"
"are_not_married"
+
  "alias", updateInd.ml
"are_separated"
+
  "aliases", historyDiffDisplay.ml
"auto_image_file_name"
+
  "align", dagDisplay.ml
"baptism_date"  
+
  "all"
"baptism_note"
+
  "anc1"
"baptism_place"
+
  "anc2"
"baptism_witness"  
+
  "anc_f_list"
"base"
+
  "anc_level"
"birth_date"  
+
  "anc_paths"
"birth_note"
+
  "anc_paths_at_level"
"birth_place"
+
  "anc_paths_at_level_cnt"
"birth_witness"  
+
  "anc_paths_at_level_cnt_raw"
"birth_witness"  
+
  "anc_paths_cnt"
"birthday"
+
  "anc_paths_cnt_raw"
"border"
+
  "anc_sosa"
"browsing_with_sosa_ref"
+
  "ancestor"
"burial_date"  
+
  "ancestor_at_level"
"burial_note"
+
  "ancestor_level"
"burial_place"
+
  "ancestor_surname"
"burial_witness"  
+
  "ancestor_tree_line"
"bvar"
+
  "and"
"cancel_links"
+
  "approx_birth_place"
"canton"
+
  "approx_death_place"
"cell"
+
  "are_divorced"
"cgi"
+
  "are_engaged"
"charset"
+
  "are_marriage_banns"
"child_cnt"  
+
  "are_marriage_contract"
"child_name"
+
  "are_marriage_license"
"child"  
+
  "are_married"
"colspan"
+
  "are_not_married"
"comment"
+
  "are_pacs"
"commit"
+
  "are_residence"
"commit_date"
+
  "are_separated"
"compilation_time"
+
  "auto_image_file_name"
"computable_age"
+
  "bapt", updateInd.ml
"computable_death_age"
+
  "bapt_note", updateInd.ml
"computable_marriage_age"
+
  "bapt_place", updateInd.ml
"connections"
+
  "bapt_src", updateInd.ml
"consanguinity"
+
  "baptism", historyDiffDisplay.ml
"count"
+
  "baptism_date"
"country"
+
  "baptism_note", historyDiffDisplay.ml
"county"
+
  "baptism_place", historyDiffDisplay.ml
"cousin_level"  
+
  "baptism_source"
"cremated_date"  
+
  "baptism_src", historyDiffDisplay.ml
"cremation_place"
+
  "baptism_witness"
"cremation_witness"  
+
  "bar_link", dagDisplay.ml
"date_begin"  
+
  "base", srcfileDisplay.ml
"date_end"  
+
  "base_header"
"date"
+
  "base_trailer"
"dates"
+
  "bases_list"
"day"
+
  "bdo", dagDisplay.ml
"death_age"
+
  "before", historyDiffDisplay.ml
"death_date"  
+
  "birth", historyDiffDisplay.ml, updateInd.ml
"death_note"
+
  "birth_date"
"death_place"
+
  "birth_day", updateFam.ml
"death_witness"
+
  "birth_month", updateFam.ml
"decoded"
+
  "birth_note", historyDiffDisplay.ml, updateInd.ml
"desc_level"
+
  "birth_place", historyDiffDisplay.ml, updateFam.ml, updateInd.ml
"descendant_level"  
+
  "birth_source"
"died"  
+
  "birth_src", historyDiffDisplay.ml, updateInd.ml
"district"
+
  "birth_witness"
"divorce_date"
+
  "birth_year", updateFam.ml
"doctype"
+
  "birthday"
"doctype_transitionnal"
+
  "blue_of_hsv"
"empty_sorted_list"
+
  "bname_prefix"
"empty_sorted_listb"
+
  "body_prop"
"empty_sorted_listc"
+
  "border"
"enclosing"
+
  "browsing_with_sosa_ref", dagDisplay.ml, srcfileDisplay.ml
"env"
+
  "bt_buried", updateInd.ml
"env_binding"
+
  "bt_cremated", updateInd.ml
"evar"
+
  "bt_unknown_burial", updateInd.ml
"event_witness_kind"  
+
  "burial", historyDiffDisplay.ml, updateInd.ml
"event_witness_relation_kind"  
+
  "burial_date"
"event_witness_relation"  
+
  "burial_note", historyDiffDisplay.ml, updateInd.ml
"event_witness"  
+
  "burial_place", historyDiffDisplay.ml, updateInd.ml
"event"
+
  "burial_source"
"false"
+
  "burial_src", historyDiffDisplay.ml, updateInd.ml
"fam_access"
+
  "burial_witness"
"family_cnt"  
+
  "bvar", updateFam.ml
"family"  
+
  "cal_french", update_util.ml
"father_age_at_birth"  
+
  "cal_gregorian", update_util.ml
"father_sosa"
+
  "cal_hebrew", update_util.ml
"father"  
+
  "cal_julian", update_util.ml
"first_name_alias"
+
  "calendar", update_util.ml
"first_name_key_strip"
+
  "cancel_links"
"first_name_key_val"
+
  "canton", util.ml
"first_name_key"
+
  "capitalize"
"first_name"
+
  "cell"
"fnotes"
+
  "cell_nbr", dagDisplay.ml
"fsources"
+
  "center", dagDisplay.ml
"fwitness"
+
  "cgi"
"has_aliases"
+
  "charset"
"has_baptism_date"  
+
  "child", updateFam.ml
"has_baptism_note"
+
  "child_cnt"
"has_baptism_place"  
+
  "child_name"
"has_baptism_witnesses"
+
  "children", historyDiffDisplay.ml
"has_birth_date"  
+
  "clean_comment_tags"
"has_birth_note"
+
  "clean_html_tags"
"has_birth_place"  
+
  "cnt", updateDataDisplay.ml, updateFam.ml, updateInd.ml
"has_birth_witnesses"
+
  "colspan", dagDisplay.ml
"has_burial_date"
+
  "comment", historyDiffDisplay.ml, updateFam.ml
"has_burial_note"
+
  "computable_age"
"has_burial_place"  
+
  "computable_death_age"
"has_burial_witnesses"
+
  "computable_marriage_age"
"has_children"
+
  "connections"
"has_comment"
+
  "consanguinity"
"has_consanguinity"
+
  "copyright"
"has_cremation_date"
+
  "count", history.ml, updateDataDisplay.ml
"has_cremation_place"  
+
  "count1"
"has_cremation_witnesses"
+
  "count2"
"has_date"
+
  "count3"
"has_death_date"
+
  "country", util.ml
"has_death_note"
+
  "county", util.ml
"has_death_place"  
+
  "cous_paths"
"has_death_witnesses"
+
  "cous_paths_cnt"
"has_event"
+
  "cous_paths_cnt_raw"
"has_families"  
+
  "cous_paths_max_date"
"has_first_names_aliases"
+
  "cous_paths_min_date"
"has_fnotes"
+
  "cousin"
"has_fsources"
+
  "cousin_level"
"has_fwitness"
+
  "cousins"
"has_history"
+
  "cousins_cnt"
"has_image"  
+
  "create", updateFam.ml, updateInd.ml, updateIndOk.ml, update_util.ml
"has_linked_page"
+
  "cremated_date"
"has_linked_pages"
+
  "cremation_place"
"has_marriage_note"
+
  "cremation_witness"
"has_nephews_or_nieces"  
+
  "dag", dagDisplay.ml
"has_nobility_titles"  
+
  "dag_cell", dagDisplay.ml
"has_note"  
+
  "dag_cell_pre", dagDisplay.ml
"has_notes"
+
  "dag_line", dagDisplay.ml
"has_occupation"  
+
  "dag_line_pre", dagDisplay.ml
"has_parents"  
+
  "date", historyDiffDisplay.ml, hutil.ml
"has_place"
+
  "date_begin"
"has_pnotes"
+
  "date_end"
"has_possible_duplications"  
+
  "date_s"
"has_psources"
+
  "dates", history.ml
"has_public_name"
+
  "day", templDate.ml, update_util.ml
"has_qualifiers"
+
  "day2"
"has_referer"
+
  "ddmmyyyy", dateDisplay.ml
"has_relation_her"
+
  "dead_dont_know_when", updateInd.ml
"has_relation_him"
+
  "death", historyDiffDisplay.ml, updateInd.ml
"has_relations"
+
  "death_age"
"has_siblings"
+
  "death_date"
"has_sosa"
+
  "death_day", updateFam.ml
"has_sources"
+
  "death_month", updateFam.ml
"has_spouse"
+
  "death_note", historyDiffDisplay.ml, updateInd.ml
"has_src"  
+
  "death_place", historyDiffDisplay.ml, updateFam.ml, updateInd.ml
"has_surnames_aliases"
+
  "death_source"
"has_witnesses"
+
  "death_src", historyDiffDisplay.ml, updateInd.ml
"hexa"
+
  "death_witness"
"highlight"
+
  "death_year", updateFam.ml
"history_file"
+
  "debug"
"hours"
+
  "desc_cnt"
"ident"
+
  "desc_level"
"ident_key"
+
  "desc_paths"
"image_prefix"
+
  "desc_paths_at_level"
"image_html_url"  
+
  "desc_paths_at_level_cnt"
"image_medium_size"
+
  "desc_paths_at_level_cnt_raw"
"image_size"  
+
  "desc_paths_cnt"
"image_small_size"  
+
  "desc_paths_cnt_raw"
"image_url"  
+
  "descendant"
"image"
+
  "descendant_cnt"
"incr_count"
+
  "descendant_level"
"incr_count1"
+
  "died"
"incr_count2"
+
  "died_young", updateInd.ml
"ind_access"
+
  "digest", updateFam.ml, updateInd.ml
"index"  
+
  "district", util.ml
"interval"
+
  "divorce", historyDiffDisplay.ml, updateFam.ml
"is_buried"
+
  "divorce_date"
"is_center"
+
  "dmyyyy", dateDisplay.ml
"is_cremated"
+
  "doctype"
"is_dead"
+
  "dont_know_if_dead", updateInd.ml
"is_descendant"
+
  "dr_disappeared", updateInd.ml
"is_empty"
+
  "dr_executed", updateInd.ml
"is_female"  
+
  "dr_killed", updateInd.ml
"is_first"
+
  "dr_murdered", updateInd.ml
"is_invisible"
+
  "dr_unspecified", updateInd.ml
"is_last"
+
  "e_name", updateFam.ml, updateInd.ml
"is_left"
+
  "e_note", updateFam.ml, updateInd.ml
"is_male"
+
  "e_place", updateFam.ml, updateInd.ml
"is_no_mention"
+
  "e_src", updateFam.ml, updateInd.ml
"is_no_sexes_check"
+
  "empty_sorted_list"
"is_printed_by_template"
+
  "empty_sorted_listb"
"is_private"  
+
  "empty_sorted_listc"
"is_public"  
+
  "empty_sorted_listd"
"is_restricted"  
+
  "empty_sorted_liste"
"is_right"
+
  "enclosing"
"is_self"
+
  "encode", updateDataDisplay.ml
"is_sibling_after"  
+
  "entry", updateDataDisplay.ml
"is_sibling_before"  
+
  "entry_ini", updateDataDisplay.ml
"is_top"
+
  "entry_key", updateDataDisplay.ml
"item"
+
  "entry_value", updateDataDisplay.ml
"just_friend_wizard"
+
  "entry_value_rev", updateDataDisplay.ml
"lang"
+
  "env"
"lazy_force"
+
  "env_binding"
"lazy_printed"
+
  "evar", historyDiffDisplay.ml, updateDataDisplay.ml
"left"
+
  "evar_cur"
"level"
+
  "event", updateFam.ml, updateInd.ml
"linked_page"
+
  "event_date", updateFam.ml, updateInd.ml
"key"
+
  "event_str", updateFam.ml, updateInd.ml
"manitou"
+
  "event_witness"
"mark_descendants"
+
  "event_witness_kind"
"marriage_age"
+
  "event_witness_relation"
"marriage_date"  
+
  "event_witness_relation_kind"
"marriage_note"
+
  "f_of_index"
"marriage_place"
+
  "false"
"max_anc_level"
+
  "family", historyDiffDisplay.ml
"max_cous_level"
+
  "family_cnt"
"max_desc_level"
+
  "father", dagDisplay.ml, updateFam.ml
"minutes"
+
  "father_age_at_birth"
"misc_names"
+
  "father_sosa"
"month"
+
  "fevent", historyDiffDisplay.ml, updateFam.ml
"mother_age_at_birth"  
+
  "fevent_date", historyDiffDisplay.ml
"mother_sosa"
+
  "fevent_name", historyDiffDisplay.ml
"mother"  
+
  "fevent_note", historyDiffDisplay.ml
"name"
+
  "fevent_place", historyDiffDisplay.ml
"nb_children"
+
  "fevent_src", historyDiffDisplay.ml
"nb_children_total"
+
  "fevent_witness", historyDiffDisplay.ml
"nb_events"  
+
  "first", updateDataDisplay.ml
"nb_families"  
+
  "first_name", history.ml, historyDiffDisplay.ml, updateFam.ml, updateInd.ml
"nb_ind"
+
  "first_name_alias", updateInd.ml
"nb_times"  
+
  "first_name_key"
"next_item"  
+
  "first_name_key_strip"
"nobility_title"
+
  "first_name_key_val"
"note"
+
  "first_names_aliases", historyDiffDisplay.ml
"notes"
+
  "found", history.ml
"number_of_ancestors"  
+
  "french", templDate.ml
"number_of_descendants"  
+
  "friend"
"number_of_subitems"
+
  "fsources", historyDiffDisplay.ml, updateFam.ml
"occ"
+
  "fwitness", updateFam.ml
"occupation"
+
  "fwitness_kind", updateFam.ml
"octal"
+
  "get_var", dagDisplay.ml
"on_baptism_date"
+
  "green_of_hsv"
"on_birth_date"
+
  "gregorian", templDate.ml
"on_burial_date"
+
  "has_aliases", updateInd.ml
"on_cremation_date"
+
  "has_approx_birth_date"
"on_date"
+
  "has_approx_birth_place"
"on_death_date"
+
  "has_approx_death_date"
"on_marriage_date"
+
  "has_approx_death_place"
"origin_file"
+
  "has_baptism_date"
"other"
+
  "has_baptism_note"
"parent"  
+
  "has_baptism_place"
"place_key"  
+
  "has_baptism_source"
"place"
+
  "has_baptism_witnesses"
"pnotes"
+
  "has_birth_date", updateInd.ml
"prec"
+
  "has_birth_note"
"prefix"
+
  "has_birth_place"
"prefix_2"
+
  "has_birth_source"
"prefix_base"
+
  "has_birth_witnesses"
"prefix_base_2"
+
  "has_burial_date"
"prefix_base_password"
+
  "has_burial_note"
"prefix_base_password_2"
+
  "has_burial_place"
"prefix_no_templ"
+
  "has_burial_source"
"prefix_no_iz"
+
  "has_burial_witnesses"
"prefix_no_pmod"
+
  "has_children"
"prefix_no_wide"
+
  "has_comment"
"prefix_no_lang"
+
  "has_consanguinity"
"prefix_no_all"
+
  "has_cremation_date"
"prev_fam_father"
+
  "has_cremation_place"
"prev_fam_index"
+
  "has_cremation_witnesses"
"prev_fam_mother"
+
  "has_date"
"prev_family"  
+
  "has_death_date"
"prev_item"  
+
  "has_death_note"
"public_name"
+
  "has_death_place"
"pvar"
+
  "has_death_source"
"qvar"
+
  "has_death_witnesses"
"svar"
+
  "has_event"
"tvar"
+
  "has_families"
"qualifier"
+
  "has_fevents", updateFam.ml
"region"
+
  "has_first_names_aliases", updateInd.ml
"related_type"
+
  "has_fsources"
"related"
+
  "has_fwitness", updateFam.ml
"relation_her"  
+
  "has_history", history.ml, srcfileDisplay.ml
"relation_him"  
+
  "has_image"
"relation_type"
+
  "has_image_url"
"relation"  
+
  "has_linked_page"
"reset_count"
+
  "has_linked_pages"
"reset_count1"
+
  "has_marriage_note"
"reset_count2"
+
  "has_marriage_source"
"reset_desc_level"
+
  "has_misc_notes", srcfileDisplay.ml
"right"
+
  "has_nephews_or_nieces"
"same"
+
  "has_next_sibling", dagDisplay.ml
"seconds"
+
  "has_nobility_titles"
"self"  
+
  "has_note"
"set_infinite_desc_level"
+
  "has_notes", srcfileDisplay.ml
"sex"
+
  "has_occupation"
"slash_baptism_date"
+
  "has_parents"
"slash_birth_date"
+
  "has_pevent_baptism", updateInd.ml
"slash_burial_date"
+
  "has_pevent_birth", updateInd.ml
"slash_cremation_date"
+
  "has_pevent_burial", updateInd.ml
"slash_death_date"
+
  "has_pevent_cremation", updateInd.ml
"slash_divorce_date"
+
  "has_pevent_death", updateInd.ml
"slash_marriage_date"
+
  "has_pevents", updateInd.ml
"sorted_list_item"
+
  "has_place"
"sorted_listb_item"
+
  "has_possible_duplications"
"sorted_listc_item"  
+
  "has_prev_sibling", dagDisplay.ml
"sosa_access"
+
  "has_primary_pevents", updateInd.ml
"sosa_in_list"
+
  "has_psources"
"sosa_link"
+
  "has_public_name"
"sosa_ref"  
+
  "has_qualifiers", updateInd.ml
"sosa"  
+
  "has_referer"
"source_type"
+
  "has_relation_her"
"source"
+
  "has_relation_him"
"spouse"
+
  "has_relations", updateInd.ml
"src"
+
  "has_secondary_pevents", updateInd.ml
"static_max_anc_level"
+
  "has_siblings"
"static_max_desc_level"
+
  "has_sosa"
"sueprvisor"
+
  "has_sources"
"surname_alias"
+
  "has_spouse"
"surname_begin"
+
  "has_src"
"surname_end"
+
  "has_surnames_aliases", updateInd.ml
"surname_key_strip"
+
  "has_titles", updateInd.ml
"surname_key_val"
+
  "has_witness", updateInd.ml
"surname_key"
+
  "has_witnesses"
"surname"
+
  "head_title", dagDisplay.ml
"title"  
+
  "hebrew", templDate.ml
"today"
+
  "hexa"
"town"
+
  "hidden"
"township"
+
  "highlight"
"true"
+
  "himher", updateFam.ml
"url"
+
  "history_file", history.ml
"user"
+
  "history_len", historyDiffDisplay.ml
"v"
+
  "history_line", history.ml, historyDiffDisplay.ml
"val"
+
  "hour", templDate.ml
"var"
+
  "hours"
"version"
+
  "ident"
"wedding_birthday"
+
  "ident_key"
"wid_hei"
+
  "image", historyDiffDisplay.ml, updateInd.ml
"witness_relation"  
+
  "image_html_url"
"witness"
+
  "image_medium_size"
"wizard"
+
  "image_prefix"
"year"
+
  "image_size"
 +
  "image_small_size"
 +
  "image_url"
 +
  "include"
 +
  "include_perso_header", updateFam.ml, updateInd.ml
 +
  "incr_count", history.ml, updateDataDisplay.ml
 +
  "incr_count1"
 +
  "incr_count2"
 +
  "incr_count3"
 +
  "incr_next_pevent", updateInd.ml
 +
  "index", dagDisplay.ml, templDate.ml, updateInd.ml
 +
  "ini", updateDataDisplay.ml
 +
  "init", srcfileDisplay.ml
 +
  "init_cache"
 +
  "initial", updateDataDisplay.ml
 +
  "integer", hutil.ml
 +
  "integer_range", hutil.ml
 +
  "interp"
 +
  "interval"
 +
  "is_bar", dagDisplay.ml
 +
  "is_buried"
 +
  "is_center"
 +
  "is_certainly_dead"
 +
  "is_cremated"
 +
  "is_dead"
 +
  "is_descendant"
 +
  "is_empty"
 +
  "is_female", updateInd.ml
 +
  "is_first", dagDisplay.ml, updateFam.ml, updateInd.ml
 +
  "is_hr", dagDisplay.ml
 +
  "is_hr_center", dagDisplay.ml
 +
  "is_hr_left", dagDisplay.ml
 +
  "is_hr_right", dagDisplay.ml
 +
  "is_invisible", history.ml
 +
  "is_last", dagDisplay.ml, updateFam.ml, updateInd.ml
 +
  "is_left"
 +
  "is_main"
 +
  "is_male", updateInd.ml
 +
  "is_modified", updateDataDisplay.ml
 +
  "is_no_mention"
 +
  "is_no_sexes_check"
 +
  "is_note", history.ml
 +
  "is_nothing", dagDisplay.ml
 +
  "is_printed_by_template"
 +
  "is_private"
 +
  "is_public"
 +
  "is_restricted"
 +
  "is_right"
 +
  "is_self"
 +
  "is_sibling_after"
 +
  "is_sibling_before"
 +
  "is_substr"
 +
  "is_top"
 +
  "item", dagDisplay.ml
 +
  "iz"
 +
  "julian", templDate.ml
 +
  "julian_day", templDate.ml
 +
  "just_friend_wizard"
 +
  "key", history.ml
 +
  "lang"
 +
  "language_name"
 +
  "lazy_force"
 +
  "lazy_print"
 +
  "lazy_printed"
 +
  "left"
 +
  "length", updateDataDisplay.ml
 +
  "lev_cnt"
 +
  "level"
 +
  "line", historyDiffDisplay.ml
 +
  "line_nbr", dagDisplay.ml
 +
  "link", updateInd.ml
 +
  "link_next", dagDisplay.ml
 +
  "linked_page"
 +
  "list_size"
 +
  "listb_size"
 +
  "listc_size"
 +
  "listd_size"
 +
  "liste_size"
 +
  "lvl"
 +
  "manitou"
 +
  "mark_descendants"
 +
  "marriage", historyDiffDisplay.ml, updateFam.ml
 +
  "marriage_age"
 +
  "marriage_date"
 +
  "marriage_note", updateFam.ml
 +
  "marriage_place", historyDiffDisplay.ml, updateFam.ml
 +
  "marriage_places"
 +
  "marriage_source"
 +
  "marriage_src", historyDiffDisplay.ml, updateFam.ml
 +
  "marriage_type", historyDiffDisplay.ml
 +
  "max", dagDisplay.ml, updateDataDisplay.ml
 +
  "max_a"
 +
  "max_anc_level"
 +
  "max_cous_level"
 +
  "max_d"
 +
  "max_desc_level"
 +
  "max_wid", dagDisplay.ml
 +
  "message_to_wizard"
 +
  "min", dagDisplay.ml
 +
  "min_wid", dagDisplay.ml
 +
  "minute", templDate.ml
 +
  "minutes"
 +
  "misc_names"
 +
  "mmddyyyy", dateDisplay.ml
 +
  "mn", history.ml
 +
  "mode"
 +
  "month", templDate.ml, update_util.ml
 +
  "month2"
 +
  "moon_age", templDate.ml
 +
  "moon_phase", templDate.ml
 +
  "mother", dagDisplay.ml
 +
  "mother_age_at_birth"
 +
  "mother_sosa"
 +
  "mrel", updateFam.ml
 +
  "name", srcfileDisplay.ml
 +
  "nb_accesses", srcfileDisplay.ml
 +
  "nb_accesses_to_welcome", srcfileDisplay.ml
 +
  "nb_children"
 +
  "nb_children_total"
 +
  "nb_events"
 +
  "nb_families", historyDiffDisplay.ml
 +
  "nb_fevents", updateFam.ml
 +
  "nb_ind"
 +
  "nb_persons", srcfileDisplay.ml
 +
  "nb_pevents", updateInd.ml
 +
  "nb_results", updateDataDisplay.ml
 +
  "nb_times"
 +
  "nb_witnesses_attending"
 +
  "nb_witnesses_civilofficer"
 +
  "nb_witnesses_godparent"
 +
  "nb_witnesses_informant"
 +
  "nb_witnesses_mentioned"
 +
  "nb_witnesses_other"
 +
  "nb_witnesses_religiousofficer"
 +
  "nb_witnesses_witness"
 +
  "nbr"
 +
  "nbr_a"
 +
  "nbr_a_l"
 +
  "ncol", dagDisplay.ml
 +
  "next_item"
 +
  "next_pevent", updateInd.ml
 +
  "next_sibling", dagDisplay.ml
 +
  "nn"
 +
  "nob_title"
 +
  "nobility_title"
 +
  "not"
 +
  "not_dead", updateInd.ml
 +
  "note", history.ml
 +
  "notes", historyDiffDisplay.ml, updateInd.ml
 +
  "nth"
 +
  "nth_c"
 +
  "number_of_ancestors"
 +
  "number_of_ancestors_at_level"
 +
  "number_of_bases"
 +
  "number_of_descendants"
 +
  "number_of_descendants_at_level"
 +
  "number_of_subitems"
 +
  "occ", history.ml, historyDiffDisplay.ml, updateFam.ml, updateInd.ml
 +
  "occupation", historyDiffDisplay.ml, updateFam.ml, updateInd.ml
 +
  "octal"
 +
  "of_course_dead", updateInd.ml
 +
  "on_baptism_date"
 +
  "on_birth_date"
 +
  "on_burial_date"
 +
  "on_cremation_date"
 +
  "on_date"
 +
  "on_death_date"
 +
  "on_marriage_date"
 +
  "or"
 +
  "orday", update_util.ml
 +
  "origin_file", historyDiffDisplay.ml, updateFam.ml
 +
  "ormonth", update_util.ml
 +
  "oryear", update_util.ml
 +
  "other", updateDataDisplay.ml
 +
  "p", updateDataDisplay.ml
 +
  "p_of_index"
 +
  "parent", updateFam.ml
 +
  "part", history.ml
 +
  "path"
 +
  "path_at_level"
 +
  "path_end"
 +
  "person", history.ml, historyDiffDisplay.ml
 +
  "person_index"
 +
  "pevent", historyDiffDisplay.ml, updateInd.ml
 +
  "pevent_date", historyDiffDisplay.ml
 +
  "pevent_name", historyDiffDisplay.ml
 +
  "pevent_note", historyDiffDisplay.ml
 +
  "pevent_place", historyDiffDisplay.ml
 +
  "pevent_src", historyDiffDisplay.ml
 +
  "pevent_witness", historyDiffDisplay.ml
 +
  "place"
 +
  "place_key"
 +
  "places"
 +
  "plugin"
 +
  "plugins"
 +
  "pos", history.ml
 +
  "prec", update_util.ml
 +
  "prec_about", update_util.ml
 +
  "prec_after", update_util.ml
 +
  "prec_before", update_util.ml
 +
  "prec_maybe", update_util.ml
 +
  "prec_no", update_util.ml
 +
  "prec_oryear", update_util.ml
 +
  "prec_sure", update_util.ml
 +
  "prec_yearint", update_util.ml
 +
  "prefix"
 +
  "prefix_base"
 +
  "prefix_base_password"
 +
  "prefix_no_all"
 +
  "prefix_no_iz"
 +
  "prefix_no_lang"
 +
  "prefix_no_pmod"
 +
  "prefix_no_templ"
 +
  "prefix_no_wide"
 +
  "prefix_set"
 +
  "prev_fam_father"
 +
  "prev_fam_index"
 +
  "prev_fam_mother"
 +
  "prev_family"
 +
  "prev_item"
 +
  "prev_sibling", dagDisplay.ml
 +
  "printable", updateDataDisplay.ml
 +
  "psources", historyDiffDisplay.ml
 +
  "public_name", historyDiffDisplay.ml, updateInd.ml
 +
  "pvar"
 +
  "qualifier", updateInd.ml
 +
  "qualifiers", historyDiffDisplay.ml
 +
  "qvar"
 +
  "r_father", updateInd.ml
 +
  "r_mother", updateInd.ml
 +
  "random", srcfileDisplay.ml
 +
  "real_nb_persons", srcfileDisplay.ml
 +
  "red_of_hsv"
 +
  "referer"
 +
  "region", util.ml
 +
  "related"
 +
  "related_type"
 +
  "relation", updateInd.ml
 +
  "relation_her"
 +
  "relation_him"
 +
  "relation_type"
 +
  "relations", historyDiffDisplay.ml
 +
  "reset_count", history.ml, updateDataDisplay.ml
 +
  "reset_count1"
 +
  "reset_count2"
 +
  "reset_count3"
 +
  "reset_desc_level"
 +
  "right"
 +
  "roman", templDate.ml
 +
  "rt_adoption", updateInd.ml
 +
  "rt_candidate_parent", updateInd.ml
 +
  "rt_empty", updateInd.ml
 +
  "rt_foster_parent", updateInd.ml
 +
  "rt_godparent", updateInd.ml
 +
  "rt_recognition", updateInd.ml
 +
  "safe", updateDataDisplay.ml
 +
  "same"
 +
  "seconds"
 +
  "self"
 +
  "sep1000", templDate.ml
 +
  "sep_date_s"
 +
  "set_count"
 +
  "set_infinite_desc_level"
 +
  "set_var", dagDisplay.ml
 +
  "setup_link"
 +
  "sex", historyDiffDisplay.ml, updateFam.ml, updateInd.ml
 +
  "slash_approx_birth_date"
 +
  "slash_approx_death_date"
 +
  "slash_baptism_date"
 +
  "slash_birth_date"
 +
  "slash_burial_date"
 +
  "slash_cremation_date"
 +
  "slash_death_date"
 +
  "slash_divorce_date"
 +
  "slash_marriage_date"
 +
  "sorted_list_item"
 +
  "sorted_listb_item"
 +
  "sorted_listc_item"
 +
  "sorted_listd_item"
 +
  "sorted_liste_item"
 +
  "sosa"
 +
  "sosa_access"
 +
  "sosa_anc"
 +
  "sosa_anc_p"
 +
  "sosa_in_list"
 +
  "sosa_link"
 +
  "sosa_next"
 +
  "sosa_prev"
 +
  "sosa_ref", srcfileDisplay.ml
 +
  "sosa_ref_max_anc_level"
 +
  "source"
 +
  "source_type"
 +
  "sources", updateInd.ml
 +
  "sp"
 +
  "spouse", historyDiffDisplay.ml
 +
  "src"
 +
  "start_date", srcfileDisplay.ml
 +
  "static_max_anc_level", dagDisplay.ml
 +
  "static_max_desc_level", dagDisplay.ml
 +
  "static_path"
 +
  "subs", updateDataDisplay.ml
 +
  "substr", updateDataDisplay.ml
 +
  "substr_start"
 +
  "substr_start_e"
 +
  "suburb", updateDataDisplay.ml
 +
  "suffix"
 +
  "supervisor"
 +
  "surname", history.ml, historyDiffDisplay.ml, updateFam.ml, updateInd.ml
 +
  "surname_alias", updateInd.ml
 +
  "surname_begin"
 +
  "surname_end"
 +
  "surname_key"
 +
  "surname_key_strip"
 +
  "surname_key_val"
 +
  "surnames_aliases", historyDiffDisplay.ml
 +
  "svar"
 +
  "t_estate", updateInd.ml
 +
  "t_ident", updateInd.ml
 +
  "t_main", updateInd.ml
 +
  "t_name", updateInd.ml
 +
  "t_nth", updateInd.ml
 +
  "table", srcfileDisplay.ml
 +
  "tail", updateDataDisplay.ml
 +
  "text", dagDisplay.ml, update_util.ml
 +
  "time", history.ml
 +
  "title", history.ml, updateDataDisplay.ml, updateInd.ml
 +
  "title_date_end", updateInd.ml
 +
  "title_date_start", updateInd.ml
 +
  "titles", historyDiffDisplay.ml
 +
  "today", hutil.ml
 +
  "town", util.ml
 +
  "township", util.ml
 +
  "transl_date", historyDiffDisplay.ml
 +
  "true"
 +
  "type"
 +
  "update", history.ml
 +
  "url"
 +
  "url_no_pwd"
 +
  "url_set"
 +
  "url_set2"
 +
  "url_set3"
 +
  "url_set_pn"
 +
  "user", history.ml
 +
  "v", history.ml
 +
  "val"
 +
  "value", updateDataDisplay.ml
 +
  "var", history.ml
 +
  "version"
 +
  "wcnt", updateFam.ml, updateInd.ml
 +
  "wedding_birthday"
 +
  "week_day", templDate.ml
 +
  "witness", updateFam.ml, updateInd.ml
 +
  "witness_attending"
 +
  "witness_civilofficer"
 +
  "witness_godparent"
 +
  "witness_informant"
 +
  "witness_kind", updateInd.ml
 +
  "witness_mentioned"
 +
  "witness_other"
 +
  "witness_relation"
 +
  "witness_religiousofficer"
 +
  "witnesses", historyDiffDisplay.ml
 +
  "wizard", historyDiffDisplay.ml
 +
  "wiznotes_dir_exists", srcfileDisplay.ml
 +
  "year", templDate.ml, update_util.ml
 +
  "year2"
 +
  "yymmdd", dateDisplay.ml
 +
  "yyyymmdd", dateDisplay.ml
 
</pre>
 
</pre>
 
</div>
 
</div>
Line 493: Line 867:
  
 
List of the commands appearing in URL with the form:
 
List of the commands appearing in URL with the form:
  %sm=COMMAND;p=param1;n=param2;
+
  %prefix;m=COMMAND;p=param1;n=param2; (or %sm=COMMAND... in notes and m=SRC .txt files)
  
 
This list does not claim to be exhaustive, and does not "explain" what each command does!
 
This list does not claim to be exhaustive, and does not "explain" what each command does!
  
 
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4">
 
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4">
"A"
+
  "A"
"ADD_FAM"  
+
  "AD"
"ADD_FAM_OK"  
+
  "ADD_FAM"
"ADD_IND"  
+
  "ADD_FAM_OK"
"ADD_IND_OK"
+
  "ADD_IND"
"ADD_PAR"  
+
  "ADD_IND_OK"
"ANM"  
+
  "ADD_PAR"
"AN"
+
  "ADD_PAR_OK"
"AD"
+
  "AM"
"AM"
+
  "AN"
"AS_OK"  
+
  "ANM"
"B"  
+
  "AS_OK"
"C"
+
  "C"
"CAL"  
+
  "CAL"
"CHG_CHN"  
+
  "CAST"
"CHG_CHN_OK"  
+
  "CHANGE_WIZ_VIS"
"CHG_FAM_ORD"  
+
  "CHG_CHN"
"CHG_FAM_ORD_OK"  
+
  "CHG_CHN_OK"
"CONN_WIZ" *
+
  "CHG_EVT_FAM_ORD"
"D"
+
  "CHG_EVT_FAM_ORD_OK"
"DAG" *
+
  "CHG_EVT_IND_ORD"
"DEL_FAM"
+
  "CHG_EVT_IND_ORD_OK"
"DEL_FAM_OK"
+
  "CHG_FAM_ORD"
"DEL_IMAGE"
+
  "CHG_FAM_ORD_OK"
"DEL_IMAGE_OK"  
+
  "CONN_WIZ"
"DEL_IND"
+
  "D"
"DEL_IND_OK"  
+
  "DAG" *
"DOC" (* see IM for version 7 *)
+
  "DATE"
"FORUM"
+
  "DEL_FAM"
"FORUM_ADD"
+
  "DEL_FAM_OK"
"FORUM_ADD_OK"
+
  "DEL_IMAGE"
"FORUM_DEL"
+
  "DEL_IMAGE_OK"
"FORUM_P_P"
+
  "DEL_IND"
"FORUM_SEARCH"
+
  "DEL_IND_OK"
"FORUM_VAL"
+
  "F"
"FORUM_VIEW"
+
  "FIXBASE"
"H"
+
  "FIXBASE_OK"
"HIST"  
+
  "FORUM_ADD"
"HIST_CLEAN"
+
  "FORUM_ADD_OK"
"HIST_CLEAN_OK"  
+
  "FORUM_DEL"
"HIST_DIFF"  
+
  "FORUM_P_P"
"HIST_SEARCH"  
+
  "FORUM_SEARCH"
"IM" *
+
  "FORUM_VAL"
"IMH" *
+
  "FORUM_VIEW"
"INV_FAM"
+
  "H"
"INV_FAM_OK"
+
  "HIST"
"KILL_ANC"  
+
  "HIST_CLEAN"
"LB"  
+
  "HIST_CLEAN_OK"
"LD"  
+
  "HIST_DIFF"
"LINKED"
+
  "HIST_SEARCH"
"LL"  
+
  "IM" *
"LM"  
+
  "IMH" *
"LEX"  
+
  "INV_FAM"
"MISC_NOTES"  
+
  "INV_FAM_OK"
"MISC_NOTES_SEARCH"  
+
  "KILL_ANC"
"MOD_DATA"
+
  "L"
"MOD_DATA_OK"
+
  "LB"
"MOD_FAM"
+
  "LD"
"MOD_FAM_OK"
+
  "LINKED"
"MOD_IND"
+
  "LL"
"MOD_IND_OK"  
+
  "LM"
"MOD_NOTES"
+
  "LOG"
"MOD_NOTES_OK"
+
  "MISC_NOTES"
"MOD_WDOC"  (* obsolete *)
+
  "MISC_NOTES_SEARCH"
"MOD_WDOC_OK"  (* obsolete *)
+
  "MOD_DATA"
"MOD_WIZNOTES" *
+
  "MOD_DATA_OK"
"MOD_WIZNOTES_OK" *
+
  "MOD_FAM"
"MRG"  
+
  "MOD_FAM_OK"
"MRG_DUP"
+
  "MOD_IND"
"MRG_DUP_IND_Y_N"  
+
  "MOD_IND_OK"
"MRG_DUP_FAM_Y_N"  
+
  "MOD_NOTES"
"MRG_FAM"
+
  "MOD_NOTES_OK"
"MRG_FAM_OK"
+
  "MOD_WIZNOTES"
"MRG_MOD_FAM_OK"  
+
  "MOD_WIZNOTES_OK"
"MRG_IND"
+
  "MRG"
"MRG_IND_OK"
+
  "MRG_DUP"
"MRG_MOD_IND_OK"  
+
  "MRG_DUP_FAM_Y_N"
"N"
+
  "MRG_DUP_IND_Y_N"
"NG"
+
  "MRG_FAM"
"NOTES"  
+
  "MRG_FAM_OK"
"OA"  
+
  "MRG_IND"
"OE"  
+
  "MRG_IND_OK"
"P"
+
  "MRG_MOD_FAM_OK"
"POP_PYR"  
+
  "MRG_MOD_IND_OK"
"PS" P
+
  "N"
"R"
+
  "NAME"
"REQUEST"  
+
  "NG"
"RL"  
+
  "NOTES"
"RLM" *
+
  "OA"
"S"  
+
  "OE"
"SND_IMAGE"
+
  "OPT"
"SND_IMAGE_OK"  
+
  "P"
"SRC" *
+
  "POP_PYR"
"STAT"
+
  "PPS"
"CHANGE_WIZ_VIS" *
+
  "PS"
"TT"  
+
  "R"
"U"  
+
  "REQUEST"
"VIEW_WIZNOTES"  
+
  "RL"
"WDOC" (* obsolete *)
+
  "RLM" *
"WIZNOTES" *
+
  "S"
"WIZNOTES_SEARCH" *
+
  "SND_IMAGE"
 +
  "SND_IMAGE_OK"
 +
  "SRC" *
 +
  "STAT"
 +
  "TP"
 +
  "TT"
 +
  "U"
 +
  "VIEW_WIZNOTES" *
 +
  "WIZNOTES" *
 +
  "WIZNOTES_SEARCH" *
 
</div>
 
</div>
  
Line 607: Line 990:
 
*[[wiznotes|WIZNOTES]] and the various WIZ related commands.
 
*[[wiznotes|WIZNOTES]] and the various WIZ related commands.
  
 +
== Environnement and configuration ==
 +
GeneWeb propose a general-purpose mechanism allowing the user/programmer to extend at will the notion of variable described here.
  
== Variables (evar and bvar) ==
+
=== Configuration variables ===
 
+
If a new variable is defined in the [[gwf|{{c|.gwf}}]] configuration file, then it will be possible to test for the value of this variable in the context of a template file. For instance, if we have added
GeneWeb proposed a general purpose mechanism allowing the user/programmer to extend at will the notion of variable described here.
 
 
 
If a new variable is defined in the {{c|.gwf}} configuration file, then it will be possible to test for the value of this variable in the context of a template file. For instance, if we have added
 
 
  new_var=some-text
 
  new_var=some-text
 
in {{c|.gwf}}, then the following code in the template will be able to perform some specific action:
 
in {{c|.gwf}}, then the following code in the template will be able to perform some specific action:
 +
 
  %if; (bvar.new_var = "sometext" )  
 
  %if; (bvar.new_var = "sometext" )  
 
     ... perform some specific action ...
 
     ... perform some specific action ...
 
  %end;
 
  %end;
  
Similarly, if we have added a new variable in the URL of the query to GeneWeb ({{c|1=localhost:2317/base?p=first-name;n=last-name;lang=fr;tree=3}}, then it is possible to test for this variable with code such as:
+
==== Personal variables ====
 
 
%if; (evar.tree = 3 )
 
    ... display 3 generation tree ...
 
%end;
 
 
 
The value itself of such variables can be inserted in the body of a template by typing {{c|%evar.tree;}}, for instance:
 
 
 
<nowiki><title>Tree with %evar.tree; generations</title></nowiki>
 
 
 
 
The special variable ''var'' is treated in the following fashion within notes, sources and comments:
 
The special variable ''var'' is treated in the following fashion within notes, sources and comments:
If you define in the {{c|.gwf}} file a variable {{c|1=var_text=some_text}}, then invoquing the macro {{c|%vtext;}} in a note or a template will produce the text {{c|some_text}} as in the following example:
+
If you define in the {{c|.gwf}} file a variable {{c|1=var_text=some_text}}, then calling the macro {{c|%vtext;}} in a note or a template will produce the text {{c|some_text}} as in the following example:
 
  var_who=Bond, James Bond
 
  var_who=Bond, James Bond
 
{{c|"My name is %vwho;."}} in a note will be transformed into {{c|"My name is Bond, James Bond."}}.
 
{{c|"My name is %vwho;."}} in a note will be transformed into {{c|"My name is Bond, James Bond."}}.
  
This feature is used by some to facilitate signature of sources. The {{c|.gwf}} file contains a list of {{c|var_nickname}} definitions whose value is a full name and possibly a pointer to a page containing more detailed information:
+
This feature is used by some to facilitate the signature of sources. The {{c|.gwf}} file contains a list of {{c|var_nickname}} definitions whose value is a full name and possibly a pointer to a page containing more detailed information:
 
  var_henri=<a href="http://site/base?p=Firstname;n=lastname">First_name Lastname</a>
 
  var_henri=<a href="http://site/base?p=Firstname;n=lastname">First_name Lastname</a>
 
(no %x or %macro; in the value of the parameter!!).
 
(no %x or %macro; in the value of the parameter!!).
Line 641: Line 1,015:
 
  var_who=<nowiki>[[james/bond/James Bond]]</nowiki>
 
  var_who=<nowiki>[[james/bond/James Bond]]</nowiki>
 
which will include the text "James Bond" and a link to the corresponding page.
 
which will include the text "James Bond" and a link to the corresponding page.
 +
 +
=== Environment variables (evar/e) ===
 +
Environment variables are variables used by templates to modify the behaviour of pages. They are available in the query string of the URL and can be called to obtain their value with “{c|%evar.variable_name;}} or shorter {{%e.variable_name;}} since v7.1.
 +
 +
Examples with a query string that is {{c|1=?lang=fr&m=A&t=T&p=first_name&n=lastname&v=7}}, to check if…
 +
* … the language is English: {{c|1=%if;(evar.lang="en")…%end;}}.
 +
* … the individual has a first_name and a surname defined: {{c|1=%if;(e.p!="" and e.n!="")…%end;}}.
 +
* … the number of generations is lower than 10: {{c|1=%if;(e.v<10)…%end;}}.
 +
 +
Out of templates, there are potentially few environment variables used in {{c|.ml}} code that are parts of {{c|conf.env}} (to be searched with {{c|p_getenv}} in files.
 +
 +
See also “[[gwd#Some frequently used evars]]” for more examples.
  
 
== Bvar variables used in templates ==
 
== Bvar variables used in templates ==
  
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4">
+
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
access_by_key
+
  access_by_key
always_surname
+
  always_surname
auth_file
+
  auth_file
authorized_wizards_notes
+
  authorized_wizards_notes
birth_symbol
+
  base_notes_title
can_kill_ancestors
+
  birth_symbol
can_send_image
+
  can_kill_ancestors
counter
+
  can_send_image
css
+
  carrousel
datalist_fn
+
  com
datalist_occu
+
  counter
datalist_place
+
  css
datalist_sn
+
  css_prop
datalist_src
+
  datalist_fn
datalist_z1
+
  datalist_occu
death_symbol
+
  datalist_place
default_fnav_images
+
  datalist_sn
default_fnav_semi
+
  datalist_src
default_fnav_spouse
+
  datalist_z
default_image_no
+
  death_symbol
default_image=
+
  default_fnav_images
default_lang
+
  default_fnav_semi
default_sosa_ref
+
  default_fnav_spouse
defaut_lang
+
  default_image
disable_forum
+
  default_image_no
display_sosa
+
  default_lang
display_timeline
+
  default_sosa_ref
event_age
+
  defaut_lang
friend_passwd
+
  disable_forum
full_siblings
+
  display_sosa
hide_advanced_request
+
  display_timeline
history_diff
+
  event_age
history
+
  fn_sn_switch
jquery
+
  friend_passwd
latest_event
+
  friend_passwd_file
max_anc_level
+
  full_siblings
max_anc_tree
+
  hide_advanced_request
max_cousins_level
+
  history
max_dates
+
  history_diff
max_desc_level
+
  jquery
max_desc_tree
+
  latest_event
maxlev
+
  max_anc_level
menu
+
  max_anc_tree
misc
+
  max_cousins_level
module_perso_ix
+
  max_dates
module_perso_tplnb
+
  max_desc_level
motd
+
  max_desc_tree
move_comment
+
  max_rlm_nbr
moved
+
  maxlev
multi_parents
+
  menu
no_image_for_visitor
+
  misc
no_note_for_visitor
+
  module_perso_ix
notextarea
+
  module_perso_tplnb
origin_file
+
  motd
p_mod
+
  move_comment
particles
+
  moved
perso_module_modnum
+
  multi_parents
perso_module_tplnum
+
  no_image_for_visitor
propose_add_family
+
  no_note_for_visitor
propose_alias
+
  notextarea
propose_place_surnames
+
  origin_file
propose_qualifier
+
  p_mod
propose_titles
+
  particles
setup_http
+
  perso_module_modnum
setup_link
+
  perso_module_tplnum
show_consang
+
  plugins
show_flag
+
  propose_add_family
show_invisible
+
  propose_alias
static_path
+
  propose_place_surnames
template
+
  propose_qualifier
timeline
+
  propose_titles
uppercase
+
  setup_http
use_cdn
+
  setup_link
var_img_ext
+
  show_consang
var_t_BIRTHA
+
  show_flag
visitor_access_msg_en
+
  show_invisible
visitor_access_msg_lg
+
  static_path
visitor_access
+
  template
welcome_logo_style
+
  timeline
welcome_logo
+
  tuxfamily
wide
+
  txt
wizard_just_friend
+
  uppercase
wizard_passwd_file
+
  use_cdn
wizard_passwd
+
  var_img_ext
 +
  var_t_BIRTHA
 +
  var_t_DEATHA
 +
  var_t_MARRIAGEA
 +
  visitor_access
 +
  visitor_access_msg_en
 +
  visitor_access_msg_lg
 +
  welcome_logo
 +
  welcome_logo_style
 +
  wide
 +
  wizard_descr_file
 +
  wizard_just_friend
 +
  wizard_passwd
 +
  wizard_passwd_file
 
</div>
 
</div>
  
== Gwd controlled variables ==
+
== Bvar variables used by Gwd ==
  
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4">
+
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
  always_surname
+
  always_surname, yes
 
  auth_file
 
  auth_file
 +
base_notes_title
 
  body_prop
 
  body_prop
 
  can_kill_ancestors
 
  can_kill_ancestors
  counter
+
can_send_image, no
  death_symbol
+
conf.base_env
 +
  counter, no
 +
  death_symbol, †
 
  default_sosa_ref
 
  default_sosa_ref
  disable_forum
+
  disable_forum, yes
doctype
+
  dump_bad_images, yes
  dump_bad_images
 
 
  expand_env
 
  expand_env
  fast_alphabetic
+
  fast_alphabetic, yes
 
  forum_exclude_file
 
  forum_exclude_file
 +
friend_passwd
 
  friend_passwd_file
 
  friend_passwd_file
friend_passwd
 
 
  has_events
 
  has_events
 +
history, yes
 
  history_diff
 
  history_diff
 
  history_path
 
  history_path
  history
+
  image_prefix
 
  images_path
 
  images_path
 
  latest_event
 
  latest_event
  long_date
+
  long_date, yes
 
  max_anc_tree
 
  max_anc_tree
 
  max_ancestor_implex
 
  max_ancestor_implex
max_cousins_level
 
 
  max_cousins
 
  max_cousins
 
  max_desc_level
 
  max_desc_level
Line 764: Line 1,165:
 
  max_images_size
 
  max_images_size
 
  max_nb_update
 
  max_nb_update
 +
max_rlm_nbr
 
  moderator_file
 
  moderator_file
  moved
+
  no
 
  notes_alias_file
 
  notes_alias_file
 
  notify_change
 
  notify_change
  opt
+
  passwd_
place_surname_link_to_ind
 
 
  place
 
  place
  places_format
+
  place_surname_link_to_ind, yes
  places_inverted
+
  places_inverted, yes
  print_advanced_title
+
  print_advanced_title, yes
  propose_add_family
+
  propose_add_family, no
  ptempl
+
  ptempl, yes
 
  red_if_not_exist
 
  red_if_not_exist
  renamed
+
  short_place_threshold
 +
show_query_time
 +
static_path
 
  template
 
  template
 +
var_
 +
visitor_access, no
 
  wizard_descr_file
 
  wizard_descr_file
 
  wizard_passwd_file
 
  wizard_passwd_file
 
</div>
 
</div>
 +
 +
The bvar name is sometimes followed by one of its options (yes/no)
  
 
== Building trees through direct url construction ==
 
== Building trees through direct url construction ==

Latest revision as of 15:04, 6 November 2023

150px-Geographylogo svg.png Language:   English

Template programming (%if; ... %end;)

The template mechanism provides a very powerful mechanism to construct HTML (or other) pages according to the content of a GeneWeb base. This section is not intending to give an exhaustive description of the corresponding language. Through some examples extracted from gw/etc/perso.txt, it provides a glimpse of the possibility. The last two examples are extracted from a template that generates LaTeX rather than HTML.

For further analysis, explore the various other template files, and on last resort, explore the Ocaml source files!!

WARNING: one of the main issue with template programming is that all functions are not permanently available on all pages! Describing which are available where is beyond reach, and trial and error is the only solution, but being aware of the problem is important!!

Programming constructs:

 %define(p1, p2) ... %end;
 %if;(cond) [%elseif;] [%else;] %end;
 %let;xxx;zzz%in;
 %foreach; ... %end;
 %for;i;0;n;... %end;
 %apply;xxxx(p1, p2) or
 %apply; ... [%with;... [%and;] ...%end;]
 %nl; %nn; %sp; %sq;

Functions callable with %apply:

 a_of_b ("aaa", "bbb") 
 a_of_b2 ("aaa", "bbb", "ccc") test vowel at beginning of "ccc"
 a_of_b_gr_eq_lev (??)
 capitalize ("aaa")
 language_name ("fr")
 nth("aaa"/"bbb"/"ccc"/"ddd", n)
 nth_c("abcdef", n)
 blue_of_hsv
 red_of_hsv
 green_of_hsv

Arithmetic and booleans:

 +, -, /, *, %, =, !=, <, <=, >, >=, "and", "or", "not", "is_substr" or "in"

WARNING: all functions may not be fully available depending on the execution context!

 <title>%nn;
   %if;has_public_name;
     %if;has_qualifiers;%public_name; %qualifier;
     %else;%public_name; %surname;%end;
   %else;
     %if;has_qualifiers;%first_name; %qualifier;
     %else;%first_name; %surname;%end;
   %end;
 </title>
%define;married_to(sexx, date_place)
 %if;(sexx = 0 or sexx = 2)
   %if;are_married;[*married%t to:::date_place]0%nn;
   %elseif;are_not_married;[*relationship%t to:::date_place]0%nn;
   %elseif;are_engaged;[*engaged%t to:::date_place]0%nn;
   %elseif;is_no_sexes_check;[*relationship%t to:::date_place]0%nn;
   %elseif;is_no_mention;date_place [*with]%nn;
   %end;
 %else;
   %if;are_married;[*married%t to:::date_place]1%nn;
   %elseif;are_not_married;[*relationship%t to:::date_place]1%nn;
   %elseif;are_engaged;[*engaged%t to:::date_place]1%nn;
   %elseif;is_no_sexes_check;[*relationship%t to:::date_place]1%nn;
   %elseif;is_no_mention;date_place [*with]%nn;
   %end;
 %end;
%end;
%if;(bvar.can_send_image != "no" and image = "" and first_name != "?" and surname != "?")
     <li><a href="%prefix;m=SND_IMAGE;i=%index;" class="add_portrait">
            %if;(auto_image_file_name != "")[*modify picture]%else;[*add picture]%end;
          </a>
     </li>
%end;
 
%define;hgindex(alxx, snxx, fnxx, occxx)
  %if;(alxx = "0")
    %if;(occxx = "0")
      \index{snxx, fnxx}
    %else;
      \index{snxx, fnxx (occxx)}
    %end;
  %else;
    %if;(occxx = "0")
      \index{alxx, voir snxx, fnxx}
    %else;
      \index{alxx, voir snxx, fnxx (occxx)}
    %end;
  %end;
%end
%foreach;alias;
    {\it {\bf %alias;}}%apply;hgindex(alias, surname, first_name, occ)\\%nl;
%end;

List of commands

This list does not claim to be exhaustive (but pretty close!!). A good way to understand the semantic of these commands is to explore the template files and observe how they are used (grep is your friend).

Most of the commands are interpreted by the files perso.ml or templ.ml. When this is not the case, the name of the interpreter file is associated with the command.

  "a_of_b"
  "a_of_b2"
  "a_of_b_gr_eq_lev"
  "acc_if_titles", updateInd.ml
  "acc_private", updateInd.ml
  "acc_public", updateInd.ml
  "acces", historyDiffDisplay.ml
  "access", dagDisplay.ml, history.ml, historyDiffDisplay.ml
  "access_by_key"
  "action"
  "add_in_sorted_list"
  "add_in_sorted_listb"
  "add_in_sorted_listc"
  "add_in_sorted_listd"
  "add_in_sorted_liste"
  "after", historyDiffDisplay.ml
  "age"
  "alias", updateInd.ml
  "aliases", historyDiffDisplay.ml
  "align", dagDisplay.ml
  "all"
  "anc1"
  "anc2"
  "anc_f_list"
  "anc_level"
  "anc_paths"
  "anc_paths_at_level"
  "anc_paths_at_level_cnt"
  "anc_paths_at_level_cnt_raw"
  "anc_paths_cnt"
  "anc_paths_cnt_raw"
  "anc_sosa"
  "ancestor"
  "ancestor_at_level"
  "ancestor_level"
  "ancestor_surname"
  "ancestor_tree_line"
  "and"
  "approx_birth_place"
  "approx_death_place"
  "are_divorced"
  "are_engaged"
  "are_marriage_banns"
  "are_marriage_contract"
  "are_marriage_license"
  "are_married"
  "are_not_married"
  "are_pacs"
  "are_residence"
  "are_separated"
  "auto_image_file_name"
  "bapt", updateInd.ml
  "bapt_note", updateInd.ml
  "bapt_place", updateInd.ml
  "bapt_src", updateInd.ml
  "baptism", historyDiffDisplay.ml
  "baptism_date"
  "baptism_note", historyDiffDisplay.ml
  "baptism_place", historyDiffDisplay.ml
  "baptism_source"
  "baptism_src", historyDiffDisplay.ml
  "baptism_witness"
  "bar_link", dagDisplay.ml
  "base", srcfileDisplay.ml
  "base_header"
  "base_trailer"
  "bases_list"
  "bdo", dagDisplay.ml
  "before", historyDiffDisplay.ml
  "birth", historyDiffDisplay.ml, updateInd.ml
  "birth_date"
  "birth_day", updateFam.ml
  "birth_month", updateFam.ml
  "birth_note", historyDiffDisplay.ml, updateInd.ml
  "birth_place", historyDiffDisplay.ml, updateFam.ml, updateInd.ml
  "birth_source"
  "birth_src", historyDiffDisplay.ml, updateInd.ml
  "birth_witness"
  "birth_year", updateFam.ml
  "birthday"
  "blue_of_hsv"
  "bname_prefix"
  "body_prop"
  "border"
  "browsing_with_sosa_ref", dagDisplay.ml, srcfileDisplay.ml
  "bt_buried", updateInd.ml
  "bt_cremated", updateInd.ml
  "bt_unknown_burial", updateInd.ml
  "burial", historyDiffDisplay.ml, updateInd.ml
  "burial_date"
  "burial_note", historyDiffDisplay.ml, updateInd.ml
  "burial_place", historyDiffDisplay.ml, updateInd.ml
  "burial_source"
  "burial_src", historyDiffDisplay.ml, updateInd.ml
  "burial_witness"
  "bvar", updateFam.ml
  "cal_french", update_util.ml
  "cal_gregorian", update_util.ml
  "cal_hebrew", update_util.ml
  "cal_julian", update_util.ml
  "calendar", update_util.ml
  "cancel_links"
  "canton", util.ml
  "capitalize"
  "cell"
  "cell_nbr", dagDisplay.ml
  "center", dagDisplay.ml
  "cgi"
  "charset"
  "child", updateFam.ml
  "child_cnt"
  "child_name"
  "children", historyDiffDisplay.ml
  "clean_comment_tags"
  "clean_html_tags"
  "cnt", updateDataDisplay.ml, updateFam.ml, updateInd.ml
  "colspan", dagDisplay.ml
  "comment", historyDiffDisplay.ml, updateFam.ml
  "computable_age"
  "computable_death_age"
  "computable_marriage_age"
  "connections"
  "consanguinity"
  "copyright"
  "count", history.ml, updateDataDisplay.ml
  "count1"
  "count2"
  "count3"
  "country", util.ml
  "county", util.ml
  "cous_paths"
  "cous_paths_cnt"
  "cous_paths_cnt_raw"
  "cous_paths_max_date"
  "cous_paths_min_date"
  "cousin"
  "cousin_level"
  "cousins"
  "cousins_cnt"
  "create", updateFam.ml, updateInd.ml, updateIndOk.ml, update_util.ml
  "cremated_date"
  "cremation_place"
  "cremation_witness"
  "dag", dagDisplay.ml
  "dag_cell", dagDisplay.ml
  "dag_cell_pre", dagDisplay.ml
  "dag_line", dagDisplay.ml
  "dag_line_pre", dagDisplay.ml
  "date", historyDiffDisplay.ml, hutil.ml
  "date_begin"
  "date_end"
  "date_s"
  "dates", history.ml
  "day", templDate.ml, update_util.ml
  "day2"
  "ddmmyyyy", dateDisplay.ml
  "dead_dont_know_when", updateInd.ml
  "death", historyDiffDisplay.ml, updateInd.ml
  "death_age"
  "death_date"
  "death_day", updateFam.ml
  "death_month", updateFam.ml
  "death_note", historyDiffDisplay.ml, updateInd.ml
  "death_place", historyDiffDisplay.ml, updateFam.ml, updateInd.ml
  "death_source"
  "death_src", historyDiffDisplay.ml, updateInd.ml
  "death_witness"
  "death_year", updateFam.ml
  "debug"
  "desc_cnt"
  "desc_level"
  "desc_paths"
  "desc_paths_at_level"
  "desc_paths_at_level_cnt"
  "desc_paths_at_level_cnt_raw"
  "desc_paths_cnt"
  "desc_paths_cnt_raw"
  "descendant"
  "descendant_cnt"
  "descendant_level"
  "died"
  "died_young", updateInd.ml
  "digest", updateFam.ml, updateInd.ml
  "district", util.ml
  "divorce", historyDiffDisplay.ml, updateFam.ml
  "divorce_date"
  "dmyyyy", dateDisplay.ml
  "doctype"
  "dont_know_if_dead", updateInd.ml
  "dr_disappeared", updateInd.ml
  "dr_executed", updateInd.ml
  "dr_killed", updateInd.ml
  "dr_murdered", updateInd.ml
  "dr_unspecified", updateInd.ml
  "e_name", updateFam.ml, updateInd.ml
  "e_note", updateFam.ml, updateInd.ml
  "e_place", updateFam.ml, updateInd.ml
  "e_src", updateFam.ml, updateInd.ml
  "empty_sorted_list"
  "empty_sorted_listb"
  "empty_sorted_listc"
  "empty_sorted_listd"
  "empty_sorted_liste"
  "enclosing"
  "encode", updateDataDisplay.ml
  "entry", updateDataDisplay.ml
  "entry_ini", updateDataDisplay.ml
  "entry_key", updateDataDisplay.ml
  "entry_value", updateDataDisplay.ml
  "entry_value_rev", updateDataDisplay.ml
  "env"
  "env_binding"
  "evar", historyDiffDisplay.ml, updateDataDisplay.ml
  "evar_cur"
  "event", updateFam.ml, updateInd.ml
  "event_date", updateFam.ml, updateInd.ml
  "event_str", updateFam.ml, updateInd.ml
  "event_witness"
  "event_witness_kind"
  "event_witness_relation"
  "event_witness_relation_kind"
  "f_of_index"
  "false"
  "family", historyDiffDisplay.ml
  "family_cnt"
  "father", dagDisplay.ml, updateFam.ml
  "father_age_at_birth"
  "father_sosa"
  "fevent", historyDiffDisplay.ml, updateFam.ml
  "fevent_date", historyDiffDisplay.ml
  "fevent_name", historyDiffDisplay.ml
  "fevent_note", historyDiffDisplay.ml
  "fevent_place", historyDiffDisplay.ml
  "fevent_src", historyDiffDisplay.ml
  "fevent_witness", historyDiffDisplay.ml
  "first", updateDataDisplay.ml
  "first_name", history.ml, historyDiffDisplay.ml, updateFam.ml, updateInd.ml
  "first_name_alias", updateInd.ml
  "first_name_key"
  "first_name_key_strip"
  "first_name_key_val"
  "first_names_aliases", historyDiffDisplay.ml
  "found", history.ml
  "french", templDate.ml
  "friend"
  "fsources", historyDiffDisplay.ml, updateFam.ml
  "fwitness", updateFam.ml
  "fwitness_kind", updateFam.ml
  "get_var", dagDisplay.ml
  "green_of_hsv"
  "gregorian", templDate.ml
  "has_aliases", updateInd.ml
  "has_approx_birth_date"
  "has_approx_birth_place"
  "has_approx_death_date"
  "has_approx_death_place"
  "has_baptism_date"
  "has_baptism_note"
  "has_baptism_place"
  "has_baptism_source"
  "has_baptism_witnesses"
  "has_birth_date", updateInd.ml
  "has_birth_note"
  "has_birth_place"
  "has_birth_source"
  "has_birth_witnesses"
  "has_burial_date"
  "has_burial_note"
  "has_burial_place"
  "has_burial_source"
  "has_burial_witnesses"
  "has_children"
  "has_comment"
  "has_consanguinity"
  "has_cremation_date"
  "has_cremation_place"
  "has_cremation_witnesses"
  "has_date"
  "has_death_date"
  "has_death_note"
  "has_death_place"
  "has_death_source"
  "has_death_witnesses"
  "has_event"
  "has_families"
  "has_fevents", updateFam.ml
  "has_first_names_aliases", updateInd.ml
  "has_fsources"
  "has_fwitness", updateFam.ml
  "has_history", history.ml, srcfileDisplay.ml
  "has_image"
  "has_image_url"
  "has_linked_page"
  "has_linked_pages"
  "has_marriage_note"
  "has_marriage_source"
  "has_misc_notes", srcfileDisplay.ml
  "has_nephews_or_nieces"
  "has_next_sibling", dagDisplay.ml
  "has_nobility_titles"
  "has_note"
  "has_notes", srcfileDisplay.ml
  "has_occupation"
  "has_parents"
  "has_pevent_baptism", updateInd.ml
  "has_pevent_birth", updateInd.ml
  "has_pevent_burial", updateInd.ml
  "has_pevent_cremation", updateInd.ml
  "has_pevent_death", updateInd.ml
  "has_pevents", updateInd.ml
  "has_place"
  "has_possible_duplications"
  "has_prev_sibling", dagDisplay.ml
  "has_primary_pevents", updateInd.ml
  "has_psources"
  "has_public_name"
  "has_qualifiers", updateInd.ml
  "has_referer"
  "has_relation_her"
  "has_relation_him"
  "has_relations", updateInd.ml
  "has_secondary_pevents", updateInd.ml
  "has_siblings"
  "has_sosa"
  "has_sources"
  "has_spouse"
  "has_src"
  "has_surnames_aliases", updateInd.ml
  "has_titles", updateInd.ml
  "has_witness", updateInd.ml
  "has_witnesses"
  "head_title", dagDisplay.ml
  "hebrew", templDate.ml
  "hexa"
  "hidden"
  "highlight"
  "himher", updateFam.ml
  "history_file", history.ml
  "history_len", historyDiffDisplay.ml
  "history_line", history.ml, historyDiffDisplay.ml
  "hour", templDate.ml
  "hours"
  "ident"
  "ident_key"
  "image", historyDiffDisplay.ml, updateInd.ml
  "image_html_url"
  "image_medium_size"
  "image_prefix"
  "image_size"
  "image_small_size"
  "image_url"
  "include"
  "include_perso_header", updateFam.ml, updateInd.ml
  "incr_count", history.ml, updateDataDisplay.ml
  "incr_count1"
  "incr_count2"
  "incr_count3"
  "incr_next_pevent", updateInd.ml
  "index", dagDisplay.ml, templDate.ml, updateInd.ml
  "ini", updateDataDisplay.ml
  "init", srcfileDisplay.ml
  "init_cache"
  "initial", updateDataDisplay.ml
  "integer", hutil.ml
  "integer_range", hutil.ml
  "interp"
  "interval"
  "is_bar", dagDisplay.ml
  "is_buried"
  "is_center"
  "is_certainly_dead"
  "is_cremated"
  "is_dead"
  "is_descendant"
  "is_empty"
  "is_female", updateInd.ml
  "is_first", dagDisplay.ml, updateFam.ml, updateInd.ml
  "is_hr", dagDisplay.ml
  "is_hr_center", dagDisplay.ml
  "is_hr_left", dagDisplay.ml
  "is_hr_right", dagDisplay.ml
  "is_invisible", history.ml
  "is_last", dagDisplay.ml, updateFam.ml, updateInd.ml
  "is_left"
  "is_main"
  "is_male", updateInd.ml
  "is_modified", updateDataDisplay.ml
  "is_no_mention"
  "is_no_sexes_check"
  "is_note", history.ml
  "is_nothing", dagDisplay.ml
  "is_printed_by_template"
  "is_private"
  "is_public"
  "is_restricted"
  "is_right"
  "is_self"
  "is_sibling_after"
  "is_sibling_before"
  "is_substr"
  "is_top"
  "item", dagDisplay.ml
  "iz"
  "julian", templDate.ml
  "julian_day", templDate.ml
  "just_friend_wizard"
  "key", history.ml
  "lang"
  "language_name"
  "lazy_force"
  "lazy_print"
  "lazy_printed"
  "left"
  "length", updateDataDisplay.ml
  "lev_cnt"
  "level"
  "line", historyDiffDisplay.ml
  "line_nbr", dagDisplay.ml
  "link", updateInd.ml
  "link_next", dagDisplay.ml
  "linked_page"
  "list_size"
  "listb_size"
  "listc_size"
  "listd_size"
  "liste_size"
  "lvl"
  "manitou"
  "mark_descendants"
  "marriage", historyDiffDisplay.ml, updateFam.ml
  "marriage_age"
  "marriage_date"
  "marriage_note", updateFam.ml
  "marriage_place", historyDiffDisplay.ml, updateFam.ml
  "marriage_places"
  "marriage_source"
  "marriage_src", historyDiffDisplay.ml, updateFam.ml
  "marriage_type", historyDiffDisplay.ml
  "max", dagDisplay.ml, updateDataDisplay.ml
  "max_a"
  "max_anc_level"
  "max_cous_level"
  "max_d"
  "max_desc_level"
  "max_wid", dagDisplay.ml
  "message_to_wizard"
  "min", dagDisplay.ml
  "min_wid", dagDisplay.ml
  "minute", templDate.ml
  "minutes"
  "misc_names"
  "mmddyyyy", dateDisplay.ml
  "mn", history.ml
  "mode"
  "month", templDate.ml, update_util.ml
  "month2"
  "moon_age", templDate.ml
  "moon_phase", templDate.ml
  "mother", dagDisplay.ml
  "mother_age_at_birth"
  "mother_sosa"
  "mrel", updateFam.ml
  "name", srcfileDisplay.ml
  "nb_accesses", srcfileDisplay.ml
  "nb_accesses_to_welcome", srcfileDisplay.ml
  "nb_children"
  "nb_children_total"
  "nb_events"
  "nb_families", historyDiffDisplay.ml
  "nb_fevents", updateFam.ml
  "nb_ind"
  "nb_persons", srcfileDisplay.ml
  "nb_pevents", updateInd.ml
  "nb_results", updateDataDisplay.ml
  "nb_times"
  "nb_witnesses_attending"
  "nb_witnesses_civilofficer"
  "nb_witnesses_godparent"
  "nb_witnesses_informant"
  "nb_witnesses_mentioned"
  "nb_witnesses_other"
  "nb_witnesses_religiousofficer"
  "nb_witnesses_witness"
  "nbr"
  "nbr_a"
  "nbr_a_l"
  "ncol", dagDisplay.ml
  "next_item"
  "next_pevent", updateInd.ml
  "next_sibling", dagDisplay.ml
  "nn"
  "nob_title"
  "nobility_title"
  "not"
  "not_dead", updateInd.ml
  "note", history.ml
  "notes", historyDiffDisplay.ml, updateInd.ml
  "nth"
  "nth_c"
  "number_of_ancestors"
  "number_of_ancestors_at_level"
  "number_of_bases"
  "number_of_descendants"
  "number_of_descendants_at_level"
  "number_of_subitems"
  "occ", history.ml, historyDiffDisplay.ml, updateFam.ml, updateInd.ml
  "occupation", historyDiffDisplay.ml, updateFam.ml, updateInd.ml
  "octal"
  "of_course_dead", updateInd.ml
  "on_baptism_date"
  "on_birth_date"
  "on_burial_date"
  "on_cremation_date"
  "on_date"
  "on_death_date"
  "on_marriage_date"
  "or"
  "orday", update_util.ml
  "origin_file", historyDiffDisplay.ml, updateFam.ml
  "ormonth", update_util.ml
  "oryear", update_util.ml
  "other", updateDataDisplay.ml
  "p", updateDataDisplay.ml
  "p_of_index"
  "parent", updateFam.ml
  "part", history.ml
  "path"
  "path_at_level"
  "path_end"
  "person", history.ml, historyDiffDisplay.ml
  "person_index"
  "pevent", historyDiffDisplay.ml, updateInd.ml
  "pevent_date", historyDiffDisplay.ml
  "pevent_name", historyDiffDisplay.ml
  "pevent_note", historyDiffDisplay.ml
  "pevent_place", historyDiffDisplay.ml
  "pevent_src", historyDiffDisplay.ml
  "pevent_witness", historyDiffDisplay.ml
  "place"
  "place_key"
  "places"
  "plugin"
  "plugins"
  "pos", history.ml
  "prec", update_util.ml
  "prec_about", update_util.ml
  "prec_after", update_util.ml
  "prec_before", update_util.ml
  "prec_maybe", update_util.ml
  "prec_no", update_util.ml
  "prec_oryear", update_util.ml
  "prec_sure", update_util.ml
  "prec_yearint", update_util.ml
  "prefix"
  "prefix_base"
  "prefix_base_password"
  "prefix_no_all"
  "prefix_no_iz"
  "prefix_no_lang"
  "prefix_no_pmod"
  "prefix_no_templ"
  "prefix_no_wide"
  "prefix_set"
  "prev_fam_father"
  "prev_fam_index"
  "prev_fam_mother"
  "prev_family"
  "prev_item"
  "prev_sibling", dagDisplay.ml
  "printable", updateDataDisplay.ml
  "psources", historyDiffDisplay.ml
  "public_name", historyDiffDisplay.ml, updateInd.ml
  "pvar"
  "qualifier", updateInd.ml
  "qualifiers", historyDiffDisplay.ml
  "qvar"
  "r_father", updateInd.ml
  "r_mother", updateInd.ml
  "random", srcfileDisplay.ml
  "real_nb_persons", srcfileDisplay.ml
  "red_of_hsv"
  "referer"
  "region", util.ml
  "related"
  "related_type"
  "relation", updateInd.ml
  "relation_her"
  "relation_him"
  "relation_type"
  "relations", historyDiffDisplay.ml
  "reset_count", history.ml, updateDataDisplay.ml
  "reset_count1"
  "reset_count2"
  "reset_count3"
  "reset_desc_level"
  "right"
  "roman", templDate.ml
  "rt_adoption", updateInd.ml
  "rt_candidate_parent", updateInd.ml
  "rt_empty", updateInd.ml
  "rt_foster_parent", updateInd.ml
  "rt_godparent", updateInd.ml
  "rt_recognition", updateInd.ml
  "safe", updateDataDisplay.ml
  "same"
  "seconds"
  "self"
  "sep1000", templDate.ml
  "sep_date_s"
  "set_count"
  "set_infinite_desc_level"
  "set_var", dagDisplay.ml
  "setup_link"
  "sex", historyDiffDisplay.ml, updateFam.ml, updateInd.ml
  "slash_approx_birth_date"
  "slash_approx_death_date"
  "slash_baptism_date"
  "slash_birth_date"
  "slash_burial_date"
  "slash_cremation_date"
  "slash_death_date"
  "slash_divorce_date"
  "slash_marriage_date"
  "sorted_list_item"
  "sorted_listb_item"
  "sorted_listc_item"
  "sorted_listd_item"
  "sorted_liste_item"
  "sosa"
  "sosa_access"
  "sosa_anc"
  "sosa_anc_p"
  "sosa_in_list"
  "sosa_link"
  "sosa_next"
  "sosa_prev"
  "sosa_ref", srcfileDisplay.ml
  "sosa_ref_max_anc_level"
  "source"
  "source_type"
  "sources", updateInd.ml
  "sp"
  "spouse", historyDiffDisplay.ml
  "src"
  "start_date", srcfileDisplay.ml
  "static_max_anc_level", dagDisplay.ml
  "static_max_desc_level", dagDisplay.ml
  "static_path"
  "subs", updateDataDisplay.ml
  "substr", updateDataDisplay.ml
  "substr_start"
  "substr_start_e"
  "suburb", updateDataDisplay.ml
  "suffix"
  "supervisor"
  "surname", history.ml, historyDiffDisplay.ml, updateFam.ml, updateInd.ml
  "surname_alias", updateInd.ml
  "surname_begin"
  "surname_end"
  "surname_key"
  "surname_key_strip"
  "surname_key_val"
  "surnames_aliases", historyDiffDisplay.ml
  "svar"
  "t_estate", updateInd.ml
  "t_ident", updateInd.ml
  "t_main", updateInd.ml
  "t_name", updateInd.ml
  "t_nth", updateInd.ml
  "table", srcfileDisplay.ml
  "tail", updateDataDisplay.ml
  "text", dagDisplay.ml, update_util.ml
  "time", history.ml
  "title", history.ml, updateDataDisplay.ml, updateInd.ml
  "title_date_end", updateInd.ml
  "title_date_start", updateInd.ml
  "titles", historyDiffDisplay.ml
  "today", hutil.ml
  "town", util.ml
  "township", util.ml
  "transl_date", historyDiffDisplay.ml
  "true"
  "type"
  "update", history.ml
  "url"
  "url_no_pwd"
  "url_set"
  "url_set2"
  "url_set3"
  "url_set_pn"
  "user", history.ml
  "v", history.ml
  "val"
  "value", updateDataDisplay.ml
  "var", history.ml
  "version"
  "wcnt", updateFam.ml, updateInd.ml
  "wedding_birthday"
  "week_day", templDate.ml
  "witness", updateFam.ml, updateInd.ml
  "witness_attending"
  "witness_civilofficer"
  "witness_godparent"
  "witness_informant"
  "witness_kind", updateInd.ml
  "witness_mentioned"
  "witness_other"
  "witness_relation"
  "witness_religiousofficer"
  "witnesses", historyDiffDisplay.ml
  "wizard", historyDiffDisplay.ml
  "wiznotes_dir_exists", srcfileDisplay.ml
  "year", templDate.ml, update_util.ml
  "year2"
  "yymmdd", dateDisplay.ml
  "yyyymmdd", dateDisplay.ml

Note for has_event (v7)

Note that the has_event function does not consider birth, baptism, death and burial as "events" per se (as they are often already listed in the personnal data of the individual). If you want those events to be taken into account in this function, then you have to add has_events=always in your .gwf parameter file.

Note also that if has_events=never, then has_event always returns False.

JavaScript

JavaScript can be inserted anytime within templates. JavaScript code may contain template commands as in:

<script type="text/javascript">
  <!--
  function over1(xx)
  {
   document.getElementById(xx).style.%if;(evarso="on")outline="#C0FEFF solid 6px"%else;backgroundColor="#CBFECE"%end;;
   return false;
  }
  function out1(xx)
  {
   document.getElementById(xx).style.%if;(evarso="on")outline="none"%else;backgroundColor=""%end;;
   return false;
  }
  -->
</script>

Note that GeneWeb does not perform any language interpretation ([text to be translated]) within HTML comments!

Macros (%x)

See Macros for a description of their use and a better/updated table.

Below is the result of calling all 26 lower case possible macros: This table is automatically generated by inserting a bit of HTML/GeneWeb code into the notes of one person in your base. The corresponding code is here

Table of GeneWeb macros.

Commands (m=XXX)

List of the commands appearing in URL with the form:

%prefix;m=COMMAND;p=param1;n=param2; (or %sm=COMMAND... in notes and m=SRC .txt files)

This list does not claim to be exhaustive, and does not "explain" what each command does!

 "A"
 "AD"
 "ADD_FAM"
 "ADD_FAM_OK"
 "ADD_IND"
 "ADD_IND_OK"
 "ADD_PAR"
 "ADD_PAR_OK"
 "AM"
 "AN"
 "ANM"
 "AS_OK"
 "C"
 "CAL"
 "CAST"
 "CHANGE_WIZ_VIS"
 "CHG_CHN"
 "CHG_CHN_OK"
 "CHG_EVT_FAM_ORD"
 "CHG_EVT_FAM_ORD_OK"
 "CHG_EVT_IND_ORD"
 "CHG_EVT_IND_ORD_OK"
 "CHG_FAM_ORD"
 "CHG_FAM_ORD_OK"
 "CONN_WIZ"
 "D"
 "DAG" *
 "DATE"
 "DEL_FAM"
 "DEL_FAM_OK"
 "DEL_IMAGE"
 "DEL_IMAGE_OK"
 "DEL_IND"
 "DEL_IND_OK"
 "F"
 "FIXBASE"
 "FIXBASE_OK"
 "FORUM_ADD"
 "FORUM_ADD_OK"
 "FORUM_DEL"
 "FORUM_P_P"
 "FORUM_SEARCH"
 "FORUM_VAL"
 "FORUM_VIEW"
 "H"
 "HIST"
 "HIST_CLEAN"
 "HIST_CLEAN_OK"
 "HIST_DIFF"
 "HIST_SEARCH"
 "IM" *
 "IMH" *
 "INV_FAM"
 "INV_FAM_OK"
 "KILL_ANC"
 "L"
 "LB"
 "LD"
 "LINKED"
 "LL"
 "LM"
 "LOG"
 "MISC_NOTES"
 "MISC_NOTES_SEARCH"
 "MOD_DATA"
 "MOD_DATA_OK"
 "MOD_FAM"
 "MOD_FAM_OK"
 "MOD_IND"
 "MOD_IND_OK"
 "MOD_NOTES"
 "MOD_NOTES_OK"
 "MOD_WIZNOTES"
 "MOD_WIZNOTES_OK"
 "MRG"
 "MRG_DUP"
 "MRG_DUP_FAM_Y_N"
 "MRG_DUP_IND_Y_N"
 "MRG_FAM"
 "MRG_FAM_OK"
 "MRG_IND"
 "MRG_IND_OK"
 "MRG_MOD_FAM_OK"
 "MRG_MOD_IND_OK"
 "N"
 "NAME"
 "NG"
 "NOTES"
 "OA"
 "OE"
 "OPT"
 "P"
 "POP_PYR"
 "PPS"
 "PS"
 "R"
 "REQUEST"
 "RL"
 "RLM" *
 "S"
 "SND_IMAGE"
 "SND_IMAGE_OK"
 "SRC" *
 "STAT"
 "TP"
 "TT"
 "U"
 "VIEW_WIZNOTES" *
 "WIZNOTES" *
 "WIZNOTES_SEARCH" *

Commands marked with a * are documented below:

Environnement and configuration

GeneWeb propose a general-purpose mechanism allowing the user/programmer to extend at will the notion of variable described here.

Configuration variables

If a new variable is defined in the .gwf configuration file, then it will be possible to test for the value of this variable in the context of a template file. For instance, if we have added

new_var=some-text

in .gwf, then the following code in the template will be able to perform some specific action:

%if; (bvar.new_var = "sometext" ) 
    ... perform some specific action ...
%end;

Personal variables

The special variable var is treated in the following fashion within notes, sources and comments: If you define in the .gwf file a variable var_text=some_text, then calling the macro %vtext; in a note or a template will produce the text some_text as in the following example:

var_who=Bond, James Bond

"My name is %vwho;." in a note will be transformed into "My name is Bond, James Bond.".

This feature is used by some to facilitate the signature of sources. The .gwf file contains a list of var_nickname definitions whose value is a full name and possibly a pointer to a page containing more detailed information:

var_henri=<a href="http://site/base?p=Firstname;n=lastname">First_name Lastname</a>

(no %x or %macro; in the value of the parameter!!).

Note: in latest version 7 of GeneWeb, the wiki syntax can be used in the parameter as in:

var_who=[[james/bond/James Bond]]

which will include the text "James Bond" and a link to the corresponding page.

Environment variables (evar/e)

Environment variables are variables used by templates to modify the behaviour of pages. They are available in the query string of the URL and can be called to obtain their value with “{c|%evar.variable_name;}} or shorter Template:%e.variable name; since v7.1.

Examples with a query string that is ?lang=fr&m=A&t=T&p=first_name&n=lastname&v=7, to check if…

  • … the language is English: %if;(evar.lang="en")…%end;.
  • … the individual has a first_name and a surname defined: %if;(e.p!="" and e.n!="")…%end;.
  • … the number of generations is lower than 10: %if;(e.v<10)…%end;.

Out of templates, there are potentially few environment variables used in .ml code that are parts of conf.env (to be searched with p_getenv in files.

See also “gwd#Some frequently used evars” for more examples.

Bvar variables used in templates

 access_by_key
 always_surname
 auth_file
 authorized_wizards_notes
 base_notes_title
 birth_symbol
 can_kill_ancestors
 can_send_image
 carrousel
 com
 counter
 css
 css_prop
 datalist_fn
 datalist_occu
 datalist_place
 datalist_sn
 datalist_src
 datalist_z
 death_symbol
 default_fnav_images
 default_fnav_semi
 default_fnav_spouse
 default_image
 default_image_no
 default_lang
 default_sosa_ref
 defaut_lang
 disable_forum
 display_sosa
 display_timeline
 event_age
 fn_sn_switch
 friend_passwd
 friend_passwd_file
 full_siblings
 hide_advanced_request
 history
 history_diff
 jquery
 latest_event
 max_anc_level
 max_anc_tree
 max_cousins_level
 max_dates
 max_desc_level
 max_desc_tree
 max_rlm_nbr
 maxlev
 menu
 misc
 module_perso_ix
 module_perso_tplnb
 motd
 move_comment
 moved
 multi_parents
 no_image_for_visitor
 no_note_for_visitor
 notextarea
 origin_file
 p_mod
 particles
 perso_module_modnum
 perso_module_tplnum
 plugins
 propose_add_family
 propose_alias
 propose_place_surnames
 propose_qualifier
 propose_titles
 setup_http
 setup_link
 show_consang
 show_flag
 show_invisible
 static_path
 template
 timeline
 tuxfamily
 txt
 uppercase
 use_cdn
 var_img_ext
 var_t_BIRTHA
 var_t_DEATHA
 var_t_MARRIAGEA
 visitor_access
 visitor_access_msg_en
 visitor_access_msg_lg
 welcome_logo
 welcome_logo_style
 wide
 wizard_descr_file
 wizard_just_friend
 wizard_passwd
 wizard_passwd_file

Bvar variables used by Gwd

always_surname, yes
auth_file
base_notes_title
body_prop
can_kill_ancestors
can_send_image, no
conf.base_env
counter, no
death_symbol, †
default_sosa_ref
disable_forum, yes
dump_bad_images, yes
expand_env
fast_alphabetic, yes
forum_exclude_file
friend_passwd
friend_passwd_file
has_events
history, yes
history_diff
history_path
image_prefix
images_path
latest_event
long_date, yes
max_anc_tree
max_ancestor_implex
max_cousins
max_desc_level
max_desc_tree
max_images_size
max_nb_update
max_rlm_nbr
moderator_file
no
notes_alias_file
notify_change
passwd_
place
place_surname_link_to_ind, yes
places_inverted, yes
print_advanced_title, yes
propose_add_family, no
ptempl, yes
red_if_not_exist
short_place_threshold
show_query_time
static_path
template
var_
visitor_access, no
wizard_descr_file
wizard_passwd_file

The bvar name is sometimes followed by one of its options (yes/no)

Building trees through direct url construction

See trees or trees/fr


GeneWeb Manual

Rembrandt Old Man Reading a Book.jpg

Use and manage genealogical databases

Technical annex