Sagen er den at jeg ikke helt kan overskue sidens .tpl kode. Måske kan du det? Men ej det er vist et større arbejde, men jeg bliver evig lykkelig hvis du kan
{form name="viewmode" style="margin:0px;"}
{input type="hidden" name="directory" value=$smarty.request.directory}
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 350px;">
{toolbaritem onclick="javascript:document.getElementById('div_create_folder').style.visibility='visible';" image='images/toolbar/folderview_newfolder.gif' imageonmouseclick='images/toolbar/folderview_newfolder_onmousedown.gif' imageonmouseover='images/toolbar/folderview_newfolder_onmouseover.gif'}
{toolbaritem onclick="javascript:document.getElementById('div_upload_files').style.visibility='visible';" image='images/toolbar/folderview_upload.gif' imageonmouseclick='images/toolbar/folderview_upload_onmousedown.gif' imageonmouseover='images/toolbar/folderview_upload_onmouseover.gif'}
{toolbaritem onclick="javascript:document.getElementById('div_delete_folder').style.visibility='visible';" image='images/toolbar/folderview_deletefolder.gif' imageonmouseclick='images/toolbar/folderview_deletefolder_onmousedown.gif' imageonmouseover='images/toolbar/folderview_deletefolder_onmouseover.gif'}
</td>
<td valign="center" style="font-size: 10px; width:100px;">
Visning af filer:
</td>
<td>
<select name="viewmode" onChange="javascript:document.viewmode.submit();" style="margin-top: 1px; font-size: 9px; height: 16px;">
<option value="normal"{if $smarty.session.viewmode=='normal'} selected{/if}>Listeoversigt</option>
<option value="thumbnail_view"{if $smarty.session.viewmode=='thumbnail_view'} selected{/if}>Thumbnails</option>
</select>
</td>
<td style="padding-left: 20px;">
{toolbaritem onclick="javascript:document.getElementById('div_explorer_folder').style.visibility='visible';" image='images/toolbar/folderview_explorer.gif' imageonmouseclick='images/toolbar/folderview_explorer_onmousedown.gif' imageonmouseover='images/toolbar/folderview_explorer_onmouseover.gif'}
</td>
</tr>
</table>
{/form}
{include file='html_header_bottom_new.tpl'}
<script language="javascript" src="incs/dragdivs.js"></script>
<script language="javascript" src="incs/multifile.js"></script>
<div class="box2" id="div_create_folder" style="width: 500px;position:absolute;left: 240px; top: 190px; visibility:hidden;z-index:10;">
<h3><div onmousedown="dragStart(event, 'div_create_folder');" align="left" style="height: 20px;">Opret mappe
<div style="position:absolute; left:478px;top:0px;cursor: pointer;cursor:hand;">
{toolbaritem onclick="javascript:getElementById('div_create_folder').style.visibility='hidden';" image='images/box/closebutton.gif' imageonmouseclick='images/box/closebutton_onmouseover.gif' imageonmouseover='images/box/closebutton_onmouseover.gif'}
</div>
</div>
</h3>
<div class="box2Body" style="padding: 6px;">
{form name="new_folder"}
Opret undermappe i denne mappe ("{$filedir}")<br />
{input type="text" name="new_folder_name"}
{input type="hidden" name="directory" value=$smarty.request.directory}
{/form}
<div align="right">{toolbaritem onclick='javascript:document.new_folder.submit();' image='images/box/button_ok.gif' imageonmouseclick='images/box/button_ok_onmousedown.gif' imageonmouseover='images/box/button_ok_onmouseover.gif'}</div>
</div>
<div class="box2Footer"><p></p></div>
</div>
<div class="box2" id="div_upload_files" style="width: 500px;position:absolute;left: 250px; top: 200px; visibility:hidden;z-index:10;">
<h3><div onmousedown="dragStart(event, 'div_upload_files');" align="left" style="height: 20px;">Upload fil
<div style="position:absolute; left:478px;top:0px;cursor: pointer;cursor:hand;">
{toolbaritem onclick="javascript:getElementById('div_upload_files').style.visibility='hidden';" image='images/box/closebutton.gif' imageonmouseclick='images/box/closebutton_onmouseover.gif' imageonmouseover='images/box/closebutton_onmouseover.gif'}
</div>
</div>
</h3>
<div class="box2Body" style="padding: 6px;">
{form name="upload_files" enctype="multipart/form-data"}
{input type="hidden" name="directory" value=$smarty.request.directory}
Upload filer til denne mappe ("{$filedir}")<br />
<br />
<div id="files_list"></div>
<input id="upload_file_list" type="file" name="upload_file_list" >
<script>
<!-- Create an instance of the multiSelector class, pass it the output target and the max number of files -->
var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 100 );
<!-- Pass in the file element -->
multi_selector.addElement( document.getElementById( 'upload_file_list' ) );
</script>
{/form}
<div id="wait_div" style="display:none;"><img src="images/icons/wait16trans.gif" border="0" /> Vent venligst på at siden er færdig med at uploade filerne</div>
<div align="right">{toolbaritem onclick="javascript:document.getElementById('wait_div').style.display='block';document.upload_files.submit();" image='images/box/button_ok.gif' imageonmouseclick='images/box/button_ok_onmousedown.gif' imageonmouseover='images/box/button_ok_onmouseover.gif'}</div>
</div>
<div class="box2Footer"><p></p></div>
</div>
<div class="box2" id="div_delete_folder" style="width: 500px;position:absolute;left: 240px; top: 190px; visibility:hidden;z-index:10;">
<h3><div onmousedown="dragStart(event, 'div_delete_folder');" align="left" style="height: 20px;">Slet mappe og undermapper
<div style="position:absolute; left:478px;top:0px;cursor: pointer;cursor:hand;">
{toolbaritem onclick="javascript:getElementById('div_delete_folder').style.visibility='hidden';" image='images/box/closebutton.gif' imageonmouseclick='images/box/closebutton_onmouseover.gif' imageonmouseover='images/box/closebutton_onmouseover.gif'}
</div>
</div>
</h3>
<div class="box2Body" style="padding: 6px;">
{form name="delete_folder"}
<b>Er du sikker på at du vil slette mappen "{$filedir}" og alle dens undermapper?<br />
<br />
Dette kan ikke fortrydes!</b>
<br /><br />
(Du bliver evigt fordømt hvis det er den forkerte mappe du sletter..)<br />
<br />
{input type="hidden" name="delete_directory" value="1"}
{input type="hidden" name="directory" value=$smarty.request.directory}
{/form}
<div align="right">{toolbaritem onclick='javascript:document.delete_folder.submit();' image='images/box/button_delete.gif' imageonmouseclick='images/box/button_delete_onmousedown.gif' imageonmouseover='images/box/button_delete_onmouseover.gif'}</div>
</div>
<div class="box2Footer"><p></p></div>
</div>
<div class="box2" id="div_explorer_folder" style="width: 500px;position:absolute;left: 240px; top: 190px; visibility:hidden;z-index:10;">
<h3><div onmousedown="dragStart(event, 'div_explorer_folder');" align="left" style="height: 20px;">Åbn i Windows Explorer
<div style="position:absolute; left:478px;top:0px;cursor: pointer;cursor:hand;">
{toolbaritem onclick="javascript:getElementById('div_explorer_folder').style.visibility='hidden';" image='images/box/closebutton.gif' imageonmouseclick='images/box/closebutton_onmouseover.gif' imageonmouseover='images/box/closebutton_onmouseover.gif'}
</div>
</div>
</h3>
<div class="box2Body" style="padding: 6px;">
Det er også muligt at se filerne i din Windows Explorer. Dette gøres ved at følge fremgangsmåden:
<br /><br />
1. Kopiér følgende tekst:<br /><b>explorer /e,{$ftp_url}</b><br />
<br />
2. Åbn start-menuen og vælg [Kør]<br />
<br />
3. Indsæt det kopierede tekst i adresse-feltet og tryk Enter:<br />
<br />
<div align="center"><img src="images/content/ftp_explorer_help.gif" border="0" /></div>
<br />
4. Du kan nu kopiere filer direkte til hzd.dk igennem Windows Explorer<br />
<br />
</div>
<div class="box2Footer"><p></p></div>
</div>
{*if $demonote}
<div style="position:absolute; right: 20px; top: 93px; width: 320px; background-color: #FDC689; border: solid 1px #F26C4F;">
<b>Note:</b> Ved upload af demoer skal hver enkelt demo ligge i hver sin mappe under komponisten:<br />
<pre style="font-size: 11px; font-family: verdana; padding-left: 20px;">
Band
|-- Demo 1
| |-- Sang 1
| |-- Sang 2
|
|-- Demo 2
|-- Sang 1
|-- Sang 2
</pre>
</div>
{/if*}
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="220" valign="top">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td style="padding-left: 4px; font-size: 9px; height: 18px; background-image: url('images/toolbar/subtoolbar_background.gif');">Mapper</td>
</tr>
<tr>
<td style="padding-left: 4px; padding: 2px; padding-top: 6px;">
{foreach from=$directory_list item="directory"}
{assign var="padding" value=`$directory.depth*10`}
<tr>
<td style="padding-left: {$padding}px">
<a href="index.php?page=fileviewer&directory={$directory.encoded_url}">
{if $directory.selected}
<img src="images/icons/icon_folder_open.gif" border="0" /><b>{$directory.name}</b></a>
{else}
<img src="images/icons/icon_folder_closed.gif" border="0" />{$directory.name}</a>
{/if}
</td>
</tr>
{/foreach}
</td>
</tr>
</table>
</td>
<td valign="top" style="border-left: solid 1px gray;">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td {if $band}colspan="2"{/if} style="padding-left: 4px; font-size: 9px; height: 18px; background-image: url('images/toolbar/subtoolbar_background.gif');">
Sti: {$filedir}
</td>
</tr>
{if $band}
<tr>
<td valign="top" style="padding-left: 4px; font-size: 9px; border-bottom: solid 1px {if $demonote}#F26C4F{else}#9D9FA1{/if}; background-color: {if $demonote}#FDC689{else}#E2E3E4{/if};">
<img src="images/icons/cd-flowtar.gif" border="0" style="vertical-align: middle;" /> Gå til {link page="band" band_id=$band.id title=$band.name}
</td>
<td align="right" style="padding-left: 4px; padding-right: 10px; font-size: 9px; border-bottom: solid 1px {if $demonote}#F26C4F{else}#9D9FA1{/if}; background-color: {if $demonote}#FDC689{else}#E2E3E4{/if};">
{if $demonote_wrong_structure}
<b>Mappestrukturen er ikke korrekt for dette band. For at hzd.dk kan håndtere en oversigt over demoer, skal hver enkelt demo ligge i hver sin mappe under komponisten:</b>
<div align="left" style="width: 300px;"><pre style="font-size: 11px; font-family: verdana;">
Band
|-- Demo 1
| |-- Sang 1
| |-- Sang 2
|
|-- Demo 2
|-- Sang 1
|-- Sang 2
</pre></div>
<b>Åbn siden i Windows Explorer og flyt sangene ind i mapper så de matcher den beskrevne struktur.</b><br />
<br />
{elseif $demonote_no_date}
<b>Denne demo har ingen dato tilknyttet. <a href="index.php?page=fileviewer&directory={$smarty.request.directory|urlencode}&update_demo_timestamp=1">Klik her for at rette dette, såfremt du netop har lagt demoen op</a>. Ellers ret datoen på band-siden for {link page="band" band_id=$band.id title=$band.name}.
{elseif $demo_date}
Demoen er lagt op den: {$demo_date}
{else}
{/if}
</td>
</tr>
{/if}
<tr>
<td style="padding-left: 4px; padding: 2px; padding-top: 6px;" {if $band}colspan="2"{/if}>
{if $smarty.session.viewmode == 'file_view'}
<table border="0" width="100%">
<tr>
<td> </td>
<td width="150">
{if $file.previous_file}
<a href="index.php?page=fileviewer&directory={$smarty.request.directory}&viewmode=file_view&show_file={$file.previous_file}">Forrige</a>
{/if}
</td>
<td width="200">
<a href="index.php?page=fileviewer&directory={$smarty.request.directory}&viewmode=thumbnail_view">Tilbage til mappen</a>
</td>
<td width="150">
{if $file.next_file}
<a href="index.php?page=fileviewer&directory={$smarty.request.directory}&viewmode=file_view&show_file={$file.next_file}">Næste</a>
{/if}
</td>
<td> </td>
</tr>
</table>
<br />
{if $file.type == 'txt'}
{$file.content}
{else}
<img src="{$file.filepath}" border="0" />
{/if}
{elseif $smarty.session.viewmode == 'thumbnail_view'}
<table border="0" width="100%">
<tr>
{assign var="count" value="1"}
{assign var="num_rows" value="4"}
{foreach from=$file_list item="file"}
<td width="25%">
<a
{if $file.viewable}
href="index.php?page=fileviewer&directory={$smarty.request.directory}&viewmode=file_view&show_file={$file.name}"
{else}
href="{$file.filepath}"
{/if}
onmouseover="javascript:document.getElementById('{$file.name}').border=1;document.getElementById('{$file.name}').style.margin='0px';" onmouseout="javascript:document.getElementById('{$file.name}').border=0;document.getElementById('{$file.name}').style.margin='1px';">
<img src="{$file.image_src}" id="{$file.name}" border="0" style="margin:1px;"/><br />{$file.name}</a><br />
<br />
</td>
{if $count%$num_rows == 0}
</tr><tr>
{/if}
{assign var="count" value=`$count+1`}
{/foreach}
</tr>
</table>
{elseif $file_list}
<div id="colWrapper">
<div id="colText">
{foreach from=$file_list item="file"}
<a
{if $file.viewable}
href="index.php?page=fileviewer&directory={$smarty.request.directory}&viewmode=file_view&show_file={$file.name}"
{else}
href="{$file.filepath}"
{/if}
>
<img src="{$file.icon}" border="0" /> {$file.name}</a><br />
{/foreach}
</div>
</div>
{else}
{/if}
</td>
</tr>
</table>
</td>
</tr>
</table>
{if $file_list}
<script language="javascript">
{literal}
var LINE_HEIGHT = 19;
var DOC_OFFSET = 100;
var SCROLL_OFFSET = 20;
var MIN_WRAP_HEIGHT = LINE_HEIGHT * 4;
var COL_TXT_WIDTH = 20;
var COL_TXT_MARGIN = 2;
var COL_TXT_UNIT = "em";
var COL_FULL_HEIGHT = 0;
var ID_COL_WRAPPER = "colWrapper";
var ID_COL_TXT = "colText";
var COL_LEFT_MARGIN = 17;
var COL_TOP_MARGIN = 100;
function makeCols() {
var colObj, numCols, topOffset, wrapHeight, i;
var colId, colWidth, colMargin, colUnit;
var menuObj;
var wrapObj = document.getElementById(ID_COL_WRAPPER);
var textObj = document.getElementById(ID_COL_TXT);
var delCols = new Array();
var isInit = (COL_FULL_HEIGHT == 0);
if (!wrapObj) return;
// Try for a text col first, otherwise try for a image col
colId = ID_COL_TXT;
colWidth = COL_TXT_WIDTH;
colMargin = COL_TXT_MARGIN;
colUnit = COL_TXT_UNIT;
wrapHeight = Math.max(MIN_WRAP_HEIGHT, window.innerHeight-DOC_OFFSET);
// Take into account the height of the horizontal scroll bar the first time
if (isInit) wrapHeight -= SCROLL_OFFSET;
wrapObj.style.height = (wrapHeight - (wrapHeight % LINE_HEIGHT)) +"px"
textObj.style.position = "absolute";
textObj.style.overflow = "hidden";
textObj.style.width = colWidth + colUnit;
// Calculate height of one full col the first time the cols are made
if (isInit) COL_FULL_HEIGHT = textObj.offsetHeight;
numCols = Math.ceil(COL_FULL_HEIGHT/wrapObj.offsetHeight);
// Remove all cols except the original
for (i=0; i<wrapObj.childNodes.length; i++) {
colObj = wrapObj.childNodes[i];
if (colObj.id != colId) delCols.push(colObj);
}
for (i=0; i<delCols.length; i++) {
wrapObj.removeChild(delCols[i]);
}
// Add new cols
for (i=0; i<numCols; i++) {
if (i==0) {
colObj = textObj;
} else {
colObj = textObj.cloneNode(true);
colObj.id = colId + i;
wrapObj.appendChild(colObj);
}
topOffset = i * wrapObj.offsetHeight;
colObj.style.top = "-" + (-COL_TOP_MARGIN+topOffset) +"px";
colObj.style.left = (COL_LEFT_MARGIN + (i*(colWidth+colMargin))) + colUnit;
colObj.style.clip = "rect("+ topOffset +"px auto "+ (topOffset + wrapObj.offsetHeight) +"px auto)";
colObj.style.height = (topOffset + wrapObj.offsetHeight) +"px";
}
if (isInit) window.onresize = makeCols;
}
makeCols();
{/literal}
</script>
{/if}
Det letteste ville bare være hvis jeg kunne køre filen
Indlæg senest redigeret d. 15.10.2009 19:36 af Bruger #5097