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

TOPIC:

Tree view module dev version release rev 9 10 years 2 months ago #21

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
I'm deeply sorry with the buggy yesterday's version. Shame on me ! ;-) I didn't expected to make a new release so early, but the bugs reported were too criticals. So here is rev 9 : TreeView dev version release rev 9

Bugs reported by HRN were fixed. Thanks ! (these bugs were mostly due to remaining parts from the old tree misused in my code. I've had to rewrite these parts)

@ Greg : I hope these new release fix the bugs you reported too. Let's try ! That's cool to have it online : it helps greatly to see where bugs occurs for you.

- about the "Nesting level too deep" : that should NOT happen and probably reveal a bug (unfinite recusion). I hope this bug is fixed by my new release too, but I can't be sure before test. It could also be what reported ljm, but thre's only one object comparison in rev 9. So if it was that, it will be very easy to fix.

- about the zomming of sex symbols : using unicode symbols were a great idea, in fact. We just need to tune the font used to get something at least similar (and probably prettier !) to fixed images, but scalable. Another asset of these idea is a faster drawing and dragging, which count as much as a tree is big.

I'm happy to see that my new TreeView give satisfaction. But I must say that is a very tricky code (that's certainly why nobody had done it before !), and it should be tested widely. May some bugs occurs in "exotic" situations, rareful to reach. Your help is a great asset to test a maximum of cases on as much trees as possible.
Last edit: by geomaticien.
The topic has been locked.

Re: Tree view module dev version release rev 9 10 years 2 months ago #22

@geomaticien

You're working fast. Looks like most bugs reported yesterday are fixed.
The Sow/hide multiple partners tho, does still not work for me. All partners are shown.
Also tried testing in IE 8.0, but here only names were loaded, and the tree froze...


@webtrees dev team

What's your opinion on the interactive tree in general. Will it continue to be a part of the core, or become an Add-on?
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 #23

  • ToyGuy
  • ToyGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
  • Posts: 4925
Daniel
I've put the latest version online to test, and while it is a great piece of coding, and a lot better than the old version, I must say there are things that simply don't seem correct - at least on a big tree.

Why does the frame move all about? I don't want to go hunting for the view - I want to pan within it. In doing so, I lose the controls. Not sure I like the frame either, but perhaps that's either something to get used to, modify or eliminate. View 2 comes closest, but I don't like the colors or the background. And, can the font be changed on the Tree Title?

See this for yourself at: www.myarnolds.com/individual.php?pid=I183&ged=Arnold.ged
Screencap >
Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28
Attachments:
The topic has been locked.

Re: Tree view module dev version release rev 9 10 years 2 months ago #24

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14506
Images have disappeared. I'm seeing '.M1234.' - pehaps a quoting issue?

I saw this intermittently with rev8, but it is happening all the time with rev9
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
Attachments:
The topic has been locked.

