8
This isn't tested yet, so don't rely on that. I don't know if the new code will break the automatic resize of the window.
New content of template debaser_genre.html:
<div><a href="index.php"><{$smarty.const._MD_DEBASER_INDEX}>a> - <{$smarty.const._MD_DEBASER_GENRE}> <{$genrelist}>div><br />
<div style="text-align:left;"><{$category.navbar}>div>
<{section name=i loop=$filelist}>
<div style="width: 30%; margin: 1%; border: 3px inset #2f5376; float: left;"><div style="padding:3px;">
<div style="background-color: #2f5376; margin:-3px; padding:5px;">
<div style="text-align:left; color:#ffffff; vertical-align:top;"><strong><{if $filelist[i].artist != ''}><{$filelist[i].artist}>:<br /><{/if}><{$filelist[i].title|wordwrap:30:"n":true}>strong>div>
div>
<div align="right"><a href="singlefile.php?id=<{$filelist[i].id}>" title="<{$smarty.const._MD_DEBASER_READMORE}>" <{if $usetooltips == true}>onmouseover="ddrivetip('<{if $filelist[i].album > 0 || $filelist[i].album != ''}><{$smarty.const._MD_DEBASER_ALBUM}> <{$filelist[i].album}>
<{/if}><{if $filelist[i].year > 0}><{$smarty.const._MD_DEBASER_YEAR}> <{$filelist[i].year}>
<{/if}><{if $filelist[i].addinfo > 0}><{$smarty.const._MD_DEBASER_COMMENT}> <{$filelist[i].addinfo}>
<{/if}><{if $filelist[i].track > 0}><{$smarty.const._MD_DEBASER_TRACK}> <{$filelist[i].track}>
<{/if}><{$smarty.const._MD_DEBASER_LENGTH}> <{$filelist[i].length}>
<{$smarty.const._MD_DEBASER_BITRATE}> <{$filelist[i].bitrate}>
<{$smarty.const._MD_DEBASER_FREQUENCY}> <{$filelist[i].frequence}>','lightgrey', 200);" onmouseout="hideddrivetip()"<{/if}>><small><{$smarty.const._MD_DEBASER_READMORE}>small>a>div><br />
<div style="background-color: #2f5376; margin:-3px; padding:5px;">
<div align="left" style="float:left;">
<a href="<{$xoops_url}>/modules/debaser/player.php?id=<{$filelist[i].id}>" onclick="window.open(this.href);return false;" rel="external"><img src="<{$xoops_url}>/modules/debaser/images/play.png" alt="<{$smarty.const._MD_DEBASER_PLAY}>" align="middle" style="width:22px; height:22px;"/>a>
div>
<div align="right">
<img src="<{$xoops_url}>/modules/debaser/images/views.gif" title="<{$smarty.const._MD_DEBASER_VIEWS}>" alt="<{$smarty.const._MD_DEBASER_VIEWS}>" align="middle" /> <strong style="color: #ffffff;"><{$filelist[i].views}>strong><{if $allowyes == true}> <{if $filelist[i].link != ''}><a href="<{$filelist[i].link}>"><{else}><a href="<{$xoops_url}>/modules/debaser/getfile.php?id=<{$filelist[i].id}>"><{/if}><img src="<{$xoops_url}>/modules/debaser/images/hits.gif" height="20" width="20" title="<{$smarty.const._MD_DEBASER_HITS}>" alt="<{$smarty.const._MD_DEBASER_HITS}>" align="middle" />a> <strong style="color: #ffffff;"><{$filelist[i].hits}>strong><{/if}>
<{if $isxadmin == true}>
<a href="<{$xoops_url}>/modules/debaser/admin/index.php?op=editmpegs&mpegid=<{$filelist[i].id}>"><img src="<{$xoops_url}>/modules/debaser/images/edit.gif" alt="<{$smarty.const._MD_DEBASER_EDIT}>" align="middle" />a>
<a href="<{$xoops_url}>/modules/debaser/admin/index.php?op=deletesong&mpegid=<{$filelist[i].id}>&delfile=<{$filelist[i].filename}>"><img src="<{$xoops_url}>/modules/debaser/images/delete.gif" alt="<{$smarty.const._DELETE}>" align="middle" />a>
<{/if}>
div>div>
div>div>
<{/section}>
<br style="clear:both;" />
<div style="text-align:left;"><{$category.navbar}>div>
<{if $xoops_notification.show}>
<{include file='db:system_notification_select.html'}>
<{/if}>
<{if $usetooltips == true}>
<div id="dhtmltooltip" style="position: absolute; width: 150px; border: 2px solid black; padding: 2px; background-color: yellow; visibility: hidden; z-index: 100; filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);">div>
<script type="text/javascript">
/***********************************************
* Cool DHTML tooltip script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}
function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20
var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"
//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}
function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}
document.onmousemove=positiontip
script>
<{/if}>
New content of template debaser_singlefile.html:
<div><a href="index.php"><{$smarty.const._MD_DEBASER_INDEX}>a> - <a href="genre.php?genreid=<{$genreid}>"><{$smarty.const._MD_DEBASER_GENRE}> <{$genre}>a>div><br />
<div style="text-align:right;"><{$category.navbar}>div>
<table width="100%" cellpadding="5" cellspacing="5" class="outer">
<tr>
<td colspan="2" class="itemHead">
<div style="float:left;">
<strong><{$artist}> - <{$title}>strong>
div>
<div style="float:right;">
<{if $ratesong.rating == '0.000'}>
<{$ratesong.rating}>
<{elseif $ratesong.rating != '0.000'}>
<{$ratesong.rating}> | <{$ratesong.votes}>
<{/if}>
div>
td>
tr>
<tr>
<td class="odd" valign="top" width="50%">
<strong><{$smarty.const._MD_DEBASER_COMMENT}>strong><br />
<{$addinfo}>
td>
<td class="odd">
<table width="100%" class="outer" cellpadding="0" cellspacing="0">
<tr>
<td class="odd" valign="top" width="50%">
<small>
<{if $album > '0' || $album != ''}>
<strong><{$smarty.const._MD_DEBASER_ALBUM}>strong> <{$album}><br />
<{/if}>
<{if $year > '0'}>
<strong><{$smarty.const._MD_DEBASER_YEAR}>strong> <{$year}><br />
<{/if}>
<{if $track > '0'}>
<strong><{$smarty.const._MD_DEBASER_TRACK}>strong> <{$track}><br />
<{/if}>
<{if $length > '0' || $length != ''}>
<strong><{$smarty.const._MD_DEBASER_LENGTH}>strong> <{$length}> <{$smarty.const._MD_DEBASER_SECONDS}><br />
<{/if}>
<{if $bitrate > '0' || $bitrate != ''}>
<strong><{$smarty.const._MD_DEBASER_BITRATE}>strong> <{$bitrate}> <{$smarty.const._MD_DEBASER_KBITS}><br />
<{/if}>
<{if $frequence > '0' || $frequence != ''}>
<strong><{$smarty.const._MD_DEBASER_FREQUENCY}>strong> <{$frequence}> <{$smarty.const._MD_DEBASER_HERTZ}>
<{/if}>
small>
td>
tr>
table>
td>
tr>
<tr>
<td class="even" colspan="2">
<div align="left" style="float:left;">
<a href="<{$xoops_url}>/modules/debaser/player.php?id=<{$id}>" onclick="window.open(this.href);return false;" rel="external"><img src="<{$xoops_url}>/modules/debaser/images/play.gif" height="20" width="20" title="<{$smarty.const._MD_DEBASER_PLAY}>" alt="<{$smarty.const._MD_DEBASER_PLAY}>" align="middle" />a>
div>
<div align="right">
<img src="<{$xoops_url}>/modules/debaser/images/views.gif" title="<{$smarty.const._MD_DEBASER_VIEWS}>" alt="<{$smarty.const._MD_DEBASER_VIEWS}>" align="middle" /> <strong><{$views}>strong><{if $allowyes == true}> <{if $link != ''}><a href="<{$link}>"><{else}><a href="<{$xoops_url}>/modules/debaser/getfile.php?id=<{$id}>"><{/if}><img src="<{$xoops_url}>/modules/debaser/images/hits.gif" height="20" width="20" title="<{$smarty.const._MD_DEBASER_HITS}>" alt="<{$smarty.const._MD_DEBASER_HITS}>" align="middle" />a> <strong><{$hits}>strong><{/if}>
<{if $isxadmin == true}>
<a href="<{$xoops_url}>/modules/debaser/admin/index.php?op=editmpegs&mpegid=<{$id}>"><img src="<{$xoops_url}>/modules/debaser/images/edit.gif" height="20" width="20" title="<{$smarty.const._MD_DEBASER_EDIT}>" alt="<{$smarty.const._MD_DEBASER_EDIT}>" align="middle" />a>
<a href="<{$xoops_url}>/modules/debaser/admin/index.php?op=deletesong&mpegid=<{$id}>&delfile=<{$filename}>"><img src="<{$xoops_url}>/modules/debaser/images/delete.gif" height="20" width="20" title="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" align="middle" />a>
<{/if}>
div>
td>
tr>
table>
<{if $guestvote == true}>
<form method="post" action="ratefile.php">
<input type="hidden" name="lid" value="<{$id}>" />
<table width="100%" cellspacing="5" cellpadding="5" class="outer" style="margin-top:5px;">
<tr>
<td align="center" class="odd">
[ 1<input type="radio" name="rating" value="1" checked /> ]
[ 2<input type="radio" name="rating" value="2" /> ]
[ 3<input type="radio" name="rating" value="3" /> ]
[ 4<input type="radio" name="rating" value="4" /> ]
[ 5<input type="radio" name="rating" value="5" /> ]
[ 6<input type="radio" name="rating" value="6" /> ]
[ 7<input type="radio" name="rating" value="7" /> ]
[ 8<input type="radio" name="rating" value="8" /> ]
[ 9<input type="radio" name="rating" value="9" /> ]
[ 10<input type="radio" name="rating" value="10" /> ]
td>
tr>
table>
<div align="center"> <br />
<input type="submit" name="submit" value="<{$smarty.const._MD_DEBASER_RATETHIS}>" />
div>
form>
<{/if}>
<br />
<{if $cancomment == 1}>
<div style="text-align:center; padding: 3px; margin:3px;">
<{$commentsnav}>
<{$lang_notice}>
div>
<div style="margin:3px; padding: 3px;">
<{if $comment_mode == "flat"}>
<{include file="db:system_comments_flat.html"}>
<{elseif $comment_mode == "thread"}>
<{include file="db:system_comments_thread.html"}>
<{elseif $comment_mode == "nest"}>
<{include file="db:system_comments_nest.html"}>
<{/if}>
div>
<{/if}>
<{if $xoops_notification.show}>
<{include file='db:system_notification_select.html'}>
<{/if}>
This function should! be placed in xoopsroot/include/xoops.js:
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.onload = externalLinks;
Good luck!
EDIT: If you don't need the code to be xhtml-strict you don't have to put in the javascript.