2 $mainpage = (strpos(basename($_SERVER['HTTP_REFERER']),'tinybrowser.php') === 0 ? true : false);
3 require_once('../config_tinybrowser.php');
5 if($mainpage && !isset($_GET['feid']) && $tinybrowser['integration'] == 'tinymce')
7 function selectURL(url)
9 document.passform.fileurl.value = url;
10 FileBrowserDialogue.mySubmit();
12 var FileBrowserDialogue = {
14 // Here goes your code for setting your custom things onLoad.
17 mySubmit : function () {
18 var URL = document.passform.fileurl.value;
19 var win = tinyMCEPopup.getWindowArg("window");
21 // insert information now
22 win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;
24 // for image browsers: update image dimensions
25 if (typeof(win.ImageDialog) != "undefined" && document.URL.indexOf('type=image') != -1)
27 if (win.ImageDialog.getImageData) win.ImageDialog.getImageData();
28 if (win.ImageDialog.showPreviewImage) win.ImageDialog.showPreviewImage(URL);
35 tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
38 elseif($mainpage && !isset($_GET['feid']) && $tinybrowser['integration'] == 'fckeditor')
40 function selectURL(url){
41 // window.opener.SetUrl( url, width, height, alt);
42 window.opener.SetUrl( url ) ;
47 elseif($mainpage && $_GET['feid'] != '')
49 function selectURL(url) {
50 opener.document.getElementById("<?php echo $_GET['feid']; ?>").value = url;
51 // Set img source of element id, if img id exists (format is elementid + "img")
53 typeof(opener.document.getElementById("<?php echo $_GET['feid']; ?>img")) != "undefined"
54 && opener.document.getElementById("<?php echo $_GET['feid']; ?>img") != null
55 && opener.document.getElementById("<?php echo $_GET['feid']; ?>img").src.length != 0
58 opener.document.getElementById("<?php echo $_GET['feid']; ?>img").src = url;
66 rowHighlight = function() {
67 var x = document.getElementsByTagName('tr');
68 for (var i=0;i<x.length;i++)
70 x[i].onmouseover = function () {this.className = "over " + this.className;}
71 x[i].onmouseout = function () {this.className = this.className.replace("over", ""); this.className = this.className.replace(" ", "");}
73 var y = document.getElementsByTagName('th');
74 for (var ii=0;ii<y.length;ii++)
76 y[ii].onmouseover = function () {if(this.className != "nohvr") this.className = "over " + this.className;}
77 y[ii].onmouseout = function () {this.className = this.className.replace("over", ""); this.className = this.className.replace(" ", "");}