Re: Tree view module dev version release rev 9 10 years 2 months ago #25

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14506
For the recursion problem, I have seen the following code in class_treeview.php.
foreach ($sfams as $famid=>$family) {
        $p = $family->getSpouse($person);
        if (!empty($p)) {
          if (($p == $partner) || $this->allPartners) {

Instead of $p==$partner, you need $p->equals($partner)
This contruct works for all gedcom objects, families, sources, media, etc.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
Last edit: by fisharebest. Reason: correct syntax
The topic has been locked.

Re: Tree view module dev version release rev 9 10 years 2 months ago #26

When it comes to layout, I totally agree with ToyGuy. I do not like the frame/background images.
No frame and white background, at least as default, are my preferences
webtrees 2.0.16 at visitusinmaputo.com/webtree PHP 7.4.16
webtrees 2.0 dev on local WampServer PHP 7.4.9
Last edit: by HRN.
The topic has been locked.

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

  • daj
  • daj's Avatar
  • Visitor
  • Visitor
let's no worry about styling -- this can be fixed in no time at all.

I say we let 'geomaticien' focus on solving the bugs on this great alternative
The topic has been locked.

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

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14506
Next problem - see screendump

The tooltip which shows the "child of X and Y" needs to apply strip_tags() to the X and Y.

For individuals with "prefered names", the function $person->getFullName() will contain HTML markup. For example

1 NAME Susan Eleanor* /Chinn/

will generate

Susan <span class="starredname">Eleanor</span> Chinn
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
Attachments:
The topic has been locked.

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

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14506
Do we need this tooltip? Isn't it obvious from the tree?
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 10 years 2 months ago #30

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
Thanks again to everybody for your kind reviews and bug reports. Here is what I can answer :

@ HRN :
- "The Sow/hide multiple partners does still not work for me. All partners are shown." : do you accept cookies ? Tree preferences are stored as cookies. On all tests I've done, that works for me. Can you find/show a test case ?
- IE8 : that is mentionned in the embedded README file that IE compliance was not done at current early development stage. I know how to do and will add IE compliance only when everything will be OK in all other (W3C compliant) browsers. For example, the toolbox cannot work on IE, for now, because IE cannot deal properly with :hover properties.
- "No frame and white background, at least as default, are my preferences " : I will add a tree "no style" with no frame and white background as a possible choice in the style list to fir your preferences, BUT I DO NOT think that it should be the default, because the TreeView is not only a chart for screen, but also and for certain persons at first a report builder that need a bit of learning to be used at 100%. The tree frame border certainly helps to realize how work this feature.

@ Stephen :
- "Why does the frame move all about ?" : you must consider the viewport as a frame that allways show only a part of a big tree. The frame exists to show the borders of the tree itself, which are allways much bigger than the screen viewport, and also to be printed in a "what-you-see-is-what-you-get" mode. If you don't like any element of the interface, you can style it by yourself in your theme, eliminate the frame for you, fix the height or keep an auto-expanding height, etc.
- I've saw on your site a quoting isue also reported by fisharebest, which is on titles for person's names. As a first fix, I suggest to change the line 386 of rev 9 so :
$title = $title ? ' title="'.htmlentities(strip_tags(tvI18N::translate('Child of %s', $title))).'"' : '';

@ fisharebest : I've immediateloy changed these test according to your advice.
- "Do we need this tooltip? Isn't it obvious from the tree? " : these tooltips are really useful in the multiple partners mode to immediately identify the parents of one person. They are not displayed in the single partners mode because they are not useful in this case.
- about the prefered name that includes html, that is with no doubt a damned heritage ... A clean code for getFullName() should NOT return such things by default ! But it exist. So we could apply an extra test in the TreeView->drawPersonName() method as a workaround, overload the getFullName method in wal.php, or imagine something else to fix it. What are yours suggestions about that ?

@ daj said :

let's no worry about styling -- this can be fixed in no time at all.
I say we let 'geomaticien' focus on solving the bugs on this great alternative

That's the voice of reason. great thanks ! Styling "issues" are not "issues", but choices (and theme's maintainers code) not done at this stage about how the new TreeView will appear in each WT theme. The default style should expose all potentialities even if after some are not used in one theme, and, I say, even if it's ugly enough to somebody's eyes to push him to style it at his convenience ! ;-)

@ all testers : you should add to the existing code the 2 coding improvements mentionned here : its bug fixes. They will be included in my next release, BUT it should not happen today or tomorrow, this time, because I have an heavy duty for my job (a geomatic application focused on modern art events, centered around a dynamic map).
Last edit: by geomaticien. Reason: "les goûts et les couleurs" ( ~ tastes and colors)
The topic has been locked.

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

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14506
<<these tooltips are really useful in the multiple partners mode>>

Explain the "multiple partners mode". I have tried clicking the button, but don't see any difference. What difference should I see?

<<about the prefered name that includes html, that is with no doubt a damned heritage>>

There is a convention in genealogy to underline the prefered name, so we have to use HTML for this.

In the future, I might like to add <span class="SURN"></span> around the surname. This will allow a theme designer to show surnames using small-capitals or all-capitals.
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 10 years 2 months ago #32

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
- the "multiple partners mode" : now, by default, TreeView show all life partners (~all spouses, or "tous les conjoints", in french). When this mode is disabled, only the last life partner is shown in the tree (except in details boxes). The all/last partners mode is "propagated" to children and parents in coherence to itself for dynamically loaded boxes. If you suspect this mode not to work for you, you can try to change the number of generations pre-loaded in module.php (in TreeView->drawVieport() method, second & numerical parameter). If you see a difference, it will reveal that something's going wrong for you.

- about the prefered name, the problem is not at all about underlining convention : the problem is about a bad implementation that mix text and html in the getFullName() method result. That's a bad way to code it. It would be far better to code this convention with an extra parameter like getFullNameDecoration() or getFullNameWithHtmlDecoration() to add the requested class when needed. If nothing is scheduled about that in the webtrees core, I can suggest to overload the getFullName method in wal.php to deal with that more cleanly. More generally, the returns of some mehods and the html drawing should be cleanly separated. If somebody wants to retrieve the fullname, underlined, in a pdf or something else, html in the getFullName() method is "heretic" ! ;-) And a <u class="SURN">...</u> seems better than a <span class="SURN">...</span>.
So, what sould we dot ? Does WT team schedule something about an improvement of such methods that improperly mix html and pure text in their results ?
Last edit: by geomaticien.
The topic has been locked.

Custom Tree view module : new release 10 years 2 months ago #33

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
Here is the 10th release of TreeView module : bugs.launchpad.net/webtrees/+bug/713459/...s/treeview10.tar.bz2

What's new ?
- some bug fixes;
- dynamic loading of full resolution medias before printing;
- birth and death date shown on small boxes, plus a switch show/hide;
- styles submenu is now working both in horizontal and vertical presentation;
- new black background style;
- etcetera (see embedded README file).

With these TreeView module, you can draw AND PRINT thousands of different trees, depending on you open/close details, show/hide dates, use wide/compact mode, and choose a style over the theme's default style or not.
The topic has been locked.

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

  • ToyGuy
  • ToyGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
  • Posts: 4925
dF
On my mac, using Safari 5, no results from tool bar except transparent. Can't zoom in, out or reset. No open/Close detail boxes. No compact tree. nothing
Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28
The topic has been locked.

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

Using FF 3.6.13, I do not have the problems reported by ToyGuy, but opening any box results in error:

Fatal error: Call to undefined function abbreviate_fact() in /hsphere/local/home/mysi/mysite.com/webbtree/modules_v2/treeview/class_treeview.php on line 214
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 #36

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14506
@daniel This global function has moved to a static member function in WT_Gedcom_Tag
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 10 years 2 months ago #37

  • ToyGuy
  • ToyGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
  • Posts: 4925
@dF
False alarm- Safari results were in cache, pardonnez-moi, s'il vous plaît...Etienne
Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28
The topic has been locked.

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

  • geomaticien
  • geomaticien's Avatar
  • Visitor
  • Visitor
The module should be updated according to webtrees version used with the new function name, as said here by fisharebest for the latests SVN.
Here is how to proceed :

1) In wal.php, add this definition at the line 69 (enf of file) :
class tvGedcomTag extends WT_Gedcom_Tag {}

2) In class_treeview.php, change the getPersonDetails() function in this way :
  private function getPersonDetails(&$personGroup, &$person, $family) {
    $r = '<div class="tv'.$person->getSex().' tv_person_expanded">';
    $r .= $this->getThumbnail($personGroup, $person);
    $r .= '<a class="tv_link" href="'.$person->getHtmlUrl().'" title="'.tvI18N::translate('Display').' '.$person->getFullName().'">'.PrintReady($person->getFullName()).'</a> <a href="module.php?mod=treeview&mod_action=treeview&allPartners='.($this->allPartners ? 'true' : 'false').'&rootId='.$person->getXref().'" title="'.tvI18N::translate('Display tree for').' '.$person->getFullName().'"><img src="'.TV_TREE.'" class="tv_link tv_treelink" /></a>';
    $r .= '<br /><b>'.tvGedcomTag::getAbbreviation('BIRT').'</b> '.$person->getBirthDate()->Display().' '.PrintReady($person->getBirthPlace());
    if (!empty($family)) {
      $nbChildren = $family->getNumberOfChildren();
      $nbChildren = ($nbChildren > 0 ? ' ('.$nbChildren.' '.tvI18N::translate('children').')' : '');
      $r .= '<br /><b>'.tvGedcomTag::getAbbreviation('MARR').'</b> '.$family->getMarriageDate()->Display().' <a href="'.$family->getHtmlUrl().'"><img src="'.TV_BUTTON_FAMILY.'" class="tv_link tv_treelink" title="'.tvI18N::translate('Display Family').$nbChildren.'" /></a>'.$family->getMarriagePlace();
    }
    if ($person->isDead())
      $r .= '<br /><b>'.tvGedcomTag::getAbbreviation('DEAT').'</b> '.$person->getDeathDate()->Display().' '.PrintReady($person->getDeathPlace());
    $r.= '</div>';
    return $r;
  }
That was just tested, succesfully, on webtrees rev 11076.

By the way, there's still an error in translations for these abbreviations : the french word for "birth" is "naissance", and therefore the translated abbreviation should be "n" and not "b". Is it a tongue-dependant issue or a global bug on abbreviation's translations ?
Last edit: by geomaticien.
The topic has been locked.

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

Thank you, this solved the problem.
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 1 month ago #40

  • r.rabbit
  • r.rabbit's Avatar
  • Visitor
  • Visitor
Im sorry but i really dont understand how to make this work.
I uploaded in /modules_v2/treeview but it doesnt appear in my admninistration panel. Can anyone please help?
Thanks
The topic has been locked.
Powered by Kunena Forum