skala
Juan Carlos Raña 16 years ago
commit 63c52c2a2a
  1. 36
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_details_listing.php
  2. 24
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php
  3. 26
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_get_file_listing.php
  4. 76
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajaxfilemanager.php
  5. 46
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.manager.php
  6. 1172
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.pagination.php
  7. 19
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/jscripts/ajaxfilemanager_c.js
  8. 12
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/theme/default/css/fckeditor.css
  9. 0
      main/lang/bulgarian/admin.inc.php
  10. 0
      main/lang/bulgarian/exercice.inc.php
  11. 0
      main/lang/bulgarian/gradebook.inc.php
  12. 0
      main/lang/bulgarian/registration.inc.php
  13. 0
      main/lang/bulgarian/tracking.inc.php
  14. 0
      main/lang/bulgarian/trad4all.inc.php
  15. 0
      main/lang/english/exercice.inc.php
  16. 0
      main/lang/english/registration.inc.php
  17. 0
      main/lang/english/tracking.inc.php
  18. 0
      main/lang/english/wiki.inc.php
  19. 0
      main/lang/english/work.inc.php
  20. 0
      main/lang/french/admin.inc.php
  21. 0
      main/lang/french/dropbox.inc.php
  22. 0
      main/lang/french/exercice.inc.php
  23. 0
      main/lang/french/registration.inc.php
  24. 0
      main/lang/french/survey.inc.php
  25. 0
      main/lang/french/tracking.inc.php
  26. 0
      main/lang/french/trad4all.inc.php
  27. 0
      main/lang/french/work.inc.php
  28. 0
      main/lang/galician/admin.inc.php
  29. 0
      main/lang/galician/help.inc.php
  30. 0
      main/lang/galician/index.inc.php
  31. 0
      main/lang/galician/install.inc.php
  32. 0
      main/lang/galician/learnpath.inc.php
  33. 0
      main/lang/galician/notification.inc.php
  34. 0
      main/lang/galician/registration.inc.php
  35. 0
      main/lang/galician/reservation.inc.php
  36. 0
      main/lang/galician/scorm.inc.php
  37. 0
      main/lang/galician/slideshow.inc.php
  38. 0
      main/lang/galician/survey.inc.php
  39. 0
      main/lang/galician/tracking.inc.php
  40. 0
      main/lang/galician/trad4all.inc.php
  41. 0
      main/lang/galician/userInfo.inc.php
  42. 0
      main/lang/galician/wiki.inc.php
  43. 0
      main/lang/galician/work.inc.php
  44. 0
      main/lang/italian/admin.inc.php
  45. 0
      main/lang/italian/registration.inc.php
  46. 0
      main/lang/italian/tracking.inc.php
  47. 0
      main/lang/italian/trad4all.inc.php
  48. 0
      main/lang/italian/work.inc.php
  49. 0
      main/lang/slovenian/admin.inc.php
  50. 0
      main/lang/slovenian/index.inc.php
  51. 0
      main/lang/slovenian/trad4all.inc.php
  52. 0
      main/lang/slovenian/userInfo.inc.php
  53. 0
      main/lang/spanish/admin.inc.php
  54. 0
      main/lang/spanish/document.inc.php
  55. 0
      main/lang/spanish/group.inc.php
  56. 0
      main/lang/spanish/registration.inc.php
  57. 0
      main/lang/spanish/tracking.inc.php
  58. 0
      main/lang/spanish/trad4all.inc.php
  59. 0
      main/lang/spanish/work.inc.php

@ -6,7 +6,7 @@
<th width="10" class="fileColumns">&nbsp;</th>
<th class="docName"><?php echo LBL_NAME; ?></th>
<th width="70" class="fileColumns"><?php echo LBL_SIZE; ?></th>
<!-- hide while implementing this Dokeos -->
<!-- hide while implementing this Chamilo -->
<!--<th class="fileColumns"><?php // echo LBL_MODIFIED; ?></th> -->
</tr>
</thead>
@ -21,15 +21,15 @@
$css = ($css == "" || $css == "even"?"odd":"even");
$strDisabled = ($file['is_writable']?"":" disabled");
$strClass = ($file['is_writable']?"left":" leftDisabled");
///First step for hidden some type of Dokeos files and folders
///First step for hidden some type of Chamilo files and folders
//Juan Carlos Raña
//hidden files and folders deleted by Dokeos. Hidde folders css, hotpotatoes, chat_files
$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
$deleted_by_dokeos_folder='_DELETED_';
$css_folder_dokeos='css';
$hotpotatoes_folder_dokeos='HotPotatoes_files';
$chat_files_dokeos='chat_files';
//hidden files and folders deleted by Chamilo. Hidde folders css, hotpotatoes, chat_files
$deleted_by_Chamilo_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
$deleted_by_Chamilo_folder='_DELETED_';
$css_folder_Chamilo='css';
$hotpotatoes_folder_Chamilo='HotPotatoes_files';
$chat_files_Chamilo='chat_files';
//show group's directory only if I'm member. Or if I'm a teacher. TODO: check groups not necessary because the student dont have access to main folder documents (only to document/group or document/shared_folder). Teachers can access to all groups ?
$group_folder='_groupdocs';
@ -45,13 +45,10 @@
}
//show icon sharedfolder
$shared_folder='shared folder'; //'shared folder' not 'shared_folder' because in $file['name'] _ is replaced with blank see class.manager.php
///Second step: hiding as the case
//Juan Carlos Raña
if((!ereg($deleted_by_dokeos_file, $file['name']) || !ereg($deleted_by_dokeos_folder, $file['path'])) && !ereg($css_folder_dokeos, $file['path']) && !ereg($hotpotatoes_folder_dokeos, $file['path']) && !ereg($chat_files_dokeos, $file['path']) && $show_doc_group && $file['name'][0]!='.')
if((!ereg($deleted_by_Chamilo_file, $file['name']) && !ereg($deleted_by_Chamilo_folder, $file['path'])) && !ereg($css_folder_Chamilo, $file['path']) && !ereg($hotpotatoes_folder_Chamilo, $file['path']) && !ereg($chat_files_Chamilo, $file['path']) && $show_doc_group && $file['name'][0]!='.')
{
if($file['type'] == 'file')
@ -60,11 +57,11 @@
?>
<tr class="<?php echo $css; ?>" id="row<?php echo $count; ?>" >
<td align="center" id="tdz<?php echo $count; ?>"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input type="checkbox" name="check[]" id="cb<?php echo $count; ?>" value="<?php echo $file['path']; ?>" <?php echo $strDisabled; ?> /></td>
<td align="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><span class="<?php echo $file['cssClass']; ?>">&nbsp;</span></a></td><!-- Juan Carlos Raña Fix for Dokeos: On the path I put a directory up echo "../".$ file [ 'path'], what makes good show when pressed next on window preview, don't only one image -->
<td align="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><span class="<?php echo $file['cssClass']; ?>">&nbsp;</span></a></td><!-- Juan Carlos Raña Fix for Chamilo: On the path I put a directory up echo "../".$ file [ 'path'], what makes good show when pressed next on window preview, don't only one image -->
<td class="<?php echo $strClass; ?> docName" id="tdnd<?php echo $count; ?>"><a id="aa<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><?php echo $file['name']; ?></a></td>
<td class="docInfo" id="tdrd<?php echo $count; ?>"><?php echo transformFileSize($file['size']); ?></td>
<!-- hide while implementing this Dokeos -->
<!-- hide while implementing this Chamilo -->
<!--<td class="docInfo" id="tdth<?php //echo $count; ?>"><?php //echo @date(DATE_TIME_FORMAT,$file['mtime']); ?></td> -->
</tr>
@ -78,13 +75,14 @@
<?php
if(ereg($shared_folder, $file['name']))
if(preg_match('/shared_folder/', basename($file['path'])))
{
//add icon in ajaxfilemanager if sharedfolder is in Dokeos
//add icon into ajaxfilemanager if sharedfolder is into Chamilo
?>
<td lign="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" <?php echo $file['cssClass'] == 'filePicture'?'rel="ajaxPhotos"':''; ?> ><span class="<?php echo ($file['file']&&$file['subdir']?$file['cssClass']:"folderShared"); ?>">&nbsp;</span></a></td>
<?php
}
}
else
{
?>
@ -94,13 +92,13 @@
?>
<td class="<?php echo $strClass; ?> docName" id="tdnd<?php echo $count; ?>"><a id="aa<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><?php echo $file['name']; ?></a></td>
<td class="docInfo" id="tdrd<?php echo $count; ?>">&nbsp;</td>
<!-- hide while implementing this Dokeos -->
<!-- hide while implementing this Chamilo -->
<!--<td class="docInfo" id="tdth<?php// echo $count; ?>"><?php //echo @date(DATE_TIME_FORMAT,$file['mtime']); ?></td> -->
</tr>
<?php
}
}//end if hidden files and folders deleted by Dokeos
}//end if hidden files and folders deleted by Chamilo
$count++;
}

@ -6,16 +6,16 @@
foreach($fileList as $file)
{
///First step for hidden some type of Dokeos files and folders
///First step for hidden some type of Chamilo files and folders
//Juan Carlos Ra<EFBFBD>a
//hidden files and folders deleted by Dokeos. Hidde folders css, hotpotatoes, chat
//hidden files and folders deleted by Chamilo. Hidde folders css, hotpotatoes, chat
$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
$deleted_by_dokeos_folder='_DELETED_';
$css_folder_dokeos='css';
$hotpotatoes_folder_dokeos='HotPotatoes_files';
$chat_files_dokeos='chat_files';
$deleted_by_Chamilo_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
$deleted_by_Chamilo_folder='_DELETED_';
$css_folder_Chamilo='css';
$hotpotatoes_folder_Chamilo='HotPotatoes_files';
$chat_files_Chamilo='chat_files';
//hidden directory of the group if the user is not a member of the group
$group_folder='_groupdocs';
@ -37,14 +37,14 @@
///Second step: hiding as the case
//Juan Carlos Ra<EFBFBD>a
if((!ereg($deleted_by_dokeos_file, $file['name']) || !ereg($deleted_by_dokeos_folder, $file['path'])) && !ereg($css_folder_dokeos, $file['path']) && !ereg($hotpotatoes_folder_dokeos, $file['path']) && !ereg($chat_files_dokeos, $file['path']) && $show_doc_group && $file['name'][0]!='.')
if((!ereg($deleted_by_Chamilo_file, $file['name']) && !ereg($deleted_by_Chamilo_folder, $file['path'])) && !ereg($css_folder_Chamilo, $file['path']) && !ereg($hotpotatoes_folder_Chamilo, $file['path']) && !ereg($chat_files_Chamilo, $file['path']) && $show_doc_group && $file['name'][0]!='.')
{
?>
<dl class="thumbnailListing" id="dl<?php echo $count; ?>">
<?php
if(ereg($shared_folder, $file['name']))
{ //add icon in ajaxfilemanager if sharedfolder is in Dokeos
if(preg_match('/shared_folder/', basename($file['path'])))
{ //add icon into ajaxfilemanager if sharedfolder is in Chamilo
?>
<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' && empty($file['file']) || empty($file['subdir'])?'folderShared':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
@ -78,10 +78,10 @@
</dt>
<dd id="dd<?php echo $count; ?>" class="thumbnailListing_info"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input id="cb<?php echo $count; ?>" type="checkbox" name="check[]" <?php echo ($file['is_writable']?'':'disabled'); ?> class="radio" value="<?php echo $file['path']; ?>" />
<a <?php echo ($file['cssClass']== 'filePicture'?'rel="orgImg"':''); ?> href="<?php echo "../".$file['path']; ?>" title="<?php echo $file['name']; ?>" id="a<?php echo $count; ?>"><?php echo shortenFileName($file['name']); ?></a></dd><!-- Juan Carlos Ra<EFBFBD>a Fix for Dokeos: On the path I put a directory up echo "../".$ file [ 'path'], what makes good show when pressed next on window preview, don't only one image -->
<a <?php echo ($file['cssClass']== 'filePicture'?'rel="orgImg"':''); ?> href="<?php echo "../".$file['path']; ?>" title="<?php echo $file['name']; ?>" id="a<?php echo $count; ?>"><?php echo shortenFileName($file['name']); ?></a></dd><!-- Juan Carlos Ra<EFBFBD>a Fix for Chamilo: On the path I put a directory up echo "../".$ file [ 'path'], what makes good show when pressed next on window preview, don't only one image -->
</dl>
<?php
}//end if hidden files and folders deleted by Dokeos
}//end if hidden files and folders deleted by Chamilo
$count++;
}
?>

@ -6,12 +6,12 @@
* @link www.phpletter.com
* @since 22/May/2007
*
* Modify for Dokeos
* @author Juan Carlos Ra�a
* Modify for Chamilo
* @author Juan Carlos Raña Trabado
* @since 31/December/2008
*/
include ('../../../../../../inc/global.inc.php'); // Integrating with Dokeos
include ('../../../../../../inc/global.inc.php'); // Integrating with Chamilo
if(!isset($manager))
{
@ -22,7 +22,7 @@
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
include_once(CLASS_PAGINATION);
$pagination = new pagination(false);
//$search_folder = str_replace("'","",$_GET['search_folder']); //TODO:check if this line is necessary juan carlos raña
//$search_folder = str_replace("'","",$_GET['search_folder']); //TODO:check if this line is necessary Juan Carlos Raña
if(!empty($_GET['search']))
{
include_once(CLASS_SEARCH);
@ -69,14 +69,14 @@
$pagination->setLastText(PAGINATION_LAST);
$pagination->setLimit(!empty($_GET['limit'])?intval($_GET['limit']):CONFIG_DEFAULT_PAGINATION_LIMIT);
echo $pagination->getPaginationHTML();
///////Dokeos fix for count hidden folders
///////Chamilo fix for count hidden folders
$count_hideItem =0;
$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
$deleted_by_dokeos_folder='_DELETED_';
$css_folder_dokeos='css';
$hotpotatoes_folder_dokeos='HotPotatoes_files';
$chat_files_dokeos='chat_files';
$deleted_by_Chamilo_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
$deleted_by_Chamilo_folder='_DELETED_';
$css_folder_Chamilo='css';
$hotpotatoes_folder_Chamilo='HotPotatoes_files';
$chat_files_Chamilo='chat_files';
//end previous fix for count hidden folders
@ -91,7 +91,7 @@
}
echo "};\n";
// moved below for Dokeos integration $fileList = array_slice($fileList, $pagination->getPageOffset(), $pagination->getLimit());
// moved below for Chamilo integration $fileList = array_slice($fileList, $pagination->getPageOffset(), $pagination->getLimit());
echo 'numRows = ' . sizeof($fileList) . ";\n";
echo "files = {\n";
$count = 1;
@ -112,7 +112,7 @@
}
if((!ereg($deleted_by_dokeos_file, $file['name']) || !ereg($deleted_by_dokeos_folder, $file['path'])) || ereg($css_folder_dokeos, $file['path']) || ereg($hotpotatoes_folder_dokeos, $file['path']) || ereg($chat_files_dokeos, $file['path']) || $hide_doc_group || $file['name'][0]=='.')//Dokeos fix for hidden items.
if((!ereg($deleted_by_Chamilo_file, $file['name']) || !ereg($deleted_by_Chamilo_folder, $file['path'])) || ereg($css_folder_Chamilo, $file['path']) || ereg($hotpotatoes_folder_Chamilo, $file['path']) || ereg($chat_files_Chamilo, $file['path']) || $hide_doc_group || $file['name'][0]=='.')//Chamilo fix for hidden items.
{
$count_hideItem=$count_hideItem+1;
@ -136,7 +136,7 @@
echo (($j++ > 1)?",":'') . "'url':'" . getFileUrl($file['path']) . "'";
echo "}\n";
}
$fileList = array_slice($fileList, $pagination->getPageOffset(), $pagination->getLimit());//Dokeos fix for hidden files added +$count_hideItem
$fileList = array_slice($fileList, $pagination->getPageOffset(), $pagination->getLimit());//Chamilo fix for hidden files added +$count_hideItem
echo "};</script>\n";
if(!empty($_GET['view']))

@ -5,13 +5,13 @@
* @link www.phpletter.com
* @since 22/May/2007
*
* Modify system config setting for Dokeos
* @author Juan Carlos Raña
* Modify system config setting for Chamilo
* @author Juan Carlos Raña Trabado
* @since 31/December/2008
*/
include ('../../../../../../inc/global.inc.php'); // Integrating with Dokeos
api_block_anonymous_users();// from Dokeos
include ('../../../../../../inc/global.inc.php'); // Integrating with Chamilo
api_block_anonymous_users();// from Chamilo
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
//$session->gc(); // Disabled for integration with Chamilo
@ -88,6 +88,24 @@
var globalSettings = {'upload_init':false};
var queryString = '<?php echo makeQueryString(array('path')); ?>';
var paths = {'root':'<?php echo addTrailingSlash(backslashToSlash(CONFIG_SYS_ROOT_PATH)); ?>', 'root_title':'<?php echo LBL_FOLDER_ROOT; ?>'};
<!-- Chamilo hack for breadcrumb into shared folders -->
var shared_folder = '<?php echo get_lang('SharedDocumentsDirectory');?>';
<?php
$course_session = explode('_', basename($currentPath));
$course_session = strtolower($course_session[sizeof($course_session) - 1]);
?>
var shared_folder_session = '<?php echo get_lang('SharedDocumentsDirectory').' ('.api_get_session_name($course_session).')';?>';
<?php
//$userinfo=Database::get_user_info_from_id(substr(basename($folderInfo['path']), 8)); // problem with $folderInfo['path'] does not refresh?>
//var shared_user_folder = '<?php //echo api_get_person_name($userinfo['firstname'], $userinfo['lastname']);?>';
var shared_user_folder = '<?php echo get_lang('User');?>';
<!--end hack -->
var parentFolder = {};
var urls = {
'upload':'<?php echo CONFIG_URL_UPLOAD; ?>',
@ -209,16 +227,16 @@ $(document).ready(
<body style="background-color:#E8E8E8;" dir="<?php echo CONFIG_LANG_TEXT_DIRECTION_DEFAULT; ?>"><!-- hack for lang default Chamilo -->
<div id="wrapper">
<div id="header">
<dl id="currentFolderInfo">
<dl id="currentFolderInfo">
<dt><?php echo LBL_CURRENT_FOLDER_PATH; ?></dt>
<dt id="currentFolderPath"><?php echo $folderInfo['path']; ?></dt><!-- hack for breadcrumb for Dokeos change <dd> by <dt> -->
<dt id="currentFolderPath"><?php echo $folderInfo['path']; ?></dt><!-- hack for breadcrumb for Chamilo change <dd> by <dt> -->
</dl>
<div id="viewList">
<label><?php echo LBL_BTN_VIEW_OPTIONS; ?></label>
<?php
<?php
foreach($views as $k=>$v)
{
?>
@ -295,14 +313,14 @@ $(document).ready(
</div>
<div id="body">
<div id="rightCol">
<?php
if(CONFIG_LOAD_DOC_LATTER )
{
$currentPath = getCurrentFolderPath();
?>
<script type="text/javascript">
parentFolder = {path:'<?php echo getParentFolderPath($currentPath); ?>'};
currentFolder = {'friendly_path':'<?php echo transformFilePath($currentPath); ?>'};
@ -333,7 +351,7 @@ $(document).ready(
<div id="leftCol">
<fieldset id="folderFieldSet" >
@ -343,7 +361,7 @@ $(document).ready(
<tr>
<th><?php echo LBL_FOLDER_PATH; ?></th>
<td colspan="3" id="folderPath"><?php echo transformFilePath($folderInfo['path']); ?></td>
</tr>
</tr>
<tr>
<th><?php echo LBL_FOLDER_CREATED; ?></th>
<td colspan="3" id="folderCtime"><?php echo (!empty($folderInfo['ctime'])?date(DATE_TIME_FORMAT,$folderInfo['ctime']):'&nbsp;') ; ?></td>
@ -351,7 +369,7 @@ $(document).ready(
</tr>
<tr>
<th><?php echo LBL_FOLDER_MODIFIED; ?></th>
<!-- comment these lines while integrating into dokeos -->
<!-- comment these lines while integrating into Chamilo -->
<th><?php //echo LBL_FOLDER_MODIFIED; ?></th>
<!-- <td colspan="3" id="folderMtime"><?php //echo (!empty($folderInfo['mtime'])?date(DATE_TIME_FORMAT,$folderInfo['mtime']):'&nbsp;'); ?></td> -->
</tr>
@ -366,7 +384,7 @@ $(document).ready(
</tr>
<tr>
<!-- comment these lines while integrating into dokeos -->
<!-- comment these lines while integrating into Chamilo -->
<th><?php // echo LBL_FOLDER_WRITABLE; ?></th>
<!-- <td id="folderWritable"><span class="<?php //echo (isset($folderInfo['is_readable'])?($folderInfo['is_readable']?'flagYes':'flagNo'):'&nbsp;'); ?>">&nbsp;</span></td> -->
<th><?php // echo LBL_FOLDER_READABLE; ?></th>
@ -389,7 +407,7 @@ $(document).ready(
</tr>
<tr>
<!-- comment these lines while integrating into dokeos -->
<!-- comment these lines while integrating into Chamilo -->
<th><?php //echo LBL_FILE_MODIFIED; ?></th>
<!--<td colspan="3" id="fileMtime"></td> -->
</tr>
@ -404,7 +422,7 @@ $(document).ready(
<td colspan="3" id="fileType"></td>
</tr>
<tr>
<!-- comment these lines while integrating into dokeos -->
<!-- comment these lines while integrating into Chamilo -->
<th><?php //echo LBL_FILE_WRITABLE; ?></th>
<!--<td id="fileWritable"><span class="flagYes">&nbsp;</span></td> -->
<th><?php //echo LBL_FILE_READABLE; ?></th>
@ -434,7 +452,7 @@ $(document).ready(
<tbody>
<tr>
<td>
<!-- comment these lines while integrating into dokeos -->
<!-- comment these lines while integrating into Chamilo -->
<b><?php //echo LBL_SEARCH_NAME; ?></b> <br />
<input type="text" class="input inputSearch" name="search_name" id="search_name" />
</td>
@ -442,7 +460,7 @@ $(document).ready(
</tr>
<tr>
<td >
<!-- comment these lines while integrating into dokeos -->
<!-- comment these lines while integrating into Chamilo -->
<b><?php // echo LBL_SEARCH_FOLDER; ?></b><br />
<span id="searchFolderContainer">
<?php
@ -462,17 +480,17 @@ $(document).ready(
}else
{
?>
<select class="input inputSearch" name="search_folder" id="search_folder">
<select class="input inputSearchSelect" name="search_folder" id="search_folder"><!-- Chamilo integrating, modify name class for disable by css -->
<?php
foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
{
//////////////
if(hideFolderName($k))
{
//shows only those permitted by Dokeos
//show only those permitted by Chamilo
?>
<option value="<?php echo $v; ?>" <?php echo (removeTrailingSlash(backslashToSlash(($folderInfo['path']))) == removeTrailingSlash(backslashToSlash(($v)))?' selected="selected"':''); ?>><?php echo hideFolderName(shortenFileName($k, 30)); // shows only those permitted by Dokeos
<option value="<?php echo $v; ?>" <?php echo (removeTrailingSlash(backslashToSlash(($folderInfo['path']))) == removeTrailingSlash(backslashToSlash(($v)))?' selected="selected"':''); ?>><?php echo hideFolderName(shortenFileName($k, 30));
?></option>
<?php
@ -492,16 +510,16 @@ $(document).ready(
<!--<input type="text" class="input inputMtime" name="search_mtime_from" id="search_mtime_from" value="<?php //echo (!empty($_GET['search_mtime_from'])?$_GET['search_mtime_from']:''); ?>" /> -->
<!--<span class="leftToRightArrow">&nbsp;</span> -->
<!--<input type="text" class="input inputMtime" name="search_mtime_to" id="search_mtime_to" value="<?php //echo (!empty($_GET['search_mtime_to'])?$_GET['search_mtime_to']:''); ?>" /> -->
<!--This lines replace above lines while integrating into dokeos -->
<!--This lines replace above lines while integrating into Chamilo -->
<input type="hidden" name="search_mtime_from" id="search_mtime_from" value="<?php //echo (!empty($_GET['search_mtime_from'])?$_GET['search_mtime_from']:''); ?>" />
<input type="hidden" name="search_mtime_to" id="search_mtime_to" value="<?php //echo (!empty($_GET['search_mtime_to'])?$_GET['search_mtime_to']:''); ?>" />
<!--</td></tr>
<tr>
<td> <!-- comment these lines while integrating into dokeos -->
<td> <!-- comment these lines while integrating into Chamilo -->
</td><td><!--add a col while integrating -->
<b><?php // echo LBL_SEARCH_RECURSIVELY; ?></b>&nbsp;&nbsp;
<!--change for Dokeos recursively by default -->
<!--change for Chamilo recursively by default -->
<!-- <input type="radio" name="search_recursively" value="1" id="search_recursively_1" class="radio" <?php //echo (empty($_GET['search_recursively'])?'checked="checked"':''); ?> /> <?php //echo LBL_RECURSIVELY_YES; ?> -->
<!-- <input type="radio" name="search_recursively" value="0" id="search_recursively_0" class="radio" <?php //echo (!empty($_GET['search_recursively'])?'checked="checked"':''); ?> /> <?php //echo LBL_RECURSIVELY_NO; ?> -->
</td>
@ -515,7 +533,7 @@ $(document).ready(
<p class="searchButtons">
<span class="left" id="linkClose" style="display:none">
<!-- comment these lines while integrating into Dokeos -->
<!-- comment these lines while integrating into Chamilo -->
<!--<input type="button" value="<?php // echo LBL_ACTION_CLOSE; ?>" onclick="return cancelSelectFile();" class="button"> -->
</span>
<span class="right" id="linkSearch">
@ -533,8 +551,6 @@ $(document).ready(
</div>
<div class="clear"></div>
<div id="ajaxLoading" style="display:none"><img class="ajaxLoadingImg" src="theme/<?php echo CONFIG_THEME_NAME; ?>/images/ajaxLoading.gif" /></div>
<div id="winUpload" style="display:none">
@ -728,7 +744,7 @@ $(document).ready(
<ul>
<li><a href="#" class="contentMenuItem" id="menuSelect"><?php echo MENU_SELECT; ?></a></li>
<li><a href="#" class="contentMenuItem" id="menuPreview"><?php echo MENU_PREVIEW; ?></a></li>
<!-- <li><a href="#" class="contentMenuItem" id="menuDownload"><?php echo MENU_DOWNLOAD; ?></a></li> Dokeos temporarily disable contextual menu download -->
<!-- <li><a href="#" class="contentMenuItem" id="menuDownload"><?php echo MENU_DOWNLOAD; ?></a></li> Chamilo temporarily disable contextual menu download -->
<li><a href="#" class="contentMenuItem" id="menuRename"><?php echo MENU_RENAME; ?></a></li>
<li><a href="#" class="contentMenuItem" id="menuEdit"><?php echo MENU_EDIT; ?></a></li>
<li><a href="#" class="contentMenuItem" id="menuCut"><?php echo MENU_CUT; ?></a></li>

@ -5,10 +5,11 @@
* @link www.phpletter.com
* @since 22/April/2007
*
* Modify for Dokeos
* Modify for Chamilo
* @author Juan Carlos Raña
* @since 31/December/2008
*/
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.file.php");
class manager
{
@ -89,22 +90,33 @@ class manager
}
if(is_dir($this->currentFolderPath))
{
$file = new file($this->currentFolderPath);
$folderInfo = $file->getFileInfo();
if(sizeof($folderInfo))
{
//for Dokeos in a name folder, replace num user by user names
if(ereg('sf_user_', basename($this->currentFolderPath)))
//for Chamilo in a name folder, replace num user by user names
if(preg_match('/sf_user_/',basename($this->currentFolderPath)))
{
$userinfo=Database::get_user_info_from_id(substr(basename($this->currentFolderPath), 8));
$this->currentFolderInfo['name']=api_get_person_name($userinfo['firstname'], $userinfo['lastname']);
}
else
{
$this->currentFolderInfo['name']=str_replace('_',' ',basename($this->currentFolderPath));//for Dokeos. Prevent long directory name
$this->currentFolderInfo['name']=str_replace('_',' ',basename($this->currentFolderPath));//for Chamilo. Prevent long directory name
}
if(preg_match('/shared_folder/', basename($this->currentFolderPath)))
{
$this->currentFolderInfo['name']=get_lang('SharedDocumentsDirectory');
}
//end Chamilo
if(preg_match('/shared_folder_session_/',basename($this->currentFolderPath)))
{
$session = explode('_', basename($this->currentFolderPath));
$session = strtolower($session[sizeof($session) - 1]);
$this->currentFolderInfo['name']=get_lang('SharedDocumentsDirectory').' ('.api_get_session_name($session).')*';
}
//end Chamilo
$this->currentFolderInfo['subdir']=0;
$this->currentFolderInfo['file']=0;
$this->currentFolderInfo['ctime']=$folderInfo['ctime'];
@ -184,11 +196,11 @@ class manager
if(is_dir($path) && isListingDocument($path) )
{
$this->currentFolderInfo['subdir']++;
//fix count left folders for Dokeos
$deleted_by_dokeos_folder='_DELETED_';
$css_folder_dokeos='css';
$hotpotatoes_folder_dokeos='HotPotatoes_files';
$chat_files_dokeos='chat_files';
//fix count left folders for Chamilo
$deleted_by_Chamilo_folder='_DELETED_';
$css_folder_Chamilo='css';
$hotpotatoes_folder_Chamilo='HotPotatoes_files';
$chat_files_Chamilo='chat_files';
//show group's directory only if I'm member. Or if I'm a teacher. TODO: check groups not necessary because the student dont have access to main folder documents (only to document/group or document/shared_folder). Teachers can access to all groups ?
$group_folder='_groupdocs';
$hide_doc_group=false;
@ -202,11 +214,11 @@ class manager
}
if(ereg($deleted_by_dokeos_folder, $path)|| ereg($css_folder_dokeos, $path) || ereg($hotpotatoes_folder_dokeos, $path) || ereg($chat_files_dokeos, $path) || $hide_doc_group || $file[0]=='.')
if(ereg($deleted_by_Chamilo_folder, $path)|| ereg($css_folder_Chamilo, $path) || ereg($hotpotatoes_folder_Chamilo, $path) || ereg($chat_files_Chamilo, $path) || $hide_doc_group || $file[0]=='.')
{
$this->currentFolderInfo['subdir']=$this->currentFolderInfo['subdir']-1;
}
//end fix for Dokeos
//end fix for Chamilo
if(!$this->calculateSubdir)
{
@ -234,13 +246,13 @@ class manager
}
$this->currentFolderInfo['size'] += $tem['size'];
$this->currentFolderInfo['file']++;
//fix count left files for Dokeos
$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
if(ereg($deleted_by_dokeos_file, $tem['name']) || $tem['name'][0]=='.')
//fix count left files for Chamilo
$deleted_by_Chamilo_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
if(ereg($deleted_by_Chamilo_file, $tem['name']) || $tem['name'][0]=='.')
{
$this->currentFolderInfo['file']=$this->currentFolderInfo['file']-1;
}
///end fix for Dokeos
///end fix for Chamilo
$tem['path'] = backslashToSlash($path);
$tem['type'] = "file";
$tem['flag'] = $flag;

@ -196,7 +196,24 @@ return'';};function parseCurrentFolder()
{if(i==0)
{parentPath+=paths.root;str+='/<a href="'+appendQueryString(url,'path='+parentPath,['path'])+'"><span class="folderRoot">'+paths.root_title+'</span></a>'}else
{if(folders[i]!='')
{parentPath+=folders[i]+'/';str+='/<a href="'+appendQueryString(url,'path='+parentPath,['path'])+'"><span class="folderSub">'+folders[i]+'</span></a>';}}}
{
//hack for Chamilo: rename breadcrumbs into shared folders
if(folders[i]=='shared_folder')
{
parentPath+=folders[i]+'/';str+='/<a href="'+appendQueryString(url,'path='+parentPath,['path'])+'"><span class="folderSub">'+shared_folder+'</span></a>';
}
else if (folders[i].indexOf('shared_folder_session_')!=-1) {
parentPath+=folders[i]+'/';str+='/<a href="'+appendQueryString(url,'path='+parentPath,['path'])+'"><span class="folderSub">'+shared_folder_session+'</span></a>';
}
else if (folders[i].indexOf('sf_user_')!=-1) {
parentPath+=folders[i]+'/';str+='/<a href="'+appendQueryString(url,'path='+parentPath,['path'])+'"><span class="folderSub">'+shared_user_folder+'</span></a>';
}
else{
parentPath+=folders[i]+'/';str+='/<a href="'+appendQueryString(url,'path='+parentPath,['path'])+'"><span class="folderSub">'+folders[i]+'</span></a>';
}
//end hack
}}}
$('#currentFolderPath').empty().append(str);$('#currentFolderPath a').each(function()
{doEnableFolderBrowsable(this,$(this).attr('href'));});};function parsePagination()
{$('p.pagination a[@id!=pagination_parent_link]').each(function()

@ -1,4 +1,4 @@
/*~~~~~~ Hack for Dokeos ~~~~~~~~*/
/*~~~~~~ Hack for Chamilo ~~~~~~~~*/
/*~~~~~~Global Setting ~~~~~~~~*/
html, body{
margin: 0px;
@ -103,6 +103,9 @@ overflow-x: hidden;
.radio{
background-color:none;
}
.inputSearchSelect{
visibility:hidden;
}
.calendar_trigger{
background:none;
border:none;
@ -300,7 +303,6 @@ span.fileZip{background-image:url(../images/small_icon/fileZip.png);}
span.folderShared{background-image:url(../images/small_icon/folderShared.png);}
/* big icon */
dt.folderEmpty, dt.folder, dt.folderParent,
dt.fileUnknown, dt.fileText, dt.fileWord,
@ -419,10 +421,11 @@ p.pagination{
border-bottom-style: solid;
border-bottom-color: #FFFFFF;
}
#pagination_parent_link
{
background: url(../images/go_parent.png) no-repeat 100% 50%;
padding: 2px 6px 2px 10px;
padding: 2px 30px 2px 370px;
}
a.pagination_first,
a.pagination_previous,
@ -508,6 +511,9 @@ a.pagination_active{font-weight: bold; color: #CC0000;}
}
.search_folder{
visibility:hidden;
}
/** Detail View */
#tableList{
font-size:100%;

Loading…
Cancel
Save