코드이그나이터 기반 PHP 오픈소스 게시판 : 씨아이보드

이미지 주소 프로토콜과 접속 프로토콜이 다를때 이미지가 깨지는 현상.

  • 스마일
  • 2
  • 1,077
  • 글주소
  • 11-03


basic_helper#get_view_thumbnail()


document 에 첨부된 이미지의 http protocol이 현재 사이트 접속 프로토콜과 다를 때 이미지 주소가 깨집니다. 


$thumb_tag = '<img src="' . thumb_url('editor', str_replace(site_url(config_item('uploads_dir') . '/editor') . '/', '', $src), $thumb_width) . '" ';


==>


그냥 이렇게 해도 되지 않을까 합니다.


$url_rel = preg_replace('|(.*editor/)|', '', $src); 

$thumb_tag = '<img src="' . thumb_url('editor', $url_rel, $thumb_width) . '" '; 



/// 

디버그 게시판에 안써져서 여기 올립니다.