/*************************************************************** * Copyright notice * * (c) 2004 David Heger (david.heger@dienste.rba.ch) * All rights reserved * * Version 1.0 * 11.10.2004, 10:38 * * This script is part of Clientis and the Typo3 project. The Typo3 project is * free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ function formatTypo3Link(tlink, opt1, opt2, mailsubject) { var link = tlink.substr(5,3); if (link == "://") { var link = tlink; } else { var link = "http://"+tlink+""; } var link = link.replace(/ _blank/," target=\"_blank\""); var link = link.replace(/ _top/," target=\"_top\""); var link = link.replace(/ _self/," target=\"_self\""); var link = link.replace(/ _parent/," target=\"_parent\""); // var linkMail = link.search(/@.+/); if(linkMail != -1) { if (mailsubject == "") { var mailaddon = ""; } else { var mailaddon = "?subject="+mailsubject+""; } var link = "mailto:"+tlink+""+mailaddon+""; } var link = link.replace(/http:\/\/fileadmin/,"fileadmin"); var link = link.replace(/http:\/\/typo3conf/,"typo3conf"); var link = link.replace(/http:\/\/uploads/,"uploads"); var link = link.replace(/http:\/\/typo3temp/,"typo3temp"); var link = link.replace(/http:\/\/media/,"media"); // var Extrakt = link.slice(0,8); if(Extrakt == "http://0" || Extrakt == "http://1" || Extrakt == "http://2" || Extrakt == "http://3" || Extrakt == "http://4" || Extrakt == "http://5" || Extrakt == "http://6" || Extrakt == "http://7" || Extrakt == "http://8" || Extrakt == "http://9") { var reallink = "index.php?id="+tlink+""; } else { var reallink = link; } if (opt1 == "1") { document.write(""+opt2+""); } else if (opt1 == "2") { document.write(""); } else if (opt1 == "3") { document.write(""); var reallinkStripped = reallink.replace(/target=\"_blank\"/,""); document.write(reallinkStripped); document.write(""); } else { document.write(""+reallink+""); } } // pageId= // pagelayout var treelevel = 0; var pageuid = 13; //------------------------- // Direktlinks // 1. Hole Einträge per SQL // 2. Abfrage ob Sub- od. Title // 3. Trimme Title auf Max 25 Zeichen // 4. Ermittle Link // - Ist ein Alias od. nur ID vorhanden // - Prüfe ob die Seite auf "External URL, Shortcut, Standart od. Advanced" eingestellt ist. //------------------------- function shortcutItems() { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } //------------------------- // Custom Functions //------------------------- function writeDivTag(divid, divid2) { if (treelevel == 0) { document.write('