4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 25, 2018, 01:03:05 PM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support)
| | |-+  Tutorials (Moderators: mawenzi, Rembrandt)
| | | |-+  [TUT] Tooltip for Thumbnails
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: «« « 1 [2] 3 4 5 6 » »» Print
Current Topic Rating: ****
Author Topic: [TUT] Tooltip for Thumbnails  (Read 110023 times)
Omsky
Newbie
*
Offline Offline

Posts: 42

Thank You
-Given: 0
-Receive: 1


View Profile
« Reply #15 on: July 30, 2008, 06:22:10 PM »

ok, thank you, I do not know what add   Smile

6 languages on my new gallery, look this mod on http://sexy-girls-photo.com

look please my files:
categories.php
page_header.php
thumbnail_bit.html


show example for one language plz
Logged
ivan
4images Moderator
4images Guru
*****
Offline Offline

Posts: 2279

Thank You
-Given: 4
-Receive: 30


View Profile WWW
« Reply #16 on: July 30, 2008, 06:30:07 PM »

go to page_header.php

search
1
2
$site_template->register_vars(array(
  "lang_site_stats" => $lang['site_stats'],

and below (example)
1
2
3
4
"lang_category" => $lang['category'],
"lang_downloads" => $lang['downloads'],
"lang_rating" => $lang['rating'],
"lang_votes" => $lang['votes'],

the can use the {lang_category}
the "lang" tags is in page_header available in every view Exclamation
Logged

greetings / grüsse
ivan

Facebook Fan Page | Follow Twitter

Blog: Reisen Blog
Bilder Gallery: Bilder Gallery
mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 121


View Profile
« Reply #17 on: July 30, 2008, 06:34:06 PM »

... thanks ivan ... Wink
Logged

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...
Omsky
Newbie
*
Offline Offline

Posts: 42

Thank You
-Given: 0
-Receive: 1


View Profile
« Reply #18 on: July 30, 2008, 06:55:58 PM »

word "Downloads:" showed earlier, on all languages - on index page.

lines
1
"lang_downloads" => $lang['downloads'],
does not in page_header.php


my changed code in page_header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$site_template->register_vars(array(
  "lang_site_stats" => $lang['site_stats'],
  "lang_category" => $lang['category'],
  "lang_downloads" => $lang['downloads'], <---- it is added
   "lang_rating" => $lang['rating'],              <---- it is added
   "lang_votes" => $lang['votes'],               <---- it is added
  "lang_registered_user" => $lang['registered_user'],
  "lang_random_image" => $lang['random_image'],
  "lang_categories" => $lang['categories'],
  "lang_sub_categories" => $lang['sub_categories'],
  "lang_new_images" => $lang['new_images'],
  "lang_top_images" => $lang['top_images'],
  "lang_search" => $lang['search'],
  "lang_advanced_search" => $lang['advanced_search'],
  "lang_lightbox" => $lang['lightbox'],
  "lang_register" => $lang['register'],
  "lang_control_panel" => $lang['control_panel'],
  "lang_login" => $lang['login'],
  "lang_auto_login" => $lang['lang_auto_login'],
  "lang_logout" => $lang['logout'],
  "lang_lost_password" => $lang['lost_password'],
  "lang_user_name" => $lang['user_name'],
  "lang_password" => $lang['password'],
  "lang_go" => $lang['go'],
  "lang_images_per_page" => $lang['images_per_page'],
  "charset" => $lang['charset'],
  "direction" => $lang['direction']
));



not work
Logged
Omsky
Newbie
*
Offline Offline

Posts: 42

Thank You
-Given: 0
-Receive: 1


View Profile
« Reply #19 on: July 30, 2008, 07:35:20 PM »

ohh... i sleep  Embarassed

i change...
new code
in thumbnail_bit.html

1
<table width="1%" border="0" cellspacing="0" cellpadding="0" onmouseover="Tip('{image_name}<br><b>{lang_category}</b> {cat_name}<br> <b>{lang_file_size}</b> {image_file_size}<br> <b>{lang_hits}</b> {image_hits}<br><b>{lang_downloads}</b> {image_downloads}<br><b>{lang_votes}</b> {image_votes} <br> <b>{lang_rating}</b> {image_rating} <br> <b>{lang_comments}</b> {image_comments}')" onmouseout="UnTip()">

and add in page_header.php line
1
2
  "lang_file_size" => $lang['file_size'],
 "lang_hits" => $lang['hits'],

big thank you all
Logged
ivan
4images Moderator
4images Guru
*****
Offline Offline

Posts: 2279

Thank You
-Given: 4
-Receive: 30


View Profile WWW
« Reply #20 on: July 30, 2008, 07:36:55 PM »

its right Wink
Logged

greetings / grüsse
ivan

Facebook Fan Page | Follow Twitter

Blog: Reisen Blog
Bilder Gallery: Bilder Gallery
Omsky
Newbie
*
Offline Offline

Posts: 42

Thank You
-Given: 0
-Receive: 1


View Profile
« Reply #21 on: August 09, 2008, 07:36:33 PM »

small bugs http://www.4homepages.de/forum/index.php?topic=18761.msg122116#msg122116

if there is a ' symbol in the picture's file names then IE determines an error and [TUT] Tooltip for Thumbnails stops working fot those pages.

how to fix this from happenings with '?
Logged
mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 121


View Profile
« Reply #22 on: August 09, 2008, 07:55:00 PM »

@Omsky

... have a look at V@no's statement "Your site's name has an ' (apostrophe), its messes up the javascript" ...
... here : http://www.4homepages.de/forum/index.php?topic=22406.msg122263#msg122263 ...
... it is the same for ... picture's file names ...
Logged

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...
sigma.
Full Member
***
Offline Offline

Posts: 148

Thank You
-Given: 3
-Receive: 1

cydonian.com/potd


View Profile WWW
« Reply #23 on: August 16, 2008, 10:24:04 PM »

love this. thanks for sharing!
I have one bug though.

It looks like any type of special character other than text (',",url,html,! and even spaces) cause the tooltip to not display, and sometimes mess up the thumbnail alignment in 4images.

Anyone know how to enable special characters in the tooltip?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #24 on: August 17, 2008, 12:19:29 AM »

Its not "special characters" that messing up on your site, but the new lines image descriptions.
use this instead:
1
onmouseover="Tip('<?=str_replace("'", "\\'", str_replace("\r", "", str_replace("\n", "\\n", "<b>{image_name}</b><br />{lang_description} {image_description}<br />__________<br />{lang_comments} {image_comments}")));?>')"
Logged

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)
sigma.
Full Member
***
Offline Offline

Posts: 148

Thank You
-Given: 3
-Receive: 1

cydonian.com/potd


View Profile WWW
« Reply #25 on: August 17, 2008, 01:07:13 AM »

So should my thumbnail_bit.html look like this then?

1
2
3
4
5
6
7
8
9
<!-- you wish detail page in a small javascript open window, use {thumbnail_openwindow} -->
<table width="" border="0" cellspacing="0" cellpadding="" onmouseover="Tip('<?=str_replace("'", "\\'", str_replace("\r", "", str_replace("\n", "\\n", "<b>{image_name}</b><br />{lang_description} {image_description}<br />__________<br />{lang_comments} {image_comments}")));?>')" onmouseout="UnTip()">
  <tr>
    <td>{thumbnail}</td>
  </tr>
</table>
<font color="#FF0000">| </font> <b>{image_name}</b>
<br />
| <a href="{cat_url}">{cat_name}</a><br />

It works if I remove this:
1
onmouseout="UnTip()">

but then the tooltip doesnt go away. Where should I position the onmouseout call?
« Last Edit: August 17, 2008, 01:41:51 AM by sigma. » Logged
sigma.
Full Member
***
Offline Offline

Posts: 148

Thank You
-Given: 3
-Receive: 1

cydonian.com/potd


View Profile WWW
« Reply #26 on: August 17, 2008, 02:28:44 AM »

oh wait. i got it.

1
onmouseover="Tip('<?=str_replace("'", "\\'", str_replace("\r", "", str_replace("\n", "\\n", "<b>{image_name}</b><br />{lang_description} {image_description}<br />__________<br />{lang_comments} {image_comments}")));?>', BALLOON, true)"onmouseout="UnTip()">

thanks V.

now please.. what exactly did you do to get this to work? what does str_replace function do? string replace?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #27 on: August 17, 2008, 03:36:19 AM »

It creates javascript friendly string - escapes newlines and apostrophes
Logged

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)
sigma.
Full Member
***
Offline Offline

Posts: 148

Thank You
-Given: 3
-Receive: 1

cydonian.com/potd


View Profile WWW
« Reply #28 on: August 17, 2008, 04:13:45 AM »

good to know. thanks again!

is there any way to make a word in "quotes" javascript friendly? I tried """, but that had a nasty effect.
« Last Edit: August 17, 2008, 04:29:50 AM by sigma. » Logged
Boemmel
Newbie
*
Offline Offline

Posts: 14

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #29 on: October 28, 2008, 09:07:44 AM »

wie bekomme ich den Mod zum Laufen ? bei mir tut sich nichts.

muß ich irrgendwas aktivieren, ich bin ratlos.
 Wink

hat sich erledigt!
« Last Edit: October 28, 2008, 07:08:20 PM by Boemmel » Logged

Gruß
Chris
Pages: «« « 1 [2] 3 4 5 6 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.271 seconds with 21 queries.