Web based family history software

Question customizing 2.0.3

  • pilgrim
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 8 hours ago #21 by pilgrim
Replied by pilgrim on topic customizing 2.0.3
From my first post on this topic one question remained unanswered:
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.

More
4 years 8 hours ago #22 by fisharebest
Replied by fisharebest on topic customizing 2.0.3
Historic events are now modules.

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
  • New Member
More
4 years 8 hours ago #23 by pilgrim
Replied by pilgrim on topic customizing 2.0.3
Let's see. It's gonna take a while.
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
  • New Member
More
4 years 5 hours ago #24 by pilgrim
Replied by pilgrim on topic customizing 2.0.3
Just a quick finger exercise to see if I have understood everything correctly.
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
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #25 by fisharebest
Replied by fisharebest on topic customizing 2.0.3
Thanks. I have added this.

> 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
  • New Member
More
3 years 11 months ago #26 by pilgrim
Replied by pilgrim on topic customizing 2.0.3
Okay, That makes sense.
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
  • New Member
More
3 years 11 months ago #27 by pilgrim
Replied by pilgrim on topic customizing 2.0.3
Thanks to a quarantine caused by Corona Virus it did not take as long as announced. But now I have to spend some time with my wife again ;-)
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
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago - 3 years 11 months ago #28 by jokep
Replied by jokep on topic customizing 2.0.3
Hi Greg,

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
Last edit: 3 years 11 months ago by jokep.

Please Log in or Create an account to join the conversation.

  • pilgrim
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #29 by pilgrim
Replied by pilgrim on topic customizing 2.0.3
Hi jokep,
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.

More
3 years 11 months ago #30 by fisharebest
Replied by fisharebest on topic customizing 2.0.3
> But when I changed "ModuleCustomInterface" to "ModuleHistoricEventsInterface" and "ModuleCustomTrait" to "ModuleHistoricEventsTrait", it broke the page (white empty page).

?> 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.
Code:
return new class extends AbstractModule implements ModuleCustomInterface, ModuleHistoricEventsInterface { use ModuleCustomTrait; use ModuleHistoricEventsTrait;

> (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.

More
3 years 11 months ago - 3 years 11 months ago #31 by jokep
Replied by jokep on topic customizing 2.0.3
Hi everyone,

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:

Code:
use Illuminate\Support\Collection; use Fisharebest\webtrees\Module\ModuleHistoricEventsInterface; use Fisharebest\webtrees\Module\ModuleHistoricEventsTrait;

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


File Attachment:

File Name: austrian-p...ents.zip
File Size:1 KB
Attachments:
Last edit: 3 years 11 months ago by jokep.

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #32 by jokep
Replied by jokep on topic customizing 2.0.3
Hi everyone,

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



File Attachment:

File Name: austrian-events.zip
File Size:7 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #33 by fisharebest
Replied by fisharebest on topic customizing 2.0.3
Thanks. I have added this to the code.

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
  • Elite Member
  • Life is good!
More
3 years 1 month ago #34 by Bogie
Replied by Bogie on topic customizing 2.0.3
Hi Greg,

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
Attachments:

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #35 by hermann
Replied by hermann on topic customizing 2.0.3
Dear Bogie,
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
Last edit: 3 years 1 month ago by hermann.

Please Log in or Create an account to join the conversation.

  • Bogie
  • Offline
  • Elite Member
  • Elite Member
  • Life is good!
More
3 years 1 month ago #36 by Bogie
Replied by Bogie on topic customizing 2.0.3
Thanks for your attentive reading, Hermann ;-)

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.

More
3 years 1 month ago #37 by hermann
Replied by hermann on topic customizing 2.0.3
This is possible. It would be ok for me to transfer my two modules to modules of the core code of webtrees. But who is then responsible to maintain the data? Greg? The community? Who is responsible to make all the modules with historic data consistent? For example, I decided for my modules to use markdown in NOTE, I decided to link to the German Wikipedia. If these modules are part of webtrees they should support the multilanguage concept of webtrees and link to the specific Wikipedia for the language of a webtrees user. This is possible, but a bit more complicated. And it is a lot more work to translate all the text inside the historic data modules to all languages of webtrees.

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
  • Elite Member
  • Life is good!
More
3 years 1 month ago - 3 years 1 month ago #38 by Bogie
Replied by Bogie on topic customizing 2.0.3
Thanks, good news!
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
Last edit: 3 years 1 month ago by Bogie.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}