Browse Source

휘파람보드 1.1.4

- 글 요약본을 가져오는 함수 추가
master
장선근 7 years ago
parent
commit
be2f6dcab8
  1. 13
      wheeparam/application/helpers/common_helper.php

13
wheeparam/application/helpers/common_helper.php

@ -1257,4 +1257,15 @@ function db_file_delete($table, $pk_column, $pk, $filepath_column)
$CI->db->set($filepath_column, ''); $CI->db->set($filepath_column, '');
$CI->db->where($pk_column, $pk); $CI->db->where($pk_column, $pk);
$CI->db->update($table); $CI->db->update($table);
}
}
/**
* 내용 요약본을 가져온다.
* @param string $post_content
* @param int $length
* @return string
*/
function get_post_summary($post_content="", $length=300)
{
return cut_str( trim( strip_tags($post_content) ) ,$length);
}
Loading…
Cancel
Save