Hallo!
In diesem Teil wird das Script erzeugt:
<!-- BEGIN TREE -->{EMPTY_ROW}<!-- BEGIN CLOSETREE --><div id="tree_{IDCAT}" style="display:block;"></div><!-- END CLOSETREE --> <p class="cat{CAT_STATUS}" onMouseOver="this.className='cathover{CAT_STATUS}';" onMouseOut="this.className='cat{CAT_STATUS}';"> {BUTTON_PUBLISH}{CAT_ACTIONS} <label>{SPACES_BEFORE}<a href="{CAT_EXPAND_URL}" onMouseOver="on('{CAT_EXPAND_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_expand{CAT_EXPAND_STATUS}.gif" width="9" height="9" alt="{CAT_EXPAND_ALT}" title="{CAT_EXPAND_ALT}" id="expand_{IDCAT}" /></a> <script language="JavaScript1.2"> linkset['cat_{IDCAT}']='<table border="0" cellspacing="1" cellpadding="0">' linkset['cat_{IDCAT}']+=' <tr>' linkset['cat_{IDCAT}']+=' <td colspan="2" id="title-cat"><span>Id: {IDCAT}</span>{LANG_FOLDER}: {ADDSLASHES_CAT_NAME}</td>' linkset['cat_{IDCAT}']+=' </tr>' linkset['cat_{IDCAT}']+=' <tr>' linkset['cat_{IDCAT}']+=' <td id="navi">' <!-- BEGIN CAT_CONFIG --> linkset['cat_{IDCAT}']+=' <p class="menurow" onclick="document.location.href='{CAT_CONFIG_URL}'" onMouseOver="on('{CAT_CONFIG_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_config.gif" width="10" height="10" /> {CAT_CONFIG_ALT}</p>' <!-- END CAT_CONFIG --> <!-- BEGIN CAT_LOCK --> linkset['cat_{IDCAT}']+=' <p class="menurow" onclick="document.getElementById('recharge').src='{CAT_LOCK_URL}'" onMouseOver="on('{CAT_LOCK_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_lock{CAT_LOCK_STATUS}.gif" width="10" height="10" /> {CAT_LOCK_ALT}</p>' <!-- END CAT_LOCK --> <!-- BEGIN CAT_DELETE --> linkset['cat_{IDCAT}']+=' <p class="menurow" onclick="return delete_confirm();document.location.href='{CAT_LOCK_URL}'" onMouseOver="on('{CAT_DELETE_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_delete.gif" width="10" height="10" /> {CAT_DELETE_ALT}</p>' <!-- END CAT_DELETE --> linkset['cat_{IDCAT}']+=' <div class="sub">' <!-- BEGIN CAT_NEWCAT --> linkset['cat_{IDCAT}']+=' <p class="menurow" onclick="document.location.href='{CAT_NEWCAT_URL}'" onMouseOver="on('{CAT_NEWCAT_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_newfolder.gif" width="10" height="10" /> {CAT_NEWCAT_ALT}</p>' <!-- END CAT_NEWCAT --> <!-- BEGIN CAT_NEWSIDE --> linkset['cat_{IDCAT}']+=' <p class="menurow" onclick="document.location.href='{CAT_NEWSIDE_URL}'" onMouseOver="on('{CAT_NEWSIDE_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_newpage.gif" width="10" height="10" /> {CAT_NEWSIDE_ALT}</p>' <!-- END CAT_NEWSIDE --> linkset['cat_{IDCAT}']+=' </div>' linkset['cat_{IDCAT}']+=' <div class="sub">' linkset['cat_{IDCAT}']+=' <p class="menurow" onclick="window.open('{CAT_PREVIEW_URL}', '{CAT_PREVIEW_ALT}')" onMouseOver="on('{CAT_PREVIEW_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_preview.gif" width="10" height="10" /> {CAT_PREVIEW_ALT}</p>' linkset['cat_{IDCAT}']+=' </div>' linkset['cat_{IDCAT}']+=' <p class="subtitle-cat">verschieben</p>' linkset['cat_{IDCAT}']+=' <p class="menurow" onclick="window.open('{CAT_PREVIEW_URL}', '{CAT_PREVIEW_ALT}')" onMouseOver="on('{CAT_PREVIEW_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_movefolder.gif" width="10" height="10" /> in anderen Ordner</p>' linkset['cat_{IDCAT}']+=' <div class="sort">' linkset['cat_{IDCAT}']+=' <p class="menurow" align="center" width="25%" onclick="window.open('{CAT_PREVIEW_URL}', '{CAT_PREVIEW_ALT}')" onMouseOver="on('{CAT_PREVIEW_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_movetop.gif" width="12" height="12" /></p>' linkset['cat_{IDCAT}']+=' <p class="menurow" align="center" width="25%" onclick="window.open('{CAT_PREVIEW_URL}', '{CAT_PREVIEW_ALT}')" onMouseOver="on('{CAT_PREVIEW_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_moveup.gif" width="12" height="12" /></p>' linkset['cat_{IDCAT}']+=' <p class="menurow" align="center" width="25%" onclick="window.open('{CAT_PREVIEW_URL}', '{CAT_PREVIEW_ALT}')" onMouseOver="on('{CAT_PREVIEW_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_movedown.gif" width="12" height="12" /></p>' linkset['cat_{IDCAT}']+=' <p class="menurow" align="center" width="25%" onclick="window.open('{CAT_PREVIEW_URL}', '{CAT_PREVIEW_ALT}')" onMouseOver="on('{CAT_PREVIEW_ALT}');" onMouseOut="off();"><img src="tpl/standard/img/but_movebottom.gif" width="12" height="12" /></p>' linkset['cat_{IDCAT}']+=' </div></td>' linkset['cat_{IDCAT}']+=' <td id="info"><span class="title">{LANG_CREATED}:</span> {CAT_CREATED}<br /><span class="title">{LANG_LASTMODIFIED}:</span> {CAT_LASTMODIFIED}<br /><span class="title">{LANG_TEMPLATE}:</span><span class="cat-template{CAT_TEMPLATE_STATUS}"> {ADDSLASHES_CAT_TEMPLATE}</span><br /><span class="title">{LANG_AUTHOR}:</span><span class="author{CAT_AUTHOR_STATUS}"> {ADDSLASHES_CAT_AUTHOR}</span>' <!-- BEGIN CAT_DESCRIPTION --> linkset['cat_{IDCAT}']+=' <br /><span class="title">{LANG_DESCRIPTION}:</span><br />{ADDSLASHES_CAT_DESCRIPTION}' <!-- END CAT_DESCRIPTION --> linkset['cat_{IDCAT}']+=' </td>' linkset['cat_{IDCAT}']+=' </tr>' linkset['cat_{IDCAT}']+='</table>' </script>
Augferufen wird das Script hier:
<html> <head> <script src="tpl/standard/js/standard.js" type="text/javascript"></script> </head> <body onload="recharge({ID});"> {RECHARGE} </body> </html>
Zur Informtion: Diese Datei hier erzeugt die Layer, in denen dann die dynamischen Links stehen sollen:
<!-- var regExpPict = /.(gif|jpeg|jpg|png)$/i
var messages = new Array();
function con_layer(task) { for (j=1; j<=max_subs; j++) con_hide(eval('"' + "menu_layer" + j +'"')); con_show(eval('"' + "menu_layer" + task +'"')); }
function con_hide(layer) { if (document.layers) document.layers[''+layer].visibility = 'hide'; if (document.all) document.all[''+layer].style.visibility = 'hidden'; if (!document.all && document.getElementById) { task = document.getElementById(''+layer); task.style.visibility = 'hidden'; } }
function con_show(layer) { if (document.layers) document.layers[''+layer].visibility = 'show'; if (document.all) document.all[''+layer].style.visibility = 'visible'; if (!document.all && document.getElementById) { task = document.getElementById(''+layer); task.style.visibility = 'visible'; } }
function on(message) { window.status = message; window.defaultStatus = window.status; return true; }
function on_func(message_id) { if (messages.length > message_id) { window.status = messages[message_id]; window.defaultStatus = window.status; } return true; }
function on_func_add_message(message_id, message_text) { if (!messages[message_id]) { messages[message_id] = message_text; } }
function off() { window.status = "der-dirigent"; window.defaultStatus = window.status; }
function imgon(img,src) { document[img].src = 'images/menu_'+img+src+'.gif'; }
function new_window(theURL,winName,features,myWidth,myHeight,isCenter) { if (window.screen) if (isCenter) if (isCenter=="true") { var myLeft = (screen.width-myWidth)/2; var myTop = (screen.height-myHeight)/2; features+=(features!='')?',':''; features+=',left='+myLeft+',top='+myTop; } window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight); }
function con_window(theURL,name,myWidth,myHeight,path) { con_popup(theURL,'', myWidth, myHeight, name, name, '#000000', '#5A7BAD', '#5A7BAD', '#A8BADE', 'Verdana, Arial, Helvetica', '1', '#000000', path); }
function new_imagepopup(theURL,winName,altName,features,myWidth,myHeight,isCenter) { if (regExpPict.test(theURL)) { // Bildformate if(window.screen)if(isCenter)if(isCenter=="true") { var myLeft = (screen.width-myWidth)/2; var myTop = (screen.height-myHeight)/2; features+=(features!='')?',':''; features+=',left='+myLeft+',top='+myTop; } imagepopup = window.open('','',features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight); with (imagepopup.document) { open(); write('<title>'+winName+'</title>'); write('<meta http-equiv="imagetoolbar" content="no">'); write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll="no">') write('<a href="javascript:self.close()">'); write('<img src="'+theURL+'" border="0" alt="'+altName+'" title="'+altName+'">') close(); } } else { // andere Dateiformate new_window(theURL,name,features,myWidth,myHeight,false); } }
function previewPict(adresse, breite, hoehe, created, modified, redakteur, thumbnail, filename) { previewPict2(adresse, breite, hoehe, created, modified, redakteur, thumbnail, filename, "") }
function previewPict2(adresse, breite, hoehe, created, modified, redakteur, thumbnail, filename, sizeinfo) { text = ""; titel = pp_title; if (adresse != "") { if (regExpPict.test(filename)) { text += "<img src="" + adresse + "" border="0""; text += (breite != "") ? " width="" + breite + """: ""; text += (hoehe != "") ? " height="" + hoehe + """: ""; text += "><br>"; titel = (thumbnail) ? pp_header_bild: pp_header_datei; } } text += (created != "") ? pp_created + created + "<br>": ""; text += (modified != "") ? pp_modified + modified + "<br>": ""; text += (redakteur != "") ? pp_author + redakteur + "<br>": ""; text += (sizeinfo != "") ? pp_size + sizeinfo : "";
overlib(text, titel, '', 'sideinfo'); }
function confirm_to_url(msg,url,to) { var confirm_to = false; var string_url = ''; if(confirm(msg)) confirm_to = true; string_url = url+'&'+to+'='+confirm_to; window.location.href = string_url; return !confirm_to; }
function recharge(id) { parent.document.getElementById('tree_'+id).innerHTML = document.body.innerHTML; }
function load(id) { thisTree = document.getElementById('tree_'+id); if (thisTree) { if (thisTree.style.display == 'none') { document.getElementById('recharge').src = "main.php?area=con&action=expand&idcat="+id+"&expanded=0"; document.getElementById('expand_'+id).src = 'tpl/standard/img/but_expand0.gif'; thisTree.style.display = 'block'; } else { document.getElementById('recharge').src = "main.php?area=con&action=expand&idcat="+id+"&expanded=1"; document.getElementById('expand_'+id).src = 'tpl/standard/img/but_expand1.gif'; thisTree.style.display = 'none'; } } } //-->
Alles,w as jetzt in den geschweiften Klammern steht, wird von der DB vorgegeben...