답변 2개 / 댓글 12개
채택된 답변
+20 포인트
$str = $view['wr_content'];
$str2 = preg_replace('/https?:\/\/[\w\-\.!~#?&=+\*\'"(),\/]+/','<a href="$0">$0</a>',$str);
echo $str2;
답변에 대한 댓글 9개
[code]
<?php echo get_view_thumbnail(na_view($view)); // 글내용 출력 ?>
[/code]
->
[code]
<?php
$view['content'] = preg_replace('/https?:\/\/[\w\-\.!~#?&=+\*\'"(),\/]+/','<a href="$0">$0</a>',$view['content']);
echo get_view_thumbnail(na_view($view)); // 글내용 출력
?>
[/code]
<?php echo get_view_thumbnail(na_view($view)); // 글내용 출력 ?>
[/code]
->
[code]
<?php
$view['content'] = preg_replace('/https?:\/\/[\w\-\.!~#?&=+\*\'"(),\/]+/','<a href="$0">$0</a>',$view['content']);
echo get_view_thumbnail(na_view($view)); // 글내용 출력
?>
[/code]
에디터를 사용하시면 기본으로 적용됩니다.
안된다면 아마도 주석처리되었을것 같습니다.
common.lib.php 파일에
Copy
// 내용을 변환
function conv_content($content, $html, $filter=true)
{
중략..
$content = url_auto_link($content); <-- 이부분 입니다.
}
return $content;
}
답변에 대한 댓글 3개
답변을 작성하려면 로그인이 필요합니다.