Announcement

#1 2013-08-04 12:11:45

Gardenflow
Member
2013-08-04
5

[resolved] Change information of hovering tooltip

If been trying your software a bit and wondered whether it could be possible to change the information, which is displayed in the hovering tooltips over a thumbnail? I don't know anything about PHP codeing but I found this thread mentioning this code to hide the tooltips

Code:

<?php
/*
Plugin Name: Personal Plugin
Version: 1.0
Description: Personal Plugin
Plugin URI: http://piwigo.org
Author:
Author URI:
*/

add_event_handler('loc_end_index_thumbnails', 'change_thumbnail_title');
function change_thumbnail_title($tpl_thumbnails_var)
{
  foreach (array_keys($tpl_thumbnails_var) as $id)
  {
    $tpl_thumbnails_var[$id]['TN_TITLE'] = null;
  }

  return $tpl_thumbnails_var;
}
?>

With my little ability for logical thinking I guess that

Code:

$tpl_thumbnails_var[$id]['TN_TITLE'] = null;

means something like NO information is fetched. Could it be possible to call a language variable instead, and how would the code have to be changed.

Thx
Gardenflow

Offline

 

#2 2013-08-04 12:13:05

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: [resolved] Change information of hovering tooltip

would easier if you tell us exactly what you what as tooltip

Offline

 

#3 2013-08-04 12:22:05

Gardenflow
Member
2013-08-04
5

Re: [resolved] Change information of hovering tooltip

I would like to display the text 'click for further info', but dependent of the chosen language. If a language variable is written in the language part of the local files editor, it would be displayed accordingly, right?

Offline

 

#4 2013-08-04 12:34:19

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: [resolved] Change information of hovering tooltip

right :)

so use this

Code:

<?php
/*
Plugin Name: Personal Plugin
Version: 1.0
*/

add_event_handler('loc_end_index_thumbnails', 'change_thumbnail_title');
function change_thumbnail_title($tpl_thumbnails_var)
{
  foreach (array_keys($tpl_thumbnails_var) as $id)
  {
    $tpl_thumbnails_var[$id]['TN_TITLE'] = l10n('Click for further info');
  }

  return $tpl_thumbnails_var;
}
?>

('l10n' means 'localization')

Offline

 

#5 2013-08-04 12:48:29

Gardenflow
Member
2013-08-04
5

Re: [resolved] Change information of hovering tooltip

OK and many thanks for your quick info.

Offline

 

#6 2016-04-29 09:35:57

John.B
Member
2016-03-27
46

Re: [resolved] Change information of hovering tooltip

Hi,

many thanks for this idea.

Code:

$tpl_thumbnails_var[$id]['TN_TITLE'] = l10n('Click for further info');

or

Code:

$tpl_thumbnails_var[$id]['TN_TITLE'] = null;

But is it possible to show the remark / description of an image (photo)?

Thank you already for a response.

John

Offline

 

#7 2016-04-29 10:58:44

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7238

Re: [resolved] Change information of hovering tooltip


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#8 2016-04-29 15:41:56

John.B
Member
2016-03-27
46

Re: [resolved] Change information of hovering tooltip

ddtddt wrote:

Hi :-)

Have you see "[extension by sarybe] Thumbnail Tooltip"

Yes indeed, I saw the extension. But I have an error with  "[extension by sarybe] Thumbnail Tooltip":

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Thumbnail_Tooltip_IMG has a deprecated constructor in /mypage/bilder/plugins/ThumbnailTooltip/include/class.inc.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /mypage/plugins/ThumbnailTooltip/include/class.inc.php:3) in /mypage/bilder/include/page_header.php on line 101

flop25 says:

That just your server badly cconfigured in development mode and not in production mode, displaying coding advices.

But I do not know what's to do.

Any help or other  ideas?


Addendum: for a solution see: http://piwigo.org/forum/viewtopic.php?id=26585

Last edited by John.B (2016-05-14 09:21:38)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact