[Skip Header and Navigation] [Jump to Main Content]

עיצוב רשימת קבצים מצורפים

במידה ואתם רוצים לעצב את הרשימה של הקבצים המצורפים כמו זה

אתם יכולים לבצע Override ל upload_attachments
יצרו מחיצה icons תחת ה theme, פתחו את ה tar המצורף לשם, הוסיפו icons נוספים לפי הצורך

הוסיפו את קטע הקוד הבא ל template.php

function phptemplate_upload_attachments($files) {
$header = array(t('Attachment'), t('לחץ להורדה'));
$rows = array();
foreach ($files as $file) {
$file = (object)$file;
if ($file->list && !$file->remove) {
// Generate valid URL for both existing attachments and preview of new attachments (these have 'upload' in fid)
$href = file_create_url((strpos($file->fid, 'upload') === FALSE ? $file->filepath : file_create_filename($file->filename, file_create_path())));
$text = $file->description ? $file->description : $file->filename;
$rows[] = array(theme('file_icon', $file) ,l($text, $href,array("title" => " גודל הקובץ :" . format_size($file->filesize))));
}
}
if (count($rows)) {
return theme('table', $header, $rows, array('id' => 'attachments'));
}
}

/**
* Theme file icon according to mime type
* an 'icons' directory should be placed inside your default files direcotry
* containing the file icons. Icon names should follow their Mime sub-type.
* Apart from the two generic types 'image' & 'text'
*
* @param file drupal file object
* @return HTML themed icon
*/
function phptemplate_file_icon($file) {
//Check if directory icons in current theme exists otherwise, no point, right
$icon_ext = '.png'; //Change your supported format png for example
$path = path_to_theme().'/icons';

if( !is_dir($path) ) {
return;
}
//Get filemime type act accordingly
$mime = explode('/', $file->filemime);
$type = $mime[0];
$sub_type = $mime[1];
$output = '';
$defult_icn = $path.'/default'.$icon_ext;
switch($type) {
case 'image':
$img_path = $path.'/image'.$icon_ext;
if( is_file($img_path) ){
$output .= theme_image($img_path, $file->filename, $file->description);
}
else if( is_file($defult_icn) ) {
$output .= theme_image($defult_icn, $file->filename, $file->description);
}
break;
case 'text':
$txt_path = $path.'/text'.$icon_ext;
if( is_file($txt_path) ){
$output .= theme_image($txt_path, $file->filename, $file->description);
}
else if( is_file($defult_icn) ) {
$output .= theme_image($defult_icn, $file->filename, $file->description);
}
break;
case 'application':
$app_path = $path.'/'.$sub_type.$icon_ext;
if( is_file($app_path) ){
$output .= theme_image($app_path, $file->filename, $file->description);
}
else if( is_file($defult_icn) ) {
$output .= theme_image($defult_icn, $file->filename, $file->description);
}
break;
default:
if( is_file($defult_icn) ) {
$output .= theme_image($defult_icn, $file->filename, $file->description);
}
break;
}
return $output;
}

AttachmentSize
attachments.txt2.78 ק"ב
attachments.tar10.5 ק"ב
אתר אינטרנט עם תכנים
האם אני צריך אתר תוכן דינאמי עם מערכת ניהול CMS?
אתר אינטרנט דרופל
היתרונות של דרופל לבניית אתרים עם תוכן דינאמי
DevArt - בניית אתרים בדרופל
למה DevArt מתאימה לבנות בשבילי את האתר בדרופל?

עדות לקוח

הגרעין התורני בלוד הוא הגדול ביותר בארץ, מה שמצריך ייצוג הולם באינטרנט.
באתר האינטרנט רצינו להשיג שתי מטרות עיקריות: כלפי חוץ - אתר יפה ומכובד שיציג את הגרעין ופעילויותיו, וכלפי פנים - אתר שישמש את הקהילה הגדלה והולכת של הגרעין במגוון תחומים.
בנינו מסמך דרישות מפורט וחיפשנו חברה מקצועית שתעמוד באתגר המשימות המורכבות שהאתר דרש.
אנחנו שמחים שמצאנו את DevArt. הם נתנו לנו הרבה תובנות ורעיונות לגבי הדרך הנכונה לבנות אתר קהילתי, ומצאו לנו פתרונות יצירתיים לכל מיני דרישות לא שגרתיות שהיו לנו. בעיקר אנחנו חייבים להם את שם ה-domain המוצלח: glod.org.il.
במהלך העבודה היו לנו דרישות שהשתנו חדשים לבקרים ודרישות חדשות שחשבנו עליהם. DevArt היו תמיד גמישים וסבלניים לכל השינויים. קיבלנו הרגשה שהצלחנו למצוא חברה הגונה ומקצועית. גם במהלך העליה לאוויר ולאחריה, הטיפול המשיך להיות מסור - כל בעיה שהתעוררה טופלה במהירות וביעילות.

אז בשם הגרעין התורני בלוד - תודה רבה!

מוטי רגב וצבי שרף - מנהלי האתר