Category locked - this no longer exists as a custom module. A modified version is part of core code.

TOPIC:

Custom Tree view module 10 years 2 months ago #1

  • wooc
  • wooc's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 347
One of webtrees' user prepared the very nice tree view module for webtrees 1.1.0

It was started in bug area: bugs.launchpad.net/webtrees/+bug/713459

It will be moved to Add-ons area.

If you have a question or suggestions please report them in this thread.

Tree view module
Last edit: by ToyGuy. Reason: corrected spelling
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #2

I've never been a fan of the existing interactive tree, but this new module looks very nice!
I welcome this as a replacement of the existing one, or as an Add-on.

Noticed a bug tho, for a person married twice, I only see the child from the first marriage.
Also, there seem to be a bug in the heading (tab name) showing Tree*">Tree*
Personally, I do not like the framing and background images, and would rather like to have it fit existing themes.
webtrees 2.0.16 at visitusinmaputo.com/webtree PHP 7.4.16
webtrees 2.0 dev on local WampServer PHP 7.4.9
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #3

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
Thank you for having took a look at this new TreeView Module. It was a need because the existing one does not work properly (buggy and far much too slow).

About HRN feedback :
- "for a person married twice, I only see the child from the first marriage" : it's not a bug, it's a feature ! ;-) In fact, that is exactly the same feature that exists in the old interactive tree. You can choose to display all spouses (and related children and parents), or only the last one and their descendants and ascendants. These feature were probably introduced both as a workaround for performances issues and as a way to sometimes clear up the drawing in the old module, and after brainstorming I have choosen to keep this feature. But as it seems to be a bit confusing, that probably need something to be done. Suppressing this feature ? It's possible because there's no more performances issues, but the possibility to have a simple or more complex representation of a tree remain an asset. I vote for putting the module in the "all partners" mode by default. But I stay tuned to ear and take account of any ideas.

- "there seem to be a bug in the heading (tab name)" : that's right. This bug was introduced probably yesterday in webtrees with an extra treatment on the Module's name string. I've corrected that for me, but I'm not a committer, so I can't "commit" a bug fix at each problem, even if I work around that by frequent ne versions. To fix this bug, just edit the /treeview/module.php file and replace the getTitle() function by these one :
	public function getTitle() {
		return tvI18N::translate('Tree');
	}

- "Personally, I do not like the framing and background images, and would rather like to have it fit existing themes" : as a developper, I do not work a lot on design, but I work to offer to designers the best environment possible to express their talent. My new module has a default style (which need improvements), and take in account the existing theme which overide the default look (but this will practically work only when existing styles will have fully integrated the new TreeView module). And last, it's now possible to choose the appearance of the tree itself whatever theme you choose : that is mandatory to get corrct printings. The 3 styles embedded in "rev 7" are just some demos, and NOT definitive choices. I would be glad to receive the cooperation of designers upon this styles and new ones.

I've also worked on integration with existing styles (you'll see that in rev 8), particularly for the toolbox appearance, BUT that is generally ugly because of the current state of most of existing styles : for example, in the "colors" theme, ldarrow.gif and rdarrow.gif files aren't symetricals. And in some themes, some images are drawn with borders as buttons, and some other not. There's a real and serious problem about the coherence between existing styles, and nobody could get a smart presentation from ugly and so differents buttons. At least, webtrees team should publish rules about themes, and avoid the biggests incoherences. For rev 8, I've re-used existing images according to their name, using for example "patriarch.gif" as the icon for the "centering on root person" button. When the new Treeview module will be integrated, 2 icons will still lacks and require to be drawn for each theme : one for "no zoom", and one other for "compact/fixed boxes". And least, theme's designers could also totally change the appearance of the toolbox according to their theme's graphical rules.

If somebody would like to contribute on Treeview styles : you should take a look at the file /treeview/css/treeview.css. All colors, images, background images, and even toolbox appearance could be styled. The existing styles shows very simple examples, and anybody aware of web-design and CSS could create new styles. Be aware of the need for styles for screen but also for printing. The resolution of images should be setted to ensure smart printings at least at 300 dpi printing resolution. Otherwise, images will be overscaled when printed and that will be not beautiful. If you contribute a new astonishing style for the tree iteself, I will be glad to embed it in futures versions. You can think of differents kinds of frames, differents tree background textures (like old paper, parchment, or whatever you want), and different boxes presentations. Just be aware of required tests, on ALL (major) browsers and when printed.

Hey, it was a bit long, but it was probably necessary to make a step point about styling, and the required involvment of web-designers, graphists, or artists to go toward the dreamed treeview ! ;-)
Last edit: by geomaticien. Reason: typos
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #4

  • windmillway
  • windmillway's Avatar
  • Visitor
  • Visitor
Daniel,

Just downloaded your new treeview ... wonderful!

May I also just add a few additions to geomaticien's comments.
I think the code should be:
	// Extend tvModule. This title should be normalized when this module will be added officially
	public function getTitle() {
		return '<span title=\'New TreeView module\'>'. tvI18N::translate('Tree*'). '</span>';
	}

If you look at my attached image (which shows my greentrees theme)
greentrees screenshot

I think you need to adjust the css as follows as it works with all other themes too.
.tv_out {
  position: relative;
  overflow: hidden;
  /*border: thin solid #dfdfdf; /* customizable */
  border: none; /* customizable */
  min-height: 500px; /* customizable, not mandatory, but should be set to have allways something to display */
  max-height: 10000px; /* customizable, not mandatory, but should be set not too high to limit the size of ajax requests and not too low to enable whole big trees printing */
  height: 100%;
  width: 100%;
  /* background: #fffff8; /* customizable */
  background: transparent; /* customizable */
}


I also would like to have the styles adjusted so as to have the vertical tools menu option as standard.

Hey, these are just a few suggestions to what I condider to be a remarkable module.

Brian
Last edit: by windmillway.
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #5

  • daj
  • daj's Avatar
  • Visitor
  • Visitor
geomaticien,

Excellent work -- a massive improvement on the old Tree. I have already started styling it to suit my needs (dropped the border for a start)

Good work :-)
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #6

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
@ Brian : thank u for your kind suggestions. I've immediately followed these about .tv_out background. I'm a bit more reserved about the border, because most of existing themes haven't got a module border in the individual page, and that is a bit confusing not to know where is the drag area for the tree and the toolbox.
About your sample code, you're right but I prefered a revert to a standard title (text only) like other modules.
And for me, I prefer an horizontal toolbar than a vertical one. But that can be styled ! So you can, or more exactly you WILL be able to style your toolbar to have what you want. I say "you will", because for now, there's a serious bug in these part (done yesterday !) that prevent from using a vertical toolbox. I will change this both to solve this bug, improve the tree style's submenu (showing active style), and make this feature compliant with the damned buggy IE ! (which cannot deal with :hover properties like any real web browser)

Edit : I just saw your green design and I must say I'm really fond of such styles with black background. Furthermore, it reveal any error in CSS customization possibilities. But I saw you need only minutes to customize these module to fit your needs, and I guess you will now realize one or several astonishing tree styles and frames on black backround, no ? ;-) If this can help, I've noticed that a discrete background texture helps users when dragging (more feedback).

@ daj : thank u ! I'm happy to receive so much (positive) comments. Please feel free to give a feedback about styling and wanted improvements.

@ all : I've just corrected some parts to stop unuseful requests made when clicking on a link on person's boxes. This will be in my next release (rev 8).
Last edit: by geomaticien. Reason: viewed greentrees
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #7

  • davistom
  • davistom's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • davistom
  • Posts: 100
Is the custom treeview module v1.1.0 compatible? I have a clean install of v1.1.0 and I downloaded/unpacked/copied the module directory into the modules_v2 directory, then navigated to Admin to enable it but the module does not show up in the admin page modules list.

Thanks.
Live site (fotgp.com) - php 5.4, MySql 5.0.96, webtrees 1.7.9
Desktop - Win 7, Xampp 1.8.1, php 5.4.7, MySql 5.5.27, webtrees 1.7.9
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #8

  • windmillway
  • windmillway's Avatar
  • Visitor
  • Visitor
@ geomaticien

I agree about the border, I can easily fix that with an over-ride in my greentrees theme css.
Finally fixed the link ( as edited in my previous post)
greentrees screenshot


However WRT the tab that seemed to be buggy in it's title
Note carefully the Changes that I made
The <sup>*</sup> was causing a verical alignment problem in the tabs.
The Name Tree* was purely my choice for now .. you could call that what you want

Brian
Last edit: by windmillway.
The topic has been locked.
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: 

Re: Custom Tree view module 10 years 2 months ago #9

  • windmillway
  • windmillway's Avatar
  • Visitor
  • Visitor
@ Davistom

Did you save the Admin Parameters after looking at them, I had the same problem until I did.
The new Tree is at the top of the list.

Brian
Last edit: by windmillway.
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #10

  • davistom
  • davistom's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • davistom
  • Posts: 100
