[Request] Mouseover Tooltip for pictures in forumdisplay_thread
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #10
RE: [Request] Mouseover Tooltip for pictures in forumdisplay_thread
Find this code on yur template above:

HTML Code
<span>{$prefix} {$gotounread} <a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$cttd1}{$thread['subject']}{$cttd2}</a> {$thread['multipage']}</span>


Replace it with:

HTML Code
<span class="myspan">{$prefix} {$gotounread} <a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$cttd1}{$thread['subject']}{$cttd2}</a> {$thread['multipage']}{$GLOBALS['threadfields']['pref_pic2']}</span>


Maybe you need to remove the other {$GLOBALS['threadfields']['pref_pic2']} variable in that template.

Display Format for the pref_pic2 custom thread field:

HTML Code
<img src="{VALUE}" alt="" class="myimg" />


Then, add this class in your global.css or make it inline in your forumdisplay:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.myspan {
	position: relative;
}

.myimg {
	display: none;
}

.myspan:hover .myimg {
	background: #1c1c1c;
	display: block;
	position: absolute;
	top: 15px;
	left: 2px;
	padding: 5px;
	z-index: 99;
}


The result is similar to this (hover the title):
http://xtest.byethost7.com/forumdisplay.php?fid=7
(The images come from YouTube.)

I think that is the basic. Modify it as your needs.


09-19-2011 02:33 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: [Request] Mouseover Tooltip for pictures in forumdisplay_thread - RateU - 09-19-2011 02:33 AM

 Standard Tools
Forum Jump: