Folder View 2 Support Product Page

This topic was archived

example file

Asked 13 Oct 2009 00:30:09
1
has this question
13 Oct 2009 00:30:09 michael roselli posted:
Hello, I bought all of the extensions to make file management, but I can not link to files forlder view 2 Genie, you can have a copy of the sample file management bundle 2? Meanwhile I created this code to the page folder view2

<script type="text/javascript">
<!--
function setSrcIframe(folder){
		document.getElementById('demo_content').src = 'demo_content.asp?v=details&f=' + folder;
}
function setSrcIframeDoc(doc){
		document.getElementById('demo_content').src = doc.replace("./", "");
}
//-->
</script>
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Default/treestyle.css" />
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Blue_Folder1_32x32/treestyle.css" />
<script language="javascript" type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script language="javascript" type="text/javascript" src="ScriptLibrary/dmxFolderView.js"></script>
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Default/treestyle.css" />
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Blue_Folder1_32x32/treestyle.css" />
<script language="javascript" type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<script language="javascript" type="text/javascript" src="ScriptLibrary/dmxFolderView.js"></script>
<link rel="stylesheet" type="text/css" href="styles/dmxTree/Blue/treestyle.css" />
<link rel="stylesheet" type="text/css" href="file:///D|/Develop/phpTest/styles/dmxTree/Default/treestyle.css" />

<link rel="stylesheet" type="text/css" href="file:///D|/Develop/phpTest/styles/dmxTree/Blue_Folder1_32x32/treestyle.css" />
<script language="javascript" type="text/javascript" src="file:///D|/Develop/phpTest/ScriptLibrary/jquery-latest.pack.js"></script>
<script language="javascript" type="text/javascript" src="file:///D|/Develop/phpTest/ScriptLibrary/dmxFolderView.js"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>

<body>
<table width="800" border="0" cellspacing="0" cellpadding="0" style="margin:10px 0 10px 0;">
  <tr>
    <td width="17%" align="center" valign="middle"><span class="title"><img src="filemanagement/images/file-manager.png" width="64" height="64" /></span></td>
    <td width="83%" align="center" height="64" valign="middle"><span class="title" style="line-height:42px;">File Management</span></td>

  </tr>
</table>
<table width="800" border="0" cellpadding="0" cellspacing="0" class="folderlisttable">
  <tr>
    <td valign="top"><table width="313px" border="0" cellspacing="0" cellpadding="0">
      <tr class="folderlistheader">
        <td width="313px" style="padding-left:10px;border-bottom:#333 solid 1px;height:45px;">Folder List</td>
      </tr>
      <tr>

        <td><div style="width:313px;height:460px;overflow:scroll;overflow-x:hidden;"><script language="javascript">
<!--
dmxListToTree({
  bgcolor : "#FFFFFF",
  slide   : true,
  bullets : "plusminus",
  filter  : "dir",
  clickOn : "row",
  icons   : true,
  theme   : "Blue_Folder1_32x32",
  objId   : "FolderView",
  src     : './filemanagement/media/',
  server  : "dmx_folderview.asp",
  requestParams : {},
  onfolderclick : "setSrcIframe('{path}');",
  onfileselect : "setSrcIframeDoc('{path}');"
});
//-->
</script>
          <ul class="dmxtree Blue_Folder1_32x32" id="FolderView">
          <li>Item 1</li>
            <li>Item 2</li>
            <li class="expanded">Item 3
              <ul>
                <li>Item 3.1</li>

              </ul>
            </li>
            <li>Item 4</li>
          </ul></div>

thanks for your willingness

Replies

Replied 13 Oct 2009 08:14:10
13 Oct 2009 08:14:10 Patrick Julicher replied:
Hi Michael,

This is only part of the code. You need to set the Folder View with a link to the Iframe. Then you create an Iframe on the same page with the FileGenie on it. Tell FileGenie to get the path from the Querystring that was passed from the Folder View to the Iframe in the link.

Kind regards, Patrick
Replied 13 Oct 2009 11:52:23
13 Oct 2009 11:52:23 michael roselli replied:
hi patrick
i finished the script trying to start from the one you created.i have seen that, if the script is in the main root, it works fine while if i put it in the subfolders it doesn't work correctly.Am i doing anything wrong?would you give a look at this code ?

page Untitled-2.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Folder View - Remote Browser Demo</title>
<style type="text/css">
<!--
#theframe {
	border:0px none;
	width:100%;
	height:400px;
	display:block !important;
}

tbody {
	position:relative;
	height:100%;
}

#folderView {
	height: 400px;
}

#FolderView li.selected {
  background-color:highlight !important;
  color:highlighttext !important;
}

table {
	border-collapse:collapse;
	border:1px solid #FFCA5E;
}

caption {
	font: 1.8em/1.8em Arial, Helvetica, sans-serif;
	text-align: center;
	text-indent: 10px;
	height: 45px;
	color: #FFAA00;
}

thead th {
/*	background: url(bg_th.jpg) no-repeat right;*/
	height: 47px;
	color: #FFFFFF;
	font-size: 0.8em;
	font-weight: bold;
	padding: 0px 7px;
	margin: 20px 0px 0px;
	text-align: left;
	border-right: 1px solid #FCF1D4;
}

thead a:hover {
	color:#0090FF;
}

tbody tr {
/*background: url(bg_td1.jpg) repeat-x top;*/
}

tbody tr.odd {
	/*background: #FFF8E8 url(bg_td2.jpg) repeat-x;*/
}

tbody th,td {
	font-size: 0.8em;
	line-height: 1.4em;
	font-family: Arial, Helvetica, sans-serif;
	color: #333;
	padding: 10px 7px;
	border-top: 1px solid #FFCA5E;
	border-right: 1px solid #FFCA5E;
	border-left: 1px solid #FFCA5E;
	text-align: left;
	border-bottom: 1px solid #FFCA5E;
}

a {
	color: #333;
	font-weight: bold;
	text-decoration: none;
	font-size: 24px;
}

a:hover {
	text-decoration: none;
}

tfoot th {
	/*background: url(bg_total.jpg) repeat-x bottom;*/
	color: #FFFFFF;
	height: 30px;
}
-->
</style>
<script type="text/javascript">
<!--
function setSrcIframe(folder){
		document.getElementById('theframe').src = 'cartella.php?folder=' + folder;
}
function setSrcIframeDoc(doc){
		document.getElementById('theframe').src = doc.replace("./", "");
}
//-->
</script>
<script language="javascript" type="text/javascript" src="../../ScriptLibrary/jquery-latest.pack.js"></script>
<script language="javascript" type="text/javascript" src="../../ScriptLibrary/dmxFolderView.js"></script>
<link rel="stylesheet" type="text/css" href="../../styles/dmxTree/Default/treestyle.css" />
<link rel="stylesheet" type="text/css" href="../../styles/dmxTree/Blue_Folder3_24x24/treestyle.css" />
</head>

<body>
<table width="100%" border="1" style="">
<thead>
    	<tr>
       	  <td height="23" colspan="2">&nbsp;</td>

        </tr>
  </thead>
    <tbody>
    	<tr>
        	<td width="29%" valign="top"><div id="folderView" style="overflow:auto">
              <script language="javascript">
<!--
dmxListToTree({
  struct  : true,
  bullets : "plusminus",
  clickOn : "row",
  icons   : true,
  theme   : "Blue_Folder3_24x24",
  objId   : "FolderView",
  src     : "./start/archivio/",
  server  : "../../dmx_folderview.php"
});
//-->
</script>
              <ul class="dmxtree Blue_Folder3_24x24" id="FolderView">
                <li>Item 1</li>
                <li>Item 2</li>
                <li class="expanded">Item 3
                  <ul>
                      <li>Item 3.1</li>
                  </ul>
                </li>
                <li>Item 4</li>
              </ul>
             

        </div>
        </td>
        <td align="left" valign="top" width="65%">
          <iframe frameborder="0" id="theframe" src="cartella.php?folder=<?php echo $_GET['folder']; ?>"></iframe>
        </td>
     </tr>
   </tbody>
</table>
</body>

</html>



page cartella.php
<?php require_once('..

/../ScriptLibrary/incFileGenie.php'); ?>
<?php
// *** Folder List 1.05
$file = new fileGenie();
$file->path = $_GET['folder'];
$file->allowedExtensions = "";
$file->includeFolders = false;
$file->showThumbnailsOnly = false;
$file->thumbnailsSuffix = "_small";
$file->naming = "suffix";
$file->thumbPath = "";
$file->processFolder("fileName", "ASC");
?>
<?php
// *** Folder List Repeater Vars 1.04
$file->setPageRecs(0);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
</head>

<body>
<p><?php echo $_GET['folder']; ?></p>
<table width="511" border="1" cellspacing="5">
  <tr bgcolor="#CCCCCC">
    <td>File </td>
    <td>Dimensione</td>
    <td>tipo</td>
    <td>&nbsp;</td>
  </tr>
  <?php
// *** Folder List Repeater Start
while ($file->canRepeat()) {
?>
    <tr>
      <td><?php echo $file->folderList("fileName"); ?></td>
      <td><?php echo $file->folderList("size"); ?></td>
      <td><?php echo $file->folderList("extension"); ?></td>
      <td><?php echo $file->folderList("type"); ?></td>
    </tr>
    <?php
  $file->MoveNext();
}
$file->endRepeater();
// *** Folder List Repeater End
?>
</table>
<p>&nbsp;</p>
</body>
</html>


thanks for your willingness Michael

Edited by - michael roselli on 13 Oct 2009  11:53:43
Replied 13 Oct 2009 12:40:53
13 Oct 2009 12:40:53 Patrick Julicher replied:
Hi Michael,

Could you post a link to your page for me to have a look at?

Kind regards, Patrick
Replied 13 Oct 2009 12:59:54
13 Oct 2009 12:59:54 michael roselli replied:
file you can download it from here
www.vismart.it/file.php
Replied 13 Oct 2009 13:45:41
13 Oct 2009 13:45:41 Patrick Julicher replied:
Hi Michael,

Thanks for the download, but I would like to have a look at the live page you created, just like I would view a regular webpage.

Kind regards, Patrick
Replied 13 Oct 2009 14:59:44
13 Oct 2009 14:59:44 michael roselli replied:
Hello Patrick,
but I have not achieved anything yet, I was starting from the script that I sent you, if you can understand what is the error I'd be grateful.
Replied 13 Oct 2009 15:41:46
13 Oct 2009 15:41:46 Patrick Julicher replied:
Hi Michael,

Ok, Now I understand, sorry. I will have a look at the file and try to see what's going on.

Kind regards, Patrick
Replied 14 Oct 2009 10:11:50
14 Oct 2009 10:11:50 michael roselli replied:
HI Patrick,
ve discovered something new? I am proceeding with my project when I have the file manager ready to send you a copy
to have thee see
Replied 14 Oct 2009 10:16:17
14 Oct 2009 10:16:17 Patrick Julicher replied:
Hi Michael,

Good to see your photo. Know I know who I'm talking to. Didn't get time to look yesterday. Will defenitely have a look at it today. It would absolutely help if I could see what you created on the internet.

Kind regards, Patrick

Replied 14 Oct 2009 14:27:39
14 Oct 2009 14:27:39 michael roselli replied:
If you provide me a 'your email address I can send you the password for you to try the script on line. My email address is ******************
Replied 14 Oct 2009 15:08:32
14 Oct 2009 15:08:32 Patrick Julicher replied:
Hi Michael,

Please use the e-mail link below my photo to send the link to.

Kind regards, Patrick

Reply to this topic