Question customizing 2.0.3
- pilgrim
- Topic Author
- Offline
- New Member
Can I modify or supplement the module "Historic Events"?
In version 1 of webtrees you could create a file "histo.xx.php" and fill it yourself. The modules that are now available (British prime ministers, US presidents, French historical facts, etc.) are of little interest to me.
pedigree.med-huber.at/
Server: PHP-Version 7.2
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
This is a simple module to create. There are instructions at github.com/fisharebest/webtrees/tree/master/modules_v4
Use an existing module as an example.
e.g. github.com/fisharebest/webtrees/blob/mas...shPrimeMinisters.php
> The modules that are now available (British prime ministers, US presidents, French historical facts, etc.) are of little interest to me.
Perhaps you would like to contribute a list of events that is relevant to Austria?
I will happily include it in the next release of webtrees.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- pilgrim
- Topic Author
- Offline
- New Member
Thx
pedigree.med-huber.at/
Server: PHP-Version 7.2
Please Log in or Create an account to join the conversation.
- pilgrim
- Topic Author
- Offline
- New Member
Not sure about the acceptance of the German mutated vowels and how to formulate the last date "to now(?)" at the end of the list.
I send you the "AustrianPresidents.php" as a plain text file, because the extension *.php is not accepted as an attachment.
pedigree.med-huber.at/
Server: PHP-Version 7.2
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
> and how to formulate the last date "to now(?)"
I think it is better to leave the last date as "FROM 26 JAN 2017".
When you have your next president, this will simply be incomplete.
If you used "FROM 26 JAN 2017 TO <TODAY'S DATE>", then it would be wrong.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- pilgrim
- Topic Author
- Offline
- New Member
Have a nice weekend
pedigree.med-huber.at/
Server: PHP-Version 7.2
Please Log in or Create an account to join the conversation.
- pilgrim
- Topic Author
- Offline
- New Member
I have generated a German and an English version of a file with important events of modern times. For known reasons I send it again as text file.
Greetings from Vienna
pedigree.med-huber.at/
Server: PHP-Version 7.2
Please Log in or Create an account to join the conversation.
- jokep
- Offline
- New Member
- Posts: 3
first of all thank you very much for all the work you put into this wonderful software! I am using it in my own webspace since several weeks and am absolutely thrilled.
Like pilgrim, I, too, am trying to add Austria-specific historical events to my webtree instance. I tried to create a custom module, but it simply did not show in the modules page. Then, I noticed that the "third-party modules" page you linked to does not mention "ModuleHistoricEventsInterface" to be a valid interface.
I also renamed the module "example.disabled" to "example" which made it appear in the modules list. But when I changed "ModuleCustomInterface" to "ModuleHistoricEventsInterface" and "ModuleCustomTrait" to "ModuleHistoricEventsTrait", it broke the page (white empty page).
I also tried to duplicate the file "USPresidents.php" in the folder "/app/Module" and only modified the class name and the return value of the "title()" method (I replaced "USPresidents" with "TestPresidents"). Still, it does not show in the modules list.
What am I doing wrong? Maybe there is a place where built-in modules are listed, but I can't find the spot. I tried to add "TestPresidents" it to the appropriate spots in the "app/Services/ModuleService.php" file but it also broke by webtrees.
Thanks a lot for your help!
Greetings from Vienna
Please Log in or Create an account to join the conversation.
- pilgrim
- Topic Author
- Offline
- New Member
ich bin mit meiner Datei auch noch nicht weitergekommen. Entweder die Datei wird in der Liste in der Verwaltung nicht angezeigt, damit ich sie aktivieren kann, oder das Programm hängt sich mit einer ganzen rosa Seite Fehlermeldungen auf.
Grüße von Wien nach Wien.
I haven't made much progress with my file either. Either the file is not shown in the list in the administration, so I can activate it, or the program hangs itself with a whole pink page of error messages.
Greetings from Vienna to Vienna.
pedigree.med-huber.at/
Server: PHP-Version 7.2
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
?> What am I doing wrong?
You do not change ModuleCustomInterface. You add to it. Your module is a custom module *and* a historic-events module.
> (white empty page)
webtrees.net/faq/500/
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- jokep
- Offline
- New Member
- Posts: 3
thank you very much, I got it to work! Both points helped a lot and looking into my server's php_errors.log file was very helpful, as well. The final trick was to add the following lines to the file:
Attached is the fixed version of pilgrim's module - it is very minimal, one should probably add a description text, the author, a version etc. before publishing it. Also, I modified the dates because the entries were not shown in the correct spots before.
Liebe Grüße
Johannes
Please Log in or Create an account to join the conversation.
- jokep
- Offline
- New Member
- Posts: 3
I just created a history module with relevant events regarding Austrian history. Feel free to use and improve it, you find it attached to this message.
Greetings from Vienna
Johannes
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Bogie
- Offline
- Elite Member
- Life is good!
Find attached a new small history file (TXT instead of PHP). I could not make it run on my system and hope it works for you anyway. It should show the German flag.
When it works that way I will contribute more.
What type of flag would you suggest for a file of 'wars in Europe' ?
Bogie
webtrees 2.1.19 | PHP 8.1.27 | MariaDB 10.5.23 | Apache on Ubuntu 12.9
AutoComplete places of @tkempf, chart modules of @magicsunday, Fancy treeview of @justCarmen
Please Log in or Create an account to join the conversation.
- hermann
- Offline
- Elite Member
you mixed up German and Austrian presidents in your list. Have you seen that there is already a module with GermanChancellorsAndPresidents (see Add-ons )?
There is another module that provides "Wars and Battles Worldwide (since 900)", too.
best regards Hermann
Hermann
Designer of the custom module "Extended Family"
webtrees 2.1.19 (all custom modules installed, PHP 8.2, MariaDB 10.6) @ ahnen.hartenthaler.eu
Please Log in or Create an account to join the conversation.
- Bogie
- Offline
- Elite Member
- Life is good!
It was a c&p inadvertance on line 4 and 5.
I was not aware of the two Add-ons. Wouldn't it make sense to offer those as historical facts wihtin webtrees instead of installing separate modules? That's what Greg offered 10 months ago. It would prevent me and others inventing the wheel twice. Also British monarchs, British prime ministers, Bundespräsidenten Österreichs and United States presidents are just there and only one click away.
Bogie
webtrees 2.1.19 | PHP 8.1.27 | MariaDB 10.5.23 | Apache on Ubuntu 12.9
AutoComplete places of @tkempf, chart modules of @magicsunday, Fancy treeview of @justCarmen
Please Log in or Create an account to join the conversation.
- hermann
- Offline
- Elite Member
Hermann
Designer of the custom module "Extended Family"
webtrees 2.1.19 (all custom modules installed, PHP 8.2, MariaDB 10.6) @ ahnen.hartenthaler.eu
Please Log in or Create an account to join the conversation.
- Bogie
- Offline
- Elite Member
- Life is good!
I had links to my histo facts in webtrees 1.x, too, and was missing them deeply.
I would say whoever would like to have the German presidents in another language could put in the same effort you invested in the beginning.
The same is true for the wars. The probability is even higher that some ancestors of more genealogists lived at those times and thus more guys might be interested in contributing more translations.
Hopefully maintaining German presidents and wars in Europe won't cause too much effort in future.
Only keeping consistency of all translations might be a bit sophisticated. But that's responsibility of the translators as is with the language files itself. I doubt that Greg knows all those languages good enough for doing all the work himself.
What's more who is taking care of the translation and maintenance of the Austrian presidents which already are part of the core?
Bogie
webtrees 2.1.19 | PHP 8.1.27 | MariaDB 10.5.23 | Apache on Ubuntu 12.9
AutoComplete places of @tkempf, chart modules of @magicsunday, Fancy treeview of @justCarmen
Please Log in or Create an account to join the conversation.