1. 정확한 제품 또는 플러그인 이름
퓨어갤러리 게시판
2. 상세 내용
document.php 에 exif 가 사진마다 표시되도록 코드를 추가하였더니 썸네일 파일 추가하면 에러가 납니다. 이유가 뭘까요?
3. 확인 가능한 상세 페이지 주소
https://leica-korea.com/?page_id=1540
4. 수정한 코드 내역 (있다면)
<div id="kboard-document">
<div id="kboard-pure-gallery-document"<?php if(kboard_pure_gallery_list($board)):?> class="<?php echo kboard_pure_gallery_list($board)?>"<?php en>
<div class="kboard-document-wrap" itemscope itemtype="http://schema.org/Article">
<div class="kboard-title" itemprop="name">
<h1><?php echo $content->title?></h1>
</div>
<div class="kboard-detail">
<?php if($content->category1):?>
<div class="detail-attr detail-category1">
<div class="detail-name"><?php echo $content->category1?></div>
</div>
<?php endif?>
<?php if($content->category2):?>
<div class="detail-attr detail-category2">
<div class="detail-name"><?php echo $content->category2?></div>
</div>
<?php endif?>
<?php if($content->option->tree_category_1):?>
<?php for($i=1; $i<=$content->getTreeCategoryDepth(); $i++):?>
<div class="detail-attr detail-tree-category-<?php echo $i?>">
<div class="detail-name"><?php echo $content->option->{'tree_category_'.$i}?></div>
</div>
<?php endfor?>
<?php endif?>
<div class="detail-attr detail-writer">
<div class="detail-name"><?php echo __('Author', 'kboard')?></div>
<div class="detail-value"><?php echo $content->getUserDisplay()?></div>
</div>
<div class="detail-attr detail-date">
<div class="detail-name"><?php echo __('Date', 'kboard')?></div>
<div class="detail-value"><?php echo date('Y-m-d H:i', strtotime($content->date))?></div>
</div>
<div class="detail-attr detail-view">
<div class="detail-name"><?php echo __('Views', 'kboard')?></div>
<div class="detail-value"><?php echo $content->view?></div>
</div>
</div>
<div class="kboard-content" itemprop="description">
<div class="content-view">
<?php echo $content->getDocumentOptionsHTML()?>
<?php echo $content->content?>
</div>
</div>
<div class="kboard-document-action">
<div class="left">
<button type="button" class="kboard-button-action kboard-button-like" onclick="kboard_document_like(this)" data-u>
<button type="button" class="kboard-button-action kboard-button-unlike" onclick="kboard_document_unlike(this)" da>
</div>
<div class="right">
<button type="button" class="kboard-button-action kboard-button-print" onclick="kboard_document_print('<?php echo>
</div>
</div>
<?php if(isset($content->attach->over_image)) unset($content->attach->over_image);?>
<?php if($content->isAttached()):?>
<div class="kboard-attach">
<?php foreach($content->getAttachmentList() as $key=>$attach):?>
<button type="button" class="kboard-button-action kboard-button-download" onclick="window.location.href='<?php echo $url->
<?php endforeach?>
</div>
<?php endif?>
</div>
<?php if($content->visibleComments()):?>
<div class="kboard-comments-area"><?php echo $board->buildComment($content->uid)?></div>
<?php endif?>
<div class="kboard-document-navi">
<div class="kboard-prev-document">
<?php
$bottom_content_uid = $content->getPrevUID();
if($bottom_content_uid):
$bottom_content = new KBContent();
$bottom_content->initWithUID($bottom_content_uid);
?>
<a href="<?php echo $url->getDocumentURLWithUID($bottom_content_uid)?>">
<span class="navi-arrow">«</span>
<span class="navi-document-title kboard-pure-gallery-cut-strings"><?php echo $bottom_content->title?></span>
</a>
<?php endif?>
</div>
<div class="kboard-next-document">
<?php
$top_content_uid = $content->getNextUID();
if($top_content_uid):
$top_content = new KBContent();
$top_content->initWithUID($top_content_uid);
?>
<a href="<?php echo $url->getDocumentURLWithUID($top_content_uid)?>">
<span class="navi-document-title kboard-pure-gallery-cut-strings"><?php echo $top_content->title?></span>
<span class="navi-arrow">»</span>
</a>
<?php endif?>
</div>
</div>
<div class="kboard-control">
<div class="left">
<a href="<?php echo $url->getBoardList()?>" class="kboard-pure-gallery-button-small"><?php echo __('List', 'kboard')?></a>
</div>
<?php if($board->isEditor($content->member_uid) || $board->permission_write=='all'):?>
<div class="right">
<a href="<?php echo $url->getContentEditor($content->uid)?>" class="kboard-pure-gallery-button-small"><?php echo __('Edit>
<a href="<?php echo $url->getContentRemove($content->uid)?>" class="kboard-pure-gallery-button-small" onclick="return con>
</div>
<?php endif?>
</div>
<?php if($board->contribution() && !$board->meta->always_view_list):?>
<div class="kboard-pure-gallery-poweredby">
<a href="https://www.cosmosfarm.com/products/kboard" onclick="window.open(this.href);return false;" title="<?php echo __('KBoard >
</div>
<?php endif?>
</div>
</div>
<script>
var my_kboard_exif_read_data_nonce = '<?php echo wp_create_nonce('my_kboard_exif_read_data_nonce')?>';
jQuery(document).ready(function(){
jQuery('.kboard-content img').each(function(){
var img = jQuery(this);
jQuery.post('<?php echo admin_url('admin-ajax.php');?>', {
action: 'my_kboard_exif_read_data',
security: my_kboard_exif_read_data_nonce,
src: img.attr('src')
}, function(res) {
if (!res.error) {
var ul = jQuery('<ul></ul>');
var exif_data = []; // EXIF 데이터를 담을 배열
// EXIF 데이터가 있으면 배열에 추가
if (res.Model) exif_data.push('모델명: ' + res.Model);
if (res.FocalLength) exif_data.push(' / 초점거리: ' + parseInt(res.FocalLength));
if (res.FNumber) exif_data.push('mm / 조리개: F' + eval(res.FNumber));
if (res.ISOSpeedRatings) exif_data.push(' / ISO: ' + res.ISOSpeedRatings);
if (res.ExposureTime) exif_data.push(' / 셔터스피드:' + res.ExposureTime);
// EXIF 데이터를 <li>로 추가
for (var i = 0; i < exif_data.length; i++) {
ul.append(exif_data[i]);
}
// 이미지를 기준으로 그 뒤에 <ul> 추가
img.after(ul);
ul.css({
'text-align': 'center', // 텍스트 가운데 정렬
'margin': '10px auto', // ul을 가운데 배치 (위아래 여백 10px, 좌우 auto)
'list-style-type': 'none', // 기본 리스트 스타일 제거
'padding': '0', // ul의 기본 padding 제거
});
ul.find('li').css({
'display': 'inline-block', // li를 가로로 배치
'margin': '5px', // li 간격 조정
'padding': '0', // li의 기본 padding 제거
'text-align': 'left', // 왼쪽 정렬
});
}
}, 'json');
});
});
</script>
AI 상담