답변 2개
채택된 답변
+20 포인트
4년 전
이프문을 하나 감으면 되지 않을까요?
function url_auto_link($str) { if ($bo_table !== "a게시판") { 원래내용 } }
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
4년 전
function url_auto_link($str)
{
global $g5;
global $config;
global $bo_table; // 추가
if( $bo_table=='bbs') {
//Made by Vorfeed
//인스타, 유튜브, 트위터 URL 자동 변환 소스.
$regex = '~(?:http|https|)(?::\/\/|)(?:www.|)(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[a-z0-9;:@#?&%=+\/\$_.-]*~i';
$str = preg_replace( $regex, '', $str );
$regex = "/(https?:\/\/www\.)?instagram\.com(\/p\/\w+\/?)/im";
$str = preg_replace( $regex, 'https://www.instagram.com$2" data-instgrm-version="8"> instagram..
', $str );
$regex = "/(https?:\/\/(www\.)?)?twitter\.com\/(?:#!\/)?(\w+)\/status(es)?\/(\d+)/im";
$str = preg_replace( $regex, ' https://twitter.com/$3/status/$5" style="text-decoration:none"> twitter..
', $str );
} // 필요한 곳까지
// 140326
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인