vytux-com / vytux_cousins Goto Github PK
View Code? Open in Web Editor NEWCousins tab module for webtrees
Cousins tab module for webtrees
this webtrees module is now obsolete: use https://github.com/hartenthaler/hh_extended_family
I like the vytux cousins module very much, but after webtrees is upgraded to 2.1.0, this module makes mistakes.
Will you update this module? I hope you can come back!
Best wishes
In version 1.x the cousins were displayed in two columns - left father's family, right mother's family. Needless to say this was much better arranged layout.
Is it possible to apply this in version 2.x?
On the individual's tab Cousins, the links to cousins at the right side, i.e. Mothers's family, point to the individual itself. Other links are OK.
After unzipping the module folder must be renamed to "vytux_cousins" (without the version ending).
It would be nice if the module could also display cousins of nonmarried couples
I am particularly interested in finding all second-cousins, that would be very helpful to have.
In your boot()
method, you type-hint two variables - $user
and $tree
.
https://github.com/vytux-com/vytux_cousins/blob/master/module.php#L262
You do not use these variables so you do not need to specify them
In the latest code, you cannot request the tree like this. Instead, you obtain it as an attribute of the request. $request->getAttribute('tree')
.
In webtrees 1.7 there were .mo files in language folder.
Could you please describe, say in README.md, how to implement translation into a language without modifying your module.php?
Call to a member function attribute() on null …/modules_v4/vytux_cousins-master/module.php:217
#0 …/modules_v4/vytux_cousins-master/resources/views/tab.phtml(26): Vytux\WebtreesModules\VytuxCousins\VytuxCousinsTabModule->getChildLabel()
#1 …/app/View.php(183): include('/www/wwwroot/ch...')
#2 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#3 …/app/Helpers/functions.php(145): Fisharebest\Webtrees\View::make()
#4 …/modules_v4/vytux_cousins-master/module.php(248): view()
...
case 'ru':
return $this->russianTranslations();
............
/**
* @return array
*/
protected function russianTranslations() : array
{
// Note the special characters used in plural and context-sensitive translations.
return [
'Cousins' => 'Двоюродные братья и сёстры',
'A tab showing cousins of an individual.' => 'Вкладка с двоюродными братьями и сёстрами человека.',
'No family available' => 'Нет доступных семей',
'Father\'s family (%s)' => 'По отцу (%s)',
'Mother\'s family (%s)' => 'По матери (%s)',
'%2$s has %1$d first cousin recorded' . I18N::PLURAL . '%2$s has %1$d first cousins recorded'
=> '%2$s имеет %1$d двоюродного брата или сестру записанным' . I18N::PLURAL . '%2$s имеет %1$d двоюродных братьев или сестёр записанными' . I18N::PLURAL . '%2$s имеет %1$d двоюродных братьев или сестёр записанными',
];
}
I am missing the translation of some items.
I use webtrees with german language.
thx Franz
If two sets of siblings in a family are married then the resulting cousins get duplicated as they technically belong to both mothers and fathers families. However the total count should exclude the duplicates.
Only father side cousins are shown in the narrow (<600px) display.
I did a quick fix for myself: line 56 in vytux_cousins.css to display: table-cell; did fix it but the resulting tables are extremely narrow. It would be better if the tables were one below the other.
The module is throwing an error when upgrading site to 2.1.0 of webtrees.
now I get
Call to undefined method Fisharebest\Webtrees\Individual::getLifeSpan() …/modules_v4/vytux_cousins/resources/views/tab.phtml:25
#0 …/app/View.php(186): include()
#1 …/app/View.php(282): Fisharebest\Webtrees\View->render()
#2 …/app/Helpers/functions.php(203): Fisharebest\Webtrees\View::make('vytux_cousins...', Array)
#3 …/modules_v4/vytux_cousins/module.php(240): view('vytux_cousins...', Array)
#4 …/resources/views/individual-page.phtml(120): Vytux\WebtreesModules\VytuxCousins\VytuxCousinsTabModule->getTabContent(Object(Fisharebest\Webtrees\Individual))
#5 …/app/View.php(186): include('/home/amitys/te...')
#6 …/app/View.php(282): Fisharebest\Webtrees\View->render()
#7 …/app/Helpers/functions.php(203): Fisharebest\Webtrees\View::make('individual-page', Array)
etc.
app/Gedcomcode/GedcomCodePedi.php was removed from webtrees.
We get now error
Class 'Fisharebest\Webtrees\GedcomCode\GedcomCodePedi' not found …/modules_v4/vytux_cousins/module.php:219
I get again an error in webtrees 2.0.0
Call to undefined method Fisharebest\Webtrees\Individual::primaryChildFamily() …/modules_v4/vytux_cousins/module.php:159
#0 …/modules_v4/vytux_cousins/module.php(238): Vytux\WebtreesModules\VytuxCousins\VytuxCousinsTabModule->getCousins(Object(Fisharebest\Webtrees\Individual))
#1 …/resources/views/individual-page.phtml(120): Vytux\WebtreesModules\VytuxCousins\VytuxCousinsTabModule->getTabContent(Object(Fisharebest\Webtrees\Individual))
#2 …/app/View.php(186): include('/home/amitys/te...')
#3 …/app/View.php(282): Fisharebest\Webtrees\View->render()
#4 …/app/Helpers/functions.php(203): Fisharebest\Webtrees\View::make('individual-page', Array)
#5 …/app/Http/ViewResponseTrait.php(51): view('individual-page', Array)
#6 …/app/Http/RequestHandlers/IndividualPage.php(171): Fisharebest\Webtrees\Http\RequestHandlers\IndividualPage->viewResponse('individual-page', Array)
#7 …/app/Http/Middleware/WrapHandler.php(83): Fisharebest\Webtrees\Http\RequestHandlers\IndividualPage->handle(Object(Nyholm\Psr7\ServerRequest))
#8 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\WrapHandler->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#9 …/app/Module/HitCountFooterModule.php(147): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.