The Sosa module is forked from the module written by André Dumas for webtrees 1.5. In particular, it uses the structure of the wt_sosa table created by this module, which contains the Sosa number and corresponding generation for each person and each gedcom.
At startup, we check if the table exists and if not we create it¹. The table is updated from time to time, on request of an editor. When an individual’s page is displayed, the module simply reads the table without recalculating the Sosa numbers each time.
¹ With some configurations (php ≥ 8), an error message is displayed but the table is created anyway. Reload the page to continue.
The Sosa²⁰ module fits with the 2.0 and 2.1 versions. For webtrees 1.7, use Sosa¹⁷.
For each tree (ie each gedcom file), a “default individual” must be defined. It will be used as a root (de cujus) for the calculation of the Sosa numbers.
If the sosa table has not been filled in, a user with editing rights is asked to update it.
Download Sosa²⁰ for webtrees 2.0 and 2.1 (2023-07 version). It includes three files that must be placed in the modules_v4/sosa20 folder.
For testing, Sosa²² for webtrees 2.2, incompatible with 2.0 et 2.1.
The module has been adapted to the specific case of the gustine.eu site, in particular to take into account the masking of the root. To get around this, we display the great-grandparent - visible to simple visitors - of which the person is the ancestor, as well as a Sosa number calculated from it.
The same approach is used for several collateral branches whose roots are also hidden from the visitors. Here again, the great-grandparents concerned are displayed.
Sosa or not, there is always a relationship between the person and the tree root (click on it) because all the individuals in the database are related by blood or marriage.