I didn't understand that the new module shows up at the top of the modules list. I looked for it in alphabetical order since all others are sorted.
Live site (fotgp.com) - php 5.4, MySql 5.0.96, webtrees 1.7.9
Desktop - Win 7, Xampp 1.8.1, php 5.4.7, MySql 5.5.27, webtrees 1.7.9
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #11

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
That was caused by the non-standard title I gave to this new module during the first development phasis. As you can see above, a title beginning by "<" is alphabetically sorted before any other. My next release will have just a standardized title "Tree" without anything else than the translated text. The only remaining problem will be with old buggy tree module (confusing same title). I think the old one should be in the future removed and replaced by the new one. But this removal will need work from WT team, because the old buggy module wasn't really a module, but has its code disseminated in webtrees core code. It had added many unuseful javascripts and other stuff that slow down the pages (deactivating the old tree module is not enough to get rif of its loaded depandancies).
The topic has been locked.

Re: Custom Tree view module 10 years 2 months ago #12

  • windmillway
  • windmillway's Avatar
  • Visitor
  • Visitor
Daniel

Can I talk to you offline about some future development ideas I have using your rather neat "Parchment" backgrounds?

My email address is This email address is being protected from spambots. You need JavaScript enabled to view it.

Brian
The topic has been locked.

Custom Tree view module dev version release rev 8 10 years 2 months ago #13

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
The latest dev release (rev 8) was uploaded here : bugs.launchpad.net/webtrees/+bug/713459/...es/treeview8.tar.bz2 . No major changes but many small enhancements. Please check the embedded readme file for infos, known bugs and roadmap.
The topic has been locked.

Re: Custom Tree view module dev version release rev 8 10 years 2 months ago #14

rev 8:

This module really has a potential, but still some bugs:

Show / hide multiples life partners or spouses does not work for me. All partners are displayed.

A man has two wives, one child in first marriage, and two children in second marriage.
If this man (or his father, or grandfather) is set as root person, both partners are shown, and also all three children - fine
If great-grandfather is set as root person, both partners are shown, but only the child from first marriage.

If I choose a female with more than one partner as root person, no children are shown in the tree, ancestors comes out totally wrong, maybe because her father was married twice?

If I choose any female with one partner as root person, this person AND her partner will have the same set of ancestors!!!
webtrees 2.0.16 at visitusinmaputo.com/webtree PHP 7.4.16
webtrees 2.0 dev on local WampServer PHP 7.4.9
The topic has been locked.

Re: Custom Tree view module dev version release rev 8 10 years 2 months ago #15

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
That's right. Current versions are only dev versions. Yesterday, I've changed some little things about the allPartners features without enough tests, and that broke some things inside the module. Thank you for these alert. I will correct that as soon as possible. It won't be hard to solve because some previous versions haven't got these bugs (but have others).
The topic has been locked.

Re: Custom Tree view module dev version release rev 8 10 years 2 months ago #16

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14506
Hi Daniel,

It is a long time since you first asked me to look at this, but the 1.1.0 release has been keeping me busy.

First problem. fisharebest.webtrees.net/individual.php?pid=I8

This person has several children, but they are not shown. However, you can navigate to them (I2 and I509), and view their trees (which includes their mother, I8)

Secondly, if you try to view the tree of I9 (mother of I8), you get a fatal error.

Fatal error: Nesting level too deep - recursive dependency? in /webtrees/home/fisharebest/public_html/modules_v2/treeview/class_treeview.php on line 292

FYI, the parents of I9 are first cousins (and the grandparents of I9 are also first cousins). You can see this on the tree for I8.

Greg
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The topic has been locked.

Re: Custom Tree view module dev version release rev 8 10 years 2 months ago #17

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14506
Another (very minor) issue. When you zoom in/out, everything scales except the male/female icons.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The topic has been locked.

Re: Custom Tree view module dev version release rev 8 10 years 2 months ago #18

  • WGroleau
  • WGroleau's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 1658

Another (very minor) issue. When you zoom in/out, everything scales except the male/female icons.

I thought that at one time an issue similar to this was addressed by replacing those icons with the actual UniCode characters.

I am looking forward to finding time to look at this new tree. I'm nervous about being too quick to toss the old one. One person wrote to me and specifically said he thought it was a wonderful feature.
--
Wes Groleau
UniGen.us/
The topic has been locked.

Re: Custom Tree view module dev version release rev 8 10 years 2 months ago #19

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14506
I did try using the unicode characters once - but they looked awful, so went back to the icons.

<<I'm nervous about being too quick to toss the old one>>

Once you've tried the new one, you'll want to toss the old one, and probably the hourglass chart too.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The topic has been locked.

Re: Custom Tree view module dev version release rev 8 10 years 2 months ago #20

Fatal error: Nesting level too deep - recursive dependency?


This was a problem with the old tree too, try this Google search:
webtrees/library/wt/treenav Nesting level too deep

This blog post:
www.richardlord.net/blog/php-nesting-lev...recursive-dependency
suggests that using === to compare objects instead of == will solve it.
Larry
webtrees 2.0.2
Hosted by fisharebest - hosting.webtrees.net
The topic has been locked.
Powered by Kunena Forum