묻고답하기
게시판에서 확장변수 나타내는 법
2009.09.14 17:15
현재
A게시판에 Naradesign스킨을 사용하고 있습니다.
확장변수가 많이 있어서
보여지는 부분을 3등분 해서 나타내고 있는데 다음과 같은 부분이 발생하네요.
1. 현상
카테고리주소를 메뉴로 연결하면 내용안에 확장변수값이 보이지만,
/?mid=게시판명&category=4774&document_srl=5000
게시판주소로 들어가서 내용을 볼 경우 확장변수값이 안나옴.
/?mid=게시판명&document_srl=5000
2. view_document.html 파일에서 현재 확장변수를 보여주는 값은
<tr>
<th >{$extra_keys[1]->name}</th>
<td> {$extra_keys[1]->getValueHTML()}</td>
<th >{$extra_keys[2]->name}</th>
<td> {$extra_keys[2]->getValueHTML()}</td>
<th >{$extra_keys[3]->name}</th>
<td> {$extra_keys[3]->getValueHTML()}년</td>
</tr>
으로 되어있습니다. 해결방법을 아시는 분이 계시면 감사드리겠습니다@@@
[소스원본]
<div class="boardRead">
<div class="boardReadHeader">
<div class="titleArea">
<h3 class="title"><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getTitle()}</a></h3>
<a href="{getUrl('category',$oDocument->get('category_srl'), 'document_srl', '')}" class="category">{$category_list[$oDocument->get('category_srl')]->title}</a>
<span class="sum">
<span class="read">{$lang->readed_count} <span class="num">{$oDocument->get('readed_count')}</span></span>
<span class="vote">{$lang->voted_count} <span class="num">{$oDocument->get('voted_count')}</span></span>
<span class="date">{$oDocument->getRegdate('Y.m.d')} {$oDocument->getRegdate('H:i:s')}</span>
</span>
</div>
<div class="authorArea">
<!--@if($module_info->display_author!='+ '+ 'N')-->
<!--@if(!$oDocument->getMemberSrl())-->
<!--@if($oDocument->isExistsHomepage())-->
<a href="{$oDocument->getHomepageUrl()}" onclick="window.open(this.href);return false;" class="author">{$oDocument->getNickName()}</a>
<!--@else-->
{$oDocument->getNickName()}
<!--@end-->
<!--@else-->
<a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')} author" onclick="return false">{$oDocument->getNickName()}</a>
<!--@end-->
<!--@end-->
<span class="ipAddress"><!--@if($grant->manager || $module_info->display_ip_address!='N')-->{$oDocument->getIpaddress()}<!--@end--></span>
<a href="{$oDocument->getPermanentUrl()}" class="permaLink">{$oDocument->getPermanentUrl()}</a>
</div>
</div>
<!--@if($oDocument->isExtraVarsExists() && (!$oDocument->isSecret() || $oDocument->isGranted()) )-->
<table border="1" cellspacing="0" summary="Extra Form" class="extraVarsList">
<tr>
<th >기본정보</th>
</tr>
<tr>
<th >{$extra_keys[1]->name}</th>
<td> {$extra_keys[1]->getValueHTML()}</td>
<th >{$extra_keys[2]->name}</th>
<td> {$extra_keys[2]->getValueHTML()}</td>
<th >{$extra_keys[3]->name}</th>
<td> {$extra_keys[3]->getValueHTML()}년</td>
</tr>
<tr>
<th >{$extra_keys[4]->name}</th>
<td> {$extra_keys[4]->getValueHTML()}</td>
<th >{$extra_keys[5]->name}</th>
<td> {$extra_keys[5]->getValueHTML()}km/l </td>
<th >{$extra_keys[6]->name}</th>
<td> {$extra_keys[6]->getValueHTML()} cc</td>
</tr>
<tr>
<td ></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<th >성능정보</th>
</tr>
<tr>
<th >{$extra_keys[7]->name}</th>
<td> {$extra_keys[7]->getValueHTML()}hp/ps/rpm</td>
<th >{$extra_keys[8]->name}</th>
<td> {$extra_keys[8]->getValueHTML()}kg.m/rpm</td>
<th >{$extra_keys[9]->name}</th>
<td> {$extra_keys[9]->getValueHTML()}</td>
</tr>
<tr>
<th >{$extra_keys[10]->name}</th>
<td> {$extra_keys[10]->getValueHTML()}</td>
<th >{$extra_keys[11]->name}</th>
<td> {$extra_keys[11]->getValueHTML()}</td>
<th >{$extra_keys[12]->name}</th>
<td> {$extra_keys[12]->getValueHTML()}</td>
</tr>
<tr>
<th >{$extra_keys[13]->name}</th>
<td> {$extra_keys[13]->getValueHTML()}</td>
<th >{$extra_keys[14]->name}</th>
<td> {$extra_keys[14]->getValueHTML()}kg</td>
<th >{$extra_keys[15]->name}</th>
<td> {$extra_keys[15]->getValueHTML()}mm</td>
</tr>
<tr>
<th >{$extra_keys[16]->name}</th>
<td> {$extra_keys[16]->getValueHTML()}mm</td>
<th >{$extra_keys[17]->name}</th>
<td> {$extra_keys[17]->getValueHTML()}mm</td>
<th >{$extra_keys[18]->name}</th>
<td> {$extra_keys[18]->getValueHTML()}mm</td>
</tr>
<tr>
<td ></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<th >옵션정보</th>
</tr>
<tr>
<th >{$extra_keys[19]->name}</th>
<td> {$extra_keys[19]->getValueHTML()}</td>
<th >{$extra_keys[20]->name}</th>
<td> {$extra_keys[20]->getValueHTML()}</td>
<th >{$extra_keys[21]->name}</th>
<td> {$extra_keys[21]->getValueHTML()}</td>
</tr>
<tr>
<th >{$extra_keys[22]->name}</th>
<td> {$extra_keys[22]->getValueHTML()}</td>
<th >{$extra_keys[23]->name}</th>
<td> {$extra_keys[23]->getValueHTML()}</td>
<th >{$extra_keys[24]->name}</th>
<td> {$extra_keys[24]->getValueHTML()}</td>
</tr>
</table>
<!--@end-->
<div class="boardReadBody">
<!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
<form action="./" method="get" onsubmit="return procFilter(this, input_password)" class="secretMessage">
<fieldset>
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<p><strong>"{$lang->msg_is_secret}"</strong></p>
<dl>
<dt><label for="cpw">{$lang->password}</label> :</dt>
<dd><input type="password" name="password" id="cpw" class="inputText" /><span class="button"><input type="submit" value="{$lang->cmd_input}" /></span></dd>
</dl>
</fieldset>
</form>
<!--@else-->
{$oDocument->getContent()}
<!--@end-->
</div>
<div class="boardReadFooter">
{@ $tag_list = $oDocument->get('tag_list') }
<!--@if(count($tag_list))-->
<dl class="tag">
<dt><img src="./img/common/iconTag.gif" width="27" height="11" alt="{$lang->tag}" /></dt>
<!--@for($i=0;$i<count($tag_list);$i++)-->
{@ $tag = $tag_list[$i]; }
<dd><a href="{getUrl('search_target','tag','search_keyword',$tag,'document_srl','')}" rel="tag">{htmlspecialchars($tag)}</a></dd>
<!--@end-->
</dl>
<!--@end-->
<!--@if($oDocument->hasUploadedFiles())-->
<dl class="attachedFile">
<dt><img src="./img/common/iconFiles.gif" width="27" height="11" alt="{$lang->uploaded_file}" /> <button type="button" class="fileToggle" onclick="jQuery(this).parents('dl.attachedFile').toggleClass('open');return false;">{$lang->uploaded_file} ({$oDocument->get('uploaded_count')})</button></dt>
<dd>
<ul class="files">
{@ $uploaded_list = $oDocument->getUploadedFiles() }
<!--@foreach($uploaded_list as $key => $file)-->
<li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename} <span class="bubble">[File Size:{FileHandler::filesize($file->file_size)}/Download:{number_format($file->download_count)}]</span></a></li>
<!--@end-->
</ul>
</dd>
</dl>
<!--@end-->
<!--@if($module_info->display_sign != 'N' && ($oDocument->getProfileImage() || $oDocument->getSignature()))-->
<div class="memberSignature">
<!--@if($oDocument->getProfileImage())-->
<img src="{$oDocument->getProfileImage()}" alt="profile" class="profile" align="left" />
<!--@end-->
<!--@if($oDocument->getSignature())-->
{$oDocument->getSignature()}
<!--@end-->
</div>
<!--@end-->
<!--@if(!$oDocument->getTrackbackCount())-->
<dl class="trackbackURL">
<dt>{$lang->trackback} : </dt>
<dd><a href="{$oDocument->getTrackbackUrl()}" onclick="return false;">{$oDocument->getTrackbackUrl()}</a></dd>
</dl>
<!--@end-->
</div>
<div class="boardNavigation">
<div class="buttonLeft">
<span class="button"><a href="{getUrl('document_srl','')}">{$lang->cmd_list}</a></span>
</div>
<!--@if($oDocument->isEditable())-->
<div class="buttonRight">
<span class="button strong"><a href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl,'comment_srl','')}">{$lang->cmd_modify}</a></span>
<span class="button"><a href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}">{$lang->cmd_delete}</a></span>
</div>
<!--@end-->
</div>
</div>
<!--@if($oDocument->allowTrackback())-->
<!--#include("./trackback.html")-->
<!--@end-->
<!--@if($oDocument->allowComment())-->
<a name="comment"></a>
<!--#include("./comment.html")-->
<!--@if($grant->write_comment && $oDocument->isEnableComment() )-->
<form action="./" method="post" onsubmit="jQuery(this).find('input').each(function(){if(this.title==this.value)this.value='';});return procFilter(this, insert_comment)" class="boardEditor" >
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<input type="hidden" name="comment_srl" value="" />
<input type="hidden" name="content" value="" />
<div class="boardWrite commentEditor">
<div class="editor">{$oDocument->getCommentEditor()}</div>
<div class="editorOption">
<!--@if(!$is_logged)-->
<input type="text" name="nick_name" class="inputText userName" value="{$lang->writer}" title="{$lang->writer}" onfocus="if(this.value==this.title)this.value='';return false;" />
<input type="password" name="password" class="inputText userPw" value="{$lang->password}" title="{$lang->password}" onfocus="if(this.value==this.title)this.value='';return false;" />
<input type="text" name="email_address" class="inputText emailAddress" value="{$lang->email_address}" title="{$lang->email_address}" onfocus="if(this.value==this.title)this.value='';return false;" />
<input type="text" name="homepage" class="inputText homePage" value="{$lang->homepage}" title="{$lang->homepage}" onfocus="if(this.value==this.title)this.value='+ '';return false;" />
<!--@end-->
<!--@if($is_logged)-->
<input type="checkbox" name="notify_message" value="Y" id="notify_message" class="inputCheck" />
<label for="notify_message">{$lang->notify}</label>
<!--@end-->
<input type="checkbox" name="is_secret" value="Y" id="is_secret" class="inputCheck" />
<label for="is_secret">{$lang->secret}</label>
</div>
<div class="boardNavigation">
<span class="button strong"><input type="submit" value="{$lang->cmd_comment_registration}" /></span>
</div>
</div>
</form>
<!--@end-->
<!--@end-->
댓글 2
-
똑디
2009.09.14 17:37
-
똑디
2009.09.14 20:01
세라오빠님. 올려주신 소스르 검토했는데 현재 소스에선 카테고리번호에 따라 확장변수가 출력되고, 안되고를 결정짓는 부분이 없습니다.
현재 XE는 최신버전으로 사용하고 계신지...
세라오빠님.
카테고리 값의 존재 여부에 따라 보이기도 하고 안보이기도 한다면 아마 조건문에서 카테고리 값을 체크 하고 있는듯 하네요.
지금 올려놓으신 소스를 부분적인 소스 말고 전체 소스를 올려 놓으시는것이 답변을 정확하게 받으실수 있을듯 합니다. ^^
view_document.html 파일 전체 소스를 올려줘 보세요.