Whilst small files can be uploaded to forum posts, if you have a custom theme or module to contribute please add it on the "Add-ons" page.

TOPIC: [SOLVED] Best way to create new reports

Best way to create new reports 2 months 3 weeks ago #1

  • wersvdru
  • wersvdru's Avatar
  • Offline
  • New
  • Posts: 4
In versions prior to 2.?? I was able to create reports by copying and editing a few files and enabling them in modules. One example is a Military Service Report (Who served, when and what branch), I copied the death report and modified to give me what I wanted.

What is the best approach for that in version 2.??, currently on Alpha 5

Thanks,
Scott
The administrator has disabled public write access.

Best way to create new reports 2 months 3 weeks ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11102
You'd use the same approach:

* copy/edit an existing XML file
* create a module with a name, etc.

I can't remember if the support for this went in before or after the alpha.5 release.

I'll create an example and add it to the source code.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Best way to create new reports 2 months 3 weeks ago #3

  • wersvdru
  • wersvdru's Avatar
  • Offline
  • New
  • Posts: 4
Correct.
Basically I copied the occupation report this time and created two files, although it doesn't show up in the Modules section to enable/disable.

webtrees\app\Module\MilitaryReportModule.php
webtrees\resources\xml\reports\military_report.xml


Thanks for checking.
The administrator has disabled public write access.

Best way to create new reports 2 months 3 weeks ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11102
It doesn't show up because you have created a custom module, and stored it with the core modules.

These are now separate folders, and webtrees only scans for custom modules in /modules_v4/

Note that the location of this folder might move before 2.0 goes live. I want to move it to /data/modules/ as this will make it possible to install/update/delete modules using the control panel.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Best way to create new reports 2 months 3 weeks ago #5

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11102
There's now an example available here:

github.com/fisharebest/webtrees/tree/master/modules_v4

You'll need the latest code to use it.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Best way to create new reports 2 months 3 weeks ago #6

  • wersvdru
  • wersvdru's Avatar
  • Offline
  • New
  • Posts: 4
once I download the files and place into webtrees\modules_v4\example-report.disable, I then copy that to webtrees\modules_v4\militaryreport and then when I try to go to my Control Panel on the site I get a white page(nothing), no modifications to either file. I then place .disable next to the folder and now I can access the control panel.

I can wait for beta or final release to address this.

Thanks,
The administrator has disabled public write access.

Best way to create new reports 2 months 3 weeks ago #7

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11102
> once I download the files and place into webtrees\modules_v4\example-report.disable,

Did you just download these files?

They rely on the rest of the system - so you'll need to download *everything*.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Best way to create new reports 2 months 3 weeks ago #8

  • wersvdru
  • wersvdru's Avatar
  • Offline
  • New
  • Posts: 4
I just figured that out as I was looking at other modified files on GitHub. Thank you for the assistance.
The administrator has disabled public write access.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

[SOLVED] Best way to create new reports 2 months 3 weeks ago #9

  • wersvdru
  • wersvdru's Avatar
  • Offline
  • New
  • Posts: 4
Problem solved.
The administrator has disabled public write access.
Powered by Kunena Forum