치환 좀 도와주세요 정보
치환 좀 도와주세요본문
최신글에서 태그가 보이는데 가리고 싶어요 어떻게 해야하나요?
질문답변 검색해서 이것저것 적용해 봤는데 해결을 못하겠어요
부탁드립니다.
해당 최신글 소스 코드 입니다.
-----------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$rows = count($list);
$style_name = "mw-group-$bo_table-$rows-$subject_len";
?>
<style type="text/css">
#<?=$style_name?> { text-align:left; clear:both; margin:0; border:0px solid #e1e1e1; }
#<?=$style_name?> .item { clear:both; display:none; }
#<?=$style_name?> .file-img-b { width:70px; height:55px; border:0px solid #e1e1e1; border-left:0; }
#<?=$style_name?> .subject { clear:both; height:20px; font-weight:bold; font-size:12px; }
#<?=$style_name?> .subject a { text-decoration:none; }
#<?=$style_name?> .prev { float:left; margin:0 0 0 -4px; cursor:pointer; }
#<?=$style_name?> .next { float:left; margin:0 0px 0 0; cursor:pointer; }
#<?=$style_name?> .link { float:left; margin:0 0 0 5px; text-align:center; }
.style8 {
font-family: Geneva;
font-size: 13px;
font-weight: bold;
color: #8B9598;
}
</style>
<div id="<?=$style_name?>">
<? for ($i=5; $i<$rows; $i++) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding:0px;">
<tr>
<?
$img = "$g4[path]/data/file/$bo_table/thumb/{$list[$i][wr_id]}";
if (!@file_exists($img)) $img = "$g4[path]/data/file/$bo_table/thumbnail/{$list[$i][wr_id]}";
if (!@file_exists($img)) $img = "{$list[$i][file][0][path]}/{$list[$i][file][0][file]}";
if (!@file_exists($img)) $img = "";
if (!$list[$i][wr_id]) $img = "";
if (@is_dir($img)) $img = "";
// 이미지 경로가 없을 경우처리 [2008-03-28]
if( trim(strrchr($img, "/")) == '/' ) $img = '';
$img = $img ? $img : $latest_skin_path.'/img/noimg.gif';
?>
<td style="padding:5px 0 5px 2px;">
<div style="float:right; width:auto; height:auto; padding:0px 0px 0px 5px;">
<? if ($img) { ?>
<a href="<?=$list[$i][href]?>"><img src="<?=$img?>" class="file-img-b" style="border:1px solid #000000;"></a>
<? } ?>
</div>
<a href="<?=$list[$i][href]?>" class="style8"><?=$list[$i][subject]?></a>
<span style="color:#999999; font-size:10px;"><?=$list[$i]['comment_cnt']?></span><br>
<a href="<?=$list[$i][href]?>"><span style="color:#6A6A6A;font-size:11px; font-family:돋움; letter-spacing:-1px; line-height:14px;">
<?=cut_str(strip_tags($list[$i][wr_content]),240,"...")?>
</span></a>
</td>
</tr>
<tr>
<td height="1" bgcolor="#1A1C1D"></td>
</tr>
</table>
<? } ?>
</div>
----------------------------------------------------------------------------------
사이트주소 http://www.gamereporters.com/
질문답변 검색해서 이것저것 적용해 봤는데 해결을 못하겠어요
부탁드립니다.
해당 최신글 소스 코드 입니다.
-----------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$rows = count($list);
$style_name = "mw-group-$bo_table-$rows-$subject_len";
?>
<style type="text/css">
#<?=$style_name?> { text-align:left; clear:both; margin:0; border:0px solid #e1e1e1; }
#<?=$style_name?> .item { clear:both; display:none; }
#<?=$style_name?> .file-img-b { width:70px; height:55px; border:0px solid #e1e1e1; border-left:0; }
#<?=$style_name?> .subject { clear:both; height:20px; font-weight:bold; font-size:12px; }
#<?=$style_name?> .subject a { text-decoration:none; }
#<?=$style_name?> .prev { float:left; margin:0 0 0 -4px; cursor:pointer; }
#<?=$style_name?> .next { float:left; margin:0 0px 0 0; cursor:pointer; }
#<?=$style_name?> .link { float:left; margin:0 0 0 5px; text-align:center; }
.style8 {
font-family: Geneva;
font-size: 13px;
font-weight: bold;
color: #8B9598;
}
</style>
<div id="<?=$style_name?>">
<? for ($i=5; $i<$rows; $i++) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding:0px;">
<tr>
<?
$img = "$g4[path]/data/file/$bo_table/thumb/{$list[$i][wr_id]}";
if (!@file_exists($img)) $img = "$g4[path]/data/file/$bo_table/thumbnail/{$list[$i][wr_id]}";
if (!@file_exists($img)) $img = "{$list[$i][file][0][path]}/{$list[$i][file][0][file]}";
if (!@file_exists($img)) $img = "";
if (!$list[$i][wr_id]) $img = "";
if (@is_dir($img)) $img = "";
// 이미지 경로가 없을 경우처리 [2008-03-28]
if( trim(strrchr($img, "/")) == '/' ) $img = '';
$img = $img ? $img : $latest_skin_path.'/img/noimg.gif';
?>
<td style="padding:5px 0 5px 2px;">
<div style="float:right; width:auto; height:auto; padding:0px 0px 0px 5px;">
<? if ($img) { ?>
<a href="<?=$list[$i][href]?>"><img src="<?=$img?>" class="file-img-b" style="border:1px solid #000000;"></a>
<? } ?>
</div>
<a href="<?=$list[$i][href]?>" class="style8"><?=$list[$i][subject]?></a>
<span style="color:#999999; font-size:10px;"><?=$list[$i]['comment_cnt']?></span><br>
<a href="<?=$list[$i][href]?>"><span style="color:#6A6A6A;font-size:11px; font-family:돋움; letter-spacing:-1px; line-height:14px;">
<?=cut_str(strip_tags($list[$i][wr_content]),240,"...")?>
</span></a>
</td>
</tr>
<tr>
<td height="1" bgcolor="#1A1C1D"></td>
</tr>
</table>
<? } ?>
</div>
----------------------------------------------------------------------------------
사이트주소 http://www.gamereporters.com/
댓글 전체
<?=cut_str(strip_tags($list[$i][wr_content]),240,"...")?>
전에
$list[$i][wr_content] = str_replace("{이미지:0}","",$list[$i][wr_content] );
하시면 되지 않을까요
전에
$list[$i][wr_content] = str_replace("{이미지:0}","",$list[$i][wr_content] );
하시면 되지 않을까요
<?=$list[$i][wr_content] = str_replace("{이미지:0}","",$list[$i][wr_content] );
?>
<?= cut_str(strip_tags($list[$i][wr_content]),240,"...");?>
이렇게 하라는 말씀이신가요?
{이미지:0} 태그는 사라졌는데 글 내용이 두번나오네요
?>
<?= cut_str(strip_tags($list[$i][wr_content]),240,"...");?>
이렇게 하라는 말씀이신가요?
{이미지:0} 태그는 사라졌는데 글 내용이 두번나오네요
<?=$list[$i][wr_content] = str_replace("{이미지:0}","",$list[$i][wr_content] );
요기에서 <?= 요게 문제네요...
= 빼시고 그냥 <?$list[$i][wr_content] = str_replace("{이미지:0}","",$list[$i][wr_content] );
이렇게 넣어주세요^^
한줄짜리 php코드에서 <?=$변수?>는 <?echo $변수?>와 같은 의미랍니다^^
요기에서 <?= 요게 문제네요...
= 빼시고 그냥 <?$list[$i][wr_content] = str_replace("{이미지:0}","",$list[$i][wr_content] );
이렇게 넣어주세요^^
한줄짜리 php코드에서 <?=$변수?>는 <?echo $변수?>와 같은 의미랍니다^^