3 require_once("config_tinybrowser.php");
5 $tbpath = pathinfo($_SERVER['SCRIPT_NAME']);
6 $tbmain = $tbpath['dirname'].'/tinybrowser.php';
9 function tinyBrowser (field_name, url, type, win) {
11 /* If you work with sessions in PHP and your client doesn't accept cookies you might need to carry
12 the session name and session ID in the request string (can look like this: "?PHPSESSID=88p0n70s9dsknra96qhuk6etm5").
13 These lines of code extract the necessary parameters and add them back to the filebrowser URL again. */
15 var cmsURL = "<?php echo $tbmain; ?>"; // script URL - use an absolute path!
16 if (cmsURL.indexOf("?") < 0) {
17 //add the type as the only query parameter
18 cmsURL = cmsURL + "?type=" + type;
21 //add the type as an additional query parameter
22 // (PHP session ID is now included if there is one at all)
23 cmsURL = cmsURL + "&type=" + type;
26 tinyMCE.activeEditor.windowManager.open({
28 title : 'Tiny Browser',
29 width : <?php echo $tinybrowser['window']['width']; ?>,
30 height : <?php echo $tinybrowser['window']['height']; ?>,
33 inline : "yes", // This parameter only has an effect if you use the inlinepopups plugin!