Author Topic: [TUT] Tooltip for Thumbnails  (Read 160964 times)

0 Members and 1 Guest are viewing this topic.


Offline Tino23

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • LMJ - Motorsport
Re: [TUT] Tooltip for Thumbnails
« Reply #46 on: August 20, 2010, 10:18:38 PM »
« Last Edit: August 27, 2010, 08:18:46 AM by Tino23 »

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [TUT] Tooltip for Thumbnails
« Reply #47 on: September 09, 2010, 04:48:14 AM »
Seemingly random problems with Tooltip for Thubnails:

using v1.7.7
php: 5.2.13
mysql: 5.1.47

Issue: some of the uploaded photos do not display to full size on mouseover.  Case in point - two members uploaded a single image each. One expands to full size on mouseover and the other does not.

Is there a setting or db field to check for this?

Any ideas?

Thanks,

Brian

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: [TUT] Tooltip for Thumbnails
« Reply #48 on: September 09, 2010, 06:50:17 AM »
I think the problem is in image name or category name when it has an apostrophe (single quote: ' ).
if that is the case, then replace
Code: [Select]
onmouseover="Tip('{image_name}<br />{lang_category} {cat_name}<br />{lang_comments} {image_comments}')" onmouseout="UnTip()"
with:
Code: [Select]
onmouseover="Tip('<?=addslashes("{image_name}<br />{lang_category} {cat_name}<br />{lang_comments} {image_comments}")?>')" onmouseout="UnTip()"
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [TUT] Tooltip for Thumbnails
« Reply #49 on: September 09, 2010, 07:40:19 AM »
Hi -

Thanks the suggestion. Attached is the thumbnail file - I think you have nailed it although when I tried to implement your fix, the mouseover enlargement worked but no large image appeared.

The problem, I think, based on your analysis, is that I have include the description in the tooltip thumbnail_bit.html file and some of the descriptions have a single apostrophe in the informal descriptions, such as "I'm wearing a t-shirt ..."  When I went back and deleted the apostrophes, the image did not enlarge on mouseover.  Not sure if this is due to the 'big' file not updating when the image is edited. (since it is the original image that enlarges on mouseover)

What do you think?

Thanks for taking the time to look at this.

Brian




Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [TUT] Tooltip for Thumbnails
« Reply #50 on: September 09, 2010, 02:34:08 PM »
Try implement my fix
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [TUT] Tooltip for Thumbnails
« Reply #51 on: September 09, 2010, 05:11:11 PM »
Hi -

Thanks for your help on this.

I implemented your fix exactly as your specified.  ALL of the images showed the smaller pop up of the image name, image category, and comment count. Even the images that were a problem. (see attached file thumbnail_bit.html

Then I added the description language to the code you provided so that I could get the image description displayed as well. When I did that, all of the images worked except one. This worked with several images whose description have apostrophes in their text.  (see attached file thumbnail_bit_wdesc.html)

Then I added the image_tip functionality since that is what makes this MOD so spectacular, the full size pop up of the image as you mouseover the thumbnail.  When I did that, the screen pop up goes to full size but the image does not appear. This applied to all of the images except the same one as previous modification. (see attached file thumbnail_bit_wdesc_wimagetip.html)

Not sure why the image_tip functionality gets broken with the extra coding your provide.

Thanks again for looking at this.

Brian

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [TUT] Tooltip for Thumbnails
« Reply #52 on: September 10, 2010, 01:30:08 AM »
I think the problem is that descriptions have newlines, but javascript doesn't allow multi-line strings. Try this:

Code: [Select]
<table width="1%" border="0" cellspacing="0" cellpadding="0" onmouseover="Tip('<?=str_replace(array("\n", "\r"), "", addslashes("{image_tip}<br />{lang_imagename} {image_name}<br />{lang_category} {cat_name}<br />{lang_description} {image_description}<br />{lang_comments} {image_comments}"))?>')" onmouseout="UnTip()">
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [TUT] Tooltip for Thumbnails
« Reply #53 on: September 10, 2010, 02:42:31 AM »
Hi -

Thanks for continuing to follow this.  I replaced the code you provided. That seemed to fix the mouseover functionality for all the images, even the problem ones but the image_tip functionality is still an issue.  What happens is the image box expands to full size but the image does not appear. Instead, a very small broken image icon appears in the blow up on mouseover.

I will send you a PM with an access code so you can log on and have a look at the category and image that was a problem but if you go to the home page of the gallery and mouseover any of the images, you'll see the same thing as well.

Thanks so much for your time.

Brian

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [TUT] Tooltip for Thumbnails
« Reply #54 on: September 10, 2010, 03:01:19 AM »
Try use instead of {image_tip} this: {image}

If this not what you want, then you'll need remove backslashes ( \ ) in this line of includes/functions.php
"image_tip" => "<img src=\'".MEDIA_PATH."/".$image_row['cat_id']."/".$image_row['image_media_file']."\' width=\'".$width."\' height=\'".$height."\'>",
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline surferboy

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: [TUT] Tooltip for Thumbnails
« Reply #55 on: September 10, 2010, 03:41:27 AM »
Hi -

Thanks so much for that.  I tried shortening the image_tip to image but it caused the layout to go haywire with huge long columns and visible code.

However, following your instructions on removing the backslashes on image_tip line of code in the includes/functions.php file did the trick. Now all of the images appear in full size on mouseover, and with your help, the apostrophe problem won't plague the image gallery as our members upload and write descriptions.

Thank you so much for your help.

Brian

Offline Tino23

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • LMJ - Motorsport
Re: [TUT] Tooltip for Thumbnails
« Reply #56 on: September 19, 2010, 08:58:22 PM »
Was muß ich denn ändern, damit mir die Tooltipps auch bei dem MOD Mini-Top http://www.4homepages.de/forum/index.php?topic=5874.0 angezeigt werden bzw. der Text auch im Tooltip erscheint?

Nachtrag vom 29.09.2010:
OK, ich hab mein Anliegen noch mal mit einem Bild besser dargestellt. Wie man sehen kann Funktioniert der Mod hier bei den Vorschaubildern für neue Bilder ohne Probleme. Bei dem MOD Mini Top hingegen fehlt wieder die Textanzeige und das Baloon PlugIn scheint auch ignoriert zu werden

« Last Edit: October 20, 2010, 06:45:30 PM by Tino23 »

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.808
  • I ♥ 4I
    • View Profile
Re: [TUT] Tooltip for Thumbnails
« Reply #57 on: October 19, 2010, 10:27:39 PM »
Die Seite von Herrn Walter Zorn geht nimmer..,

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [TUT] Tooltip for Thumbnails
« Reply #58 on: October 20, 2010, 07:25:49 AM »
Hi,

ich benutze den mod similar images, damit zeige ich auf der details.html
similar images an ;).

In den Popups zu den similar images auf der detailseite funktionieren alle
variablen außer:

Code: [Select]
  "lang_category" => $lang['category'],
Weiß jemand woran das liegt?
Sonst klappt das überall


Gruß Jens

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline Tino23

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • LMJ - Motorsport
Re: [TUT] Tooltip for Thumbnails
« Reply #59 on: October 20, 2010, 06:48:37 PM »
@Benny Links gibts doch noch in den Beiträgen über mir ;-) http://www.4homepages.de/forum/index.php?topic=22030.msg148268#msg148268