This Help forum is for issues relates to the latest release (1.4.6). For issues related to beta or git version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here.

TOPIC: Colorbox and big pictures

Colorbox and big pictures 4 years 11 months ago #1

  • Gustine
  • Gustine's Avatar
  • Offline
  • Junior
  • Posts: 122
Hello,

Since webtrees 1.4 came with colorbox, I got a small issue with pictures bigger than the screen, because zooming don't resize the viewer's window.
I found on this forum a tip that consists in changing webtrees-1.4.x.js (function activate_colorbox) :
- erase maxWidth and maxHeight
- set fixed to false.

It worked fine with 1.4.1


but don't in 1.4.3. I wonder why.
webtrees 1.7.9 (+ module sosa17 + vytux_menu + ancestral fan chart) - Mageia 5.1 (php 5.6.36)
Last Edit: 4 years 11 months ago by Gustine.
The administrator has disabled public write access.

Colorbox and big pictures 4 years 11 months ago #2

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum
  • Posts: 4896
It is better to put this sort of customisation in your theme (header.php) rather than hack the core code. There are already colorbox calls there so you can simply add these.
Nigel

www.our-families.info

Hosted at:
Follow me at:
The administrator has disabled public write access.

Colorbox and big pictures 4 years 11 months ago #3

  • Gustine
  • Gustine's Avatar
  • Offline
  • Junior
  • Posts: 122
kiwi wrote:
It is better to put this sort of customisation in your theme (header.php) rather than hack the core code. There are already colorbox calls there so you can simply add these.

Yes but this will apply only for a single theme... when it will work ;-)
webtrees 1.7.9 (+ module sosa17 + vytux_menu + ancestral fan chart) - Mageia 5.1 (php 5.6.36)
The administrator has disabled public write access.

Colorbox and big pictures 4 years 11 months ago #4

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum
  • Posts: 4896
Certainly. But if you are going to start customising your site a single theme is the best idea.
Nigel

www.our-families.info

Hosted at:
Follow me at:
The administrator has disabled public write access.

Colorbox and big pictures 4 years 11 months ago #5

  • Gustine
  • Gustine's Avatar
  • Offline
  • Junior
  • Posts: 122
kiwi wrote:
Certainly. But if you are going to start customising your site a single theme is the best idea.
It's not a problem of customising. If the size of the picture displayed on the screen is too small, you cannot read easily the text on it. Because the viewer window don't grow when zooming, is like looking through a keyhole.
The alternative would be to replace the jpg file with a multi-page pdf. Sad.
webtrees 1.7.9 (+ module sosa17 + vytux_menu + ancestral fan chart) - Mageia 5.1 (php 5.6.36)
The administrator has disabled public write access.

Colorbox and big pictures 4 years 11 months ago #6

  • eyolf
  • eyolf's Avatar
  • Offline
  • Junior
  • Posts: 209
If you have jpegs that are so small that they end up in a keyhole-sized viewer window, their resolution is probably too small. And definitely if you have images that you need to read something important from. In that case, a much better alternative is to increase the resolution of the images. It's not ideal, of course, but it can actually yield some substantial improvement.
webtrees 1.6.0 • php 5.4.16 • mysql 5.5.31
http://oestrem.com/webtrees
The administrator has disabled public write access.

Colorbox and big pictures 4 years 11 months ago #7

  • Gustine
  • Gustine's Avatar
  • Offline
  • Junior
  • Posts: 122
eyolf wrote:
their resolution is probably too small

The resolution is OK : look at the first screenshot (real size is double). My picture is 800x2220px.
The problem is the size of the viewer : 715x550px as shown on the second screenshot. So the « keyhole » in it is only 170px wide.
webtrees 1.7.9 (+ module sosa17 + vytux_menu + ancestral fan chart) - Mageia 5.1 (php 5.6.36)
Last Edit: 4 years 11 months ago by Gustine.
The administrator has disabled public write access.

Colorbox and big pictures 4 years 11 months ago #8

  • Gustine
  • Gustine's Avatar
  • Offline
  • Junior
  • Posts: 122
The patch works when erasing ->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings... in header.php.
webtrees 1.7.9 (+ module sosa17 + vytux_menu + ancestral fan chart) - Mageia 5.1 (php 5.6.36)
Last Edit: 4 years 11 months ago by Gustine.
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: 
Moderators: makitso
Powered by Kunena Forum