设置Drupal附件表的主题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了设置Drupal附件表的主题相关的知识,希望对你有一定的参考价值。
Create theme override file: `upload_attachments.tpl.php` in your theme directory.[CSS styles](http://snipplr.com/view/11848)
<?php /** * Themed attachments table */ foreach ($files as $file) { // Quick fix. Should use some kind of make_safe_for_css() function. $href = check_url(($file->fid ? file_create_url($file->filepath) : url(file_create_filename($file->filename, file_create_path())))); /* To do: if (!empty($file->description)) { $text = check_plain($file->description) . '<br /><span class="filename">'.$file->filename.'</span>'; } else { $text = check_plain($file->filename); } */ $text = check_plain($file->description ? $file->description : $file->filename); // Because the drupal format_size function doesn't round far enough to be smooth. $suffix = t('bytes'); if ($size >= 1024) { $suffix = t('KB'); } if ($size >= 1024) { $suffix = t('MB'); } if ($type == 'jpeg' ) { } else { } } } print '<div class="attachments">'. theme('table', $header, $rows, array('class' => 'attachments'), 'Downloadable files') .'</div>'; }
以上是关于设置Drupal附件表的主题的主要内容,如果未能解决你的问题,请参考以下文章