점수대신 별점이 나오게 하려고 합니다. 정보
점수대신 별점이 나오게 하려고 합니다.본문
현재는 점수로 평균을 보여주고 있는데..이걸 첨부한 그림과같이 별점을주려고합니다.
어떤소스를 추가해야하는지 감도 잡히지 않고 중간에 HEREDOC 때문에 더 어렵게 느껴지네요..~
다른 스킨을 참조해서 하려고 해도 초보라 쉽지가않네요..~
소스 하단의 "평점(10점만점)" 자리에 넣으려고 하는데 어떻게 해야할까요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 스킨 입니다.");
$la_content = "35"; //내용길이
$img_w = "160"; //썸네일 가로
$img_h = "95"; //썸네일 세로
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_'.$img_w.'_'.$img_h;
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<table align="center" width=98% cellpadding=0 cellspacing=0>
<tr>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td width='100%' background='<?=$latest_skin_path?>/img/bg_latest.gif'>
<strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&sca=<?=$ca_name?>'><?=$ca_name?></a></strong>
</td>
<td width=37 background='<?=$latest_skin_path?>/img/bg_latest.gif'>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&sca=<?=$ca_name?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a>
</td>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td colspan=8 align=center>
<table width=95%>
<tr><td><style type="text/css">
#photo_v27_img, #photo_v27_list{float:left}
#photo_v27_img{width:10px;border:0px solid #ffffff;padding:3px;}
#photo_v27_list{
width:200px;
height:80px;
padding:0 0 0 5px;
color:#000000;
font-family: "돋움";
font-size: 9pt;
text-decoration: none;
}
.photo_v27_sub{
height:18px;
font-family: "돋움";
font-size: 9pt;
font-weight: bold;
text-decoration: none;
}
.photo_v27_con {
height:17px;
font-family: "돋움";
font-size: 8pt;
font-weight: normal;
text-decoration: none;
}
</style>
<?
for ($i=0; $i<count($list); $i++) {
//썸네일 코드 시작
$img = "<div style='width:100px;height:55px;'></div>";
$thumb = $thumb_path . '/' . $list[$i][file][0][file] . '.thumb';
if (!file_exists($thumb))
{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
if (preg_match("/\.(jp[e]?g|gif|bmp|png)$/i", $file) && file_exists($file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
continue;
$rate = $img_w / $size[0];
$height = (int)($size[1] * $rate);
if ($height < $img_h)
$dst = imagecreatetruecolor($img_w, $height);
else
$dst = imagecreatetruecolor($img_w, $img_h);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_w, $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path . '/' . $list[$i][file][0][file] . '.thumb', 100);
chmod($thumb_path . '/' . $list[$i][file][0][file] . '.thumb', 0606);
}
}
if (file_exists($thumb))
$img = "<img src='$thumb' align='absmiddle' border='0'>";
$href = "{$list[$i][href]}";
$wr_1 = "<span $href>".cut_str($list[$i][wr_1],12)."</span>";
$wr_content ="<span $style>".cut_str(strip_tags($list[$i][wr_content]),$la_content)."</span>";
$temp=@mysql_fetch_assoc(@mysql_query("select star_average from `m3rating` where bo_table='$bo_table' AND wr_id='{$list[$i][wr_id]}'"));
// 출력
echo <<<HEREDOC
<div>
<div id="photo_v27_img">
<table width=103 border="0" cellspacing="0" cellpadding="0">
<tr><td width=30></td><td>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td height=10></td></tr>
<tr><td align=center>
<a href='{$href}' onfocus='this.blur()'>{$img}</a>
</td></tr>
<tr><td height=7 align=center></td></tr>
<tr><td align=center height=3><a href='{$href}' onfocus='this.blur()' class=red>
<b>$wr_1</b></td></tr>
</table>
<table>
<tr>
<td><font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font></td>
</tr>
<tr>
<td><font style='font-family:돋움; font-size:9pt; color:#000000;'><strong>조회수 :</strong></font> {$list[$i]['wr_hit']}</td>
</tr>
<tr>
<td><font style='font-family:돋움; font-size:9pt; color:#000000;'><strong>평점(10점만점) :</strong></font>$temp[star_average]점</td>
</tr>
</table>
</td></tr></table>
</div>
HEREDOC;
}
?>
</td></tr>
<tr>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
댓글 전체

에 상세히 나와있습니다. 이걸쓰시는건 어떠신지? 굳이 연동이 될 필요가 있을까요?
플러그 인 부분만 인용하시면 됩니다. 회원제한 내용도 다음 링크에 나와있습니다.
http://www.bomool.net/bbs/board.php?bo_table=bo0103&wr_id=2
여기에서도 참고 하시고
http://gnucomun.net/bbs/search.php?sfl=wr_subject%7C%7Cwr_content&sop=and&stx=%EB%B3%84%EC%A0%90
여기에서도 참고 하세요^^