rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: AlonsO on December 29, 2006, 01:10:00 PM
-
i want when i put the mouse next to the folder to show the comment. now there's a image and when i put mouse there the comment of the folder is shown. I want to show the comment when i put the mouse on the folder. Any ideas?
-
You would have to use javascript onmouseover events, i have a similiar thing running on my Thunderchicken of Glory template, it could be modified to show folder comments i think... i think this is what u want...
-
Hey I've a java script klappe but when i paste after link of the folder the scipt with text %comment% it doesn't work :-[
-
Aaam sorry I've a java script on mouse over but that i said it doesn't works with %comment%
-
I have it working just fine! i will paste all my code i have used ok!
This is the head section where the javascript goes!
<head>
<title>**** YOUR TITLE ****: %folder%</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>%style%</style>
<script type="text/javascript">
var DH = 0;var an = 0;var al = 0;var ai = 0;if (document.getElementById) {ai = 1; DH = 1;}else {if (document.all) {al = 1; DH = 1;} else { browserVersion = parseInt(navigator.appVersion); if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {an = 1; DH = 1;}}} function fd(oi, wS) {if (ai) return wS ? document.getElementById(oi).style:document.getElementById(oi); if (al) return wS ? document.all[oi].style: document.all[oi]; if (an) return document.layers[oi];}
function pw() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;}
function mouseX(evt) {if (evt.pageX) return evt.pageX; else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); else return null;}
function mouseY(evt) {if (evt.pageY) return evt.pageY; else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return null;}
function popUp(evt,oi) {if (DH) {var wp = pw(); ds = fd(oi,1); dm = fd(oi,0); st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else {tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew/4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew/2; if (!an) {lv += 'px';tv += 'px';} ds.left = lv; ds.top = tv; ds.visibility = "visible";}}}
</script>
</head>
This is the required css!
.tip {
border:1px solid #036;
width:250px;
padding:2px;
position:absolute;
z-index:100;
visibility:hidden;
top:15px;
left:90px;
background-color:#CAD9EA;
line-height:13px;
}
This is the folder section!
[folder]
<tr>
<td class=rw style="border-left:0px;">%new%<a href="%item-url%"> <img align=top src="/~img_folder" alt="" onmouseout="popUp(event,'t1')" onmouseover="popUp(event,'t1')"><b> %item-name%</b></a>%comment%
<div id=t1 class=tip align=center>%comment%</div>
</td>
<td class=rw align=center><i>Folder</i></td>
<td class=rw align=center>%item-modified%</td>
<td class=rw align=center>%item-dl-count%</td>
</tr>
And this code shows this below!
[attachment deleted by admin]
-
Look at damn template it is:
[files]
<tr>
<th style="text-align:center"><span class="column">I</span>
<th><a href="%folder%?sort=n"><span class="column">FILENAME</span></a>
<th><a href="%folder%?sort=s"><span class="column">FILESIZE</span></a>
<th><a href="%folder%?sort=t"><span class="column">FILEDATE</span></a>
<th style="text-align:center"><span class="column">HITS</span>
</tr>
%list%
[file]
<tr class="mout" href="%item-url%">
<td width="16px">%comment%</td>
<td><a href="%item-url%"> %new% <img align="top" src="/~img_file" border="0" alt=""> <b>%item-name%</b></a></td>
<td>%item-size%</td>
<td>%item-modified%</td>
<td>%item-dl-count%</td>
</tr>
[folder]
<tr class="mout" href="%item-url%">
<td width="16px">%comment%</td>
<td><a href="%item-url%"> %new% <img align="top" src="/~img_folder" border="0" alt=""> <b>%item-name%</b></a></td>
<td colspan="3"><b><i>Directory</i></b></td>
</tr>
[link]
<tr class="mout" href="%item-url%">
<td width="16px">%comment%</td>
<td><a href="%item-url%"> %new% <img align="top" src="/~img_link" border="0" alt=""> <b>%item-name%</b></a></td>
<td colspan="3"><b><i>This is a link</i></b></td>
[comment]
<div id="com_ment" class=tip style='left: 515px; top: 298px;'>
<table width="100%"><tr><td><span class="tipline" id="bb"><i>= Comment =</i></span></td></tr>
<tr><td class="tip2"> %item-comment% </td></tr>
</table>
</div>
<img onmousemove="ts(event,this)" onmouseout="tc()" src="/~img10" alt="" border="0">
What to change when I put the mouse on the flder to display the comment. No the comment its displayed when i put the mouse on the image "i"
[attachment deleted by admin]
-
ok, whoever did this template created a new column and made the I for the information about the folder, how come your want to change this to show for the folder image?
-
I wanna to remove this column "I" and next to show the comment when i point any folder(with comment of course)
-
Oh ok, well in that case... hmmm can u post your template? i will see if i can get something going! and post back the results.... big party tomorrow so i will probably have it done by late Monday... i think this is too complex to explain on the forum... would be quicker to do myself than explain... then you can see the differences.... i have a lot of spare time on my hands atm, so i don't mind.
-
Oh ok, well in that case... hmmm can u post your template? i will see if i can get something going! and post back the results.... big party tomorrow so i will probably have it done by late Monday... i think this is too complex to explain on the forum... would be quicker to do myself than explain... then you can see the differences.... i have a lot of spare time on my hands atm, so i don't mind.
I archived and uploaded it. Here you are:
http://petrovi.cogia.net/dada.rar
And some things and texts are in Bulgarian language
-
I have had a go at this and i cant get it to work either, the javascript on this template is insane... i have identified where the problem lies but all my methods to make it work fail! it seems that when u move this %comment% and turn it into an invisible div over the folder (to replace the I image) it no longer reveals the comment div.... wtf lol
-
You can't fix it, can you?
-
Not without spending a couple of nights on it, its hard because i didn't write the code lol. but however the author got it working, will not work when u move it to a different section *sigh* unsure why exactly.... i tried implementing my code in place, BUT when u go over the the folder all the folders show the same comment lol... so instead i changed the img to a div with text, (so i could see it, later will be invisible) but when u move %comment% into that folder<td> it does not WORK! soo frustrating!
-
Not without spending a couple of nights on it, its hard because i didn't write the code lol. but however the author got it working, will not work when u move it to a different section *sigh* unsure why exactly.... i tried implementing my code in place, BUT when u go over the the folder all the folders show the same comment lol... so instead i changed the img to a div with text, (so i could see it, later will be invisible) but when u move %comment% into that folder<td> it does not WORK! soo frustrating!
Bad :'( :'( :'(