For issues related to the current stable release please use it's own Help forum.
IMPORTANT:Please read this before using an git or nightly build version: wiki.webtrees.net/en/GIT

Before asking for help please read "How to request help" by clicking on that tab above here.

TOPIC: [SOLVED] individual->getBoxStyle()

individual->getBoxStyle() 6 days 5 hours ago #1

  • vytux
  • vytux's Avatar
  • Offline
  • Senior
  • Posts: 455
individual->getBoxStyle() returns based on the individuals sex
  • person_box
  • person_boxF
  • person_boxNN

However these styles seem to be no longer in use and have been replaced with something else?
Vytautas

webtrees 1.7.9 (MODS: vytux_cousins, vytux_gallery3, vytux_pages, fancy_imagebar, fancy_treeview, Ancestral fan chart)
PHP 7.1.2, MySQL 5.7.17 x86_64 GPL, Nginx (mainline)
ged.vytux.com
Help translate Vytux Modules at translate.vytux.com/
The administrator has disabled public write access.

individual->getBoxStyle() 6 days 2 hours ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10825
The new classes are wt-chart-box and wt-chart-box-<sex>
See github.com/fisharebest/webtrees/blob/mas.../chart-box.phtml#L97

Classes that are intended for styling now begin with "wt-"

These are (mostly!) documented in the CSS files
See github.com/fisharebest/webtrees/tree/master/resources/css
These should remain stable.

Other classes are used to provide behaviour/functionality.
These may be removed or changed at any time.
Avoid using them in your themes.
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.

individual->getBoxStyle() 5 days 20 hours ago #3

  • vytux
  • vytux's Avatar
  • Offline
  • Senior
  • Posts: 455
I think you may have misunderstood what i meant :-)

I would have thought that this function should be returning the correct 'standard' style for a person / individual box? Individual.php
Vytautas

webtrees 1.7.9 (MODS: vytux_cousins, vytux_gallery3, vytux_pages, fancy_imagebar, fancy_treeview, Ancestral fan chart)
PHP 7.1.2, MySQL 5.7.17 x86_64 GPL, Nginx (mainline)
ged.vytux.com
Help translate Vytux Modules at translate.vytux.com/
The administrator has disabled public write access.

individual->getBoxStyle() 5 days 20 hours ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10825
This function is deprecated. Do not use it.

Individual boxes are created using:
view('chart-box', ['individual' => $individual])

The structure of the chart-box is documented here:
github.com/fisharebest/webtrees/blob/mas...btrees.css#L672-L689

If you want a box that looks like a chart-box, you just need this (with m/f/u for the sex).
<div class="wt-chart-box wt-chart-box-m">
text text text
</div>
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
Last Edit: 5 days 20 hours ago by fisharebest.
The administrator has disabled public write access.

[SOLVED] individual->getBoxStyle() 5 days 20 hours ago #5

  • vytux
  • vytux's Avatar
  • Offline
  • Senior
  • Posts: 455
Problem solved.
Vytautas

webtrees 1.7.9 (MODS: vytux_cousins, vytux_gallery3, vytux_pages, fancy_imagebar, fancy_treeview, Ancestral fan chart)
PHP 7.1.2, MySQL 5.7.17 x86_64 GPL, Nginx (mainline)
ged.vytux.com
Help translate Vytux Modules at translate.vytux.com/
The administrator has disabled public write access.
Powered by Kunena Forum