2009/09/29

古いファイルの圧縮を無効に

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Volume Caches\Compress old files

2009/09/03

Drupal ブログの最新記事の件数

/modules/blog/blog.module


/**
* Implementation of hook_block().
*
* Displays the most recent 10 blog titles.
*/
function blog_block($op = 'list', $delta = 0) {
global $user;
if ($op == 'list') {
$block[0]['info'] = t('Recent blog posts');
return $block;
}
else if ($op == 'view') {
if (user_access('access content')) {
$result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, 10);
if ($node_title_list = node_title_list($result)) {
$block['content'] = $node_title_list;
$block['content'] .= theme('more_link', url('blog'), t('Read the latest blog entries.'));
$block['subject'] = t('Recent blog posts');
return $block;
}
}
}
}

コメントはこっち
Drupal.0829.info | Drupal についての Note

FCKeditorのいろいろメモ

内蔵ブラウザをWebFMやImageAssistとフォルダ連携させるつもり
/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php

// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/sites/default/files/' ;

$Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ;
$Config['DeniedExtensions']['Image'] = array() ;
$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'images/' ;
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'images/' ;
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;