그누보드에 Highslide 적용방법!! 정보
그누보드에 Highslide 적용방법!!본문
어떻게 하죠 ㅠ_ㅠ
겔러리가 너무 심심해서...크림을 클릭하면 Highslide로 뜨도록 하고싶은데..
테더툴에 대한건 설명이 자세한데..
그누보드에 대한건 없네요 ㅠㅠ
그리고 회원가입시 회원구분을 지어서 각게시판마다 권한을 설정하는게 가능할까요?
뭐 학생, 선생님, 교장선생님 이런식으로;;
학생은 공지사항에 글을못쓰고 교장선생님만 쓰고..;;;
댓글 전체
그누보드에서 안되는게 어디 있나요?
최신글 형태로 적용해보았습니다.
http://puchonphoto.com/g4/?gur=gnuboard4
괜찮은가요?
제가 사용하는 방식이 조금 달라서 통째로 올려봐야 도움이 안될것 같아 간략하게 만들어 보았습니다.
소스다운로드 - http://vikjavev.no/highslide/
/skin/latest/latest_Highslide 폴더를 만들고 다운받은 파일 압축해제후 내부에 있는 highlside폴더만 업로드합니다.
latest.skin.php 파일을 아래 내용을 참고해서 적용시켜 봅니다.
- 썸네일 생성부분은 일반적인 걸로 붙였는데 테스트는 못해봤습니다.
- 호출은 일반적으로 <?=latest("latest_Highslide", 테이블이름, 갯수, 제목글자수);?>
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board['bo_1']) alert("갤러리({$bo_table}) 설정 : 여분 필드1 에 목록에서 보여질 이미지의 폭을 설정하십시오. (픽셀 단위)");
if (!$board['bo_2']) alert("갤러리({$bo_table}) 설정 : 여분 필드2 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
$data_path = $g4['path'] . "/data/file/" . $bo_table;
$thumb_path = $data_path . '/thumb';
if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
?>
<script type="text/javascript" src="<?=$latest_skin_path?>/highslide/highslide.js"></script>
<script type="text/javascript">
// remove the registerOverlay call to disable the controlbar
hs.registerOverlay(
{
thumbnailId: null,
overlayId: 'controlbar',
position: 'top right',
hideOnMouseOut: true
}
);
hs.graphicsDir = '<?=$latest_skin_path?>/highslide/graphics/';
hs.outlineType = 'rounded-white';
window.onload = function() {
hs.preloadImages(5);
}
</script>
<style type="text/css">
.highslide {
cursor: url(<?=$latest_skin_path?>/highslide/graphics/zoomin.cur), pointer;
outline: none;
}
.highslide img {
border: 2px solid gray;
}
.highslide:hover img {
border: 2px solid white;
}
.highslide-image {
border: 2px solid white;
}
.highslide-image-blur {
}
.highslide-caption {
display: none;
border: 2px solid white;
border-top: none;
font-family: Verdana, Helvetica;
font-size: 10pt;
padding: 5px;
background-color: white;
}
.highslide-loading {
display: block;
color: white;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
text-decoration: none;
padding: 3px;
border-top: 1px solid white;
border-bottom: 1px solid white;
background-color: black;
/*
padding-left: 22px;
background-image: url(highslide/graphics/loader.gif);
background-repeat: no-repeat;
background-position: 3px 1px;
*/
}
a.highslide-credits,
a.highslide-credits i {
padding: 2px;
color: silver;
text-decoration: none;
font-size: 10px;
}
a.highslide-credits:hover,
a.highslide-credits:hover i {
color: white;
background-color: gray;
}
.highslide-move {
cursor: move;
}
.highslide-overlay {
display: none;
}
/* Controlbar example */
.controlbar {
background: url(<?=$latest_skin_path?>/highslide/graphics/controlbar4.gif);
width: 167px;
height: 34px;
}
.controlbar a {
display: block;
float: left;
margin: 0px 0 0 4px;
height: 29px;
width: 34px;
}
/* Necessary for functionality */
.highslide-display-block {
display: block;
}
.highslide-display-none {
display: none;
}
</style>
<div><?
for ($i=0; $i<count($list); $i++){
$filename = $list[$i]['file'][0]['file'];
$dest_file = $data_path .'/'. $filename;
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $filename) && file_exists($dest_file)){
$thumb = $thumb_path.'/'. $filename;
if (!file_exists($thumb)) {
$size = getimagesize($dest_file);
if ($size[2] == 1)
$src = imagecreatefromgif($dest_file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($dest_file);
else if ($size[2] == 3)
$src = imagecreatefrompng($dest_file);
else
break;
//가로,세로 최대사이즈 제한
if ($size[0] >= $size[1]) {
$rate = $board[bo_1] / $size[0];
$width = $board[bo_1];
$height = (int)($size[1] * $rate);
}
else {
$rate = $board[bo_1] / $size[1];
$width = (int)($size[0] * $rate);
$height = $board[bo_1];
}
$dst = imagecreatetruecolor($width, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);
imagepng($dst, $thumb, $board['bo_2']);
chmod($thumb, 0707);
//---------------------------------
$no_image = $latest_skin_path."/img/noimage.gif";
$tumblink = file_exists($thumb)? $thumb:$no_image;
$subject = ($list[$i]['is_notice'])?"<a href='".$list[$i]['href']."' style='color:#2C8CB9;font-weight:bold;'>".$list[$i]['subject']."</a>":"<a href='".$list[$i]['href']."' style='color:#CCC;'>".$list[$i]['subject']."</a>";
//---------------------------------
//목록 출력
?><a id="thumb_<?=$list[$i]['wr_id']?>" href="<?=$url?>" class="highslide" onclick="return hs.expand(this, { captionId: 'caption_<?=$list[$i]['wr_id']?>' } )">
<img src="<?=$tumblink?>" alt="Highslide JS" title="Click to enlarge" /></a>
<div class='highslide-caption' id='caption_<?=$list[$i]['wr_id']?>'>
<?=$subject?>
<p><? echo "Date:".$list[$i]['datetime']; echo ($list[$i]['datetime2'] != $list[$i]['last2'])?" 댓글:".$list[$i]['last2']."":'';?> Hit:<?=$list[$i]['wr_hit']?></p>
</div><?
}//for
?><div id="controlbar" class="highslide-overlay controlbar">
<a href="#" onclick="return hs.previous(this)" title="Previous (left arrow key)"></a>
<a href="#" onclick="return hs.next(this)" title="Next (right arrow key)"></a>
<a href="#" class="highslide-move" title="Click and drag to move"
style="margin-left: 10px"></a>
<a href="#" onclick="return hs.close(this)" title="Close"></a>
</div>
</div><?
if (count($list) == 0){
?><div style='width:100%;border:0px solid silver;margin:0;'>자료가 없습니다.</div><?
}
?>
최신글 형태로 적용해보았습니다.
http://puchonphoto.com/g4/?gur=gnuboard4
괜찮은가요?
제가 사용하는 방식이 조금 달라서 통째로 올려봐야 도움이 안될것 같아 간략하게 만들어 보았습니다.
소스다운로드 - http://vikjavev.no/highslide/
/skin/latest/latest_Highslide 폴더를 만들고 다운받은 파일 압축해제후 내부에 있는 highlside폴더만 업로드합니다.
latest.skin.php 파일을 아래 내용을 참고해서 적용시켜 봅니다.
- 썸네일 생성부분은 일반적인 걸로 붙였는데 테스트는 못해봤습니다.
- 호출은 일반적으로 <?=latest("latest_Highslide", 테이블이름, 갯수, 제목글자수);?>
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!$board['bo_1']) alert("갤러리({$bo_table}) 설정 : 여분 필드1 에 목록에서 보여질 이미지의 폭을 설정하십시오. (픽셀 단위)");
if (!$board['bo_2']) alert("갤러리({$bo_table}) 설정 : 여분 필드2 에 목록에서 보여질 이미지의 질(quality)을 비율로 설정하십시오. (100 이하)");
$data_path = $g4['path'] . "/data/file/" . $bo_table;
$thumb_path = $data_path . '/thumb';
if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
?>
<script type="text/javascript" src="<?=$latest_skin_path?>/highslide/highslide.js"></script>
<script type="text/javascript">
// remove the registerOverlay call to disable the controlbar
hs.registerOverlay(
{
thumbnailId: null,
overlayId: 'controlbar',
position: 'top right',
hideOnMouseOut: true
}
);
hs.graphicsDir = '<?=$latest_skin_path?>/highslide/graphics/';
hs.outlineType = 'rounded-white';
window.onload = function() {
hs.preloadImages(5);
}
</script>
<style type="text/css">
.highslide {
cursor: url(<?=$latest_skin_path?>/highslide/graphics/zoomin.cur), pointer;
outline: none;
}
.highslide img {
border: 2px solid gray;
}
.highslide:hover img {
border: 2px solid white;
}
.highslide-image {
border: 2px solid white;
}
.highslide-image-blur {
}
.highslide-caption {
display: none;
border: 2px solid white;
border-top: none;
font-family: Verdana, Helvetica;
font-size: 10pt;
padding: 5px;
background-color: white;
}
.highslide-loading {
display: block;
color: white;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
text-decoration: none;
padding: 3px;
border-top: 1px solid white;
border-bottom: 1px solid white;
background-color: black;
/*
padding-left: 22px;
background-image: url(highslide/graphics/loader.gif);
background-repeat: no-repeat;
background-position: 3px 1px;
*/
}
a.highslide-credits,
a.highslide-credits i {
padding: 2px;
color: silver;
text-decoration: none;
font-size: 10px;
}
a.highslide-credits:hover,
a.highslide-credits:hover i {
color: white;
background-color: gray;
}
.highslide-move {
cursor: move;
}
.highslide-overlay {
display: none;
}
/* Controlbar example */
.controlbar {
background: url(<?=$latest_skin_path?>/highslide/graphics/controlbar4.gif);
width: 167px;
height: 34px;
}
.controlbar a {
display: block;
float: left;
margin: 0px 0 0 4px;
height: 29px;
width: 34px;
}
/* Necessary for functionality */
.highslide-display-block {
display: block;
}
.highslide-display-none {
display: none;
}
</style>
<div><?
for ($i=0; $i<count($list); $i++){
$filename = $list[$i]['file'][0]['file'];
$dest_file = $data_path .'/'. $filename;
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $filename) && file_exists($dest_file)){
$thumb = $thumb_path.'/'. $filename;
if (!file_exists($thumb)) {
$size = getimagesize($dest_file);
if ($size[2] == 1)
$src = imagecreatefromgif($dest_file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($dest_file);
else if ($size[2] == 3)
$src = imagecreatefrompng($dest_file);
else
break;
//가로,세로 최대사이즈 제한
if ($size[0] >= $size[1]) {
$rate = $board[bo_1] / $size[0];
$width = $board[bo_1];
$height = (int)($size[1] * $rate);
}
else {
$rate = $board[bo_1] / $size[1];
$width = (int)($size[0] * $rate);
$height = $board[bo_1];
}
$dst = imagecreatetruecolor($width, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);
imagepng($dst, $thumb, $board['bo_2']);
chmod($thumb, 0707);
//---------------------------------
$no_image = $latest_skin_path."/img/noimage.gif";
$tumblink = file_exists($thumb)? $thumb:$no_image;
$subject = ($list[$i]['is_notice'])?"<a href='".$list[$i]['href']."' style='color:#2C8CB9;font-weight:bold;'>".$list[$i]['subject']."</a>":"<a href='".$list[$i]['href']."' style='color:#CCC;'>".$list[$i]['subject']."</a>";
//---------------------------------
//목록 출력
?><a id="thumb_<?=$list[$i]['wr_id']?>" href="<?=$url?>" class="highslide" onclick="return hs.expand(this, { captionId: 'caption_<?=$list[$i]['wr_id']?>' } )">
<img src="<?=$tumblink?>" alt="Highslide JS" title="Click to enlarge" /></a>
<div class='highslide-caption' id='caption_<?=$list[$i]['wr_id']?>'>
<?=$subject?>
<p><? echo "Date:".$list[$i]['datetime']; echo ($list[$i]['datetime2'] != $list[$i]['last2'])?" 댓글:".$list[$i]['last2']."":'';?> Hit:<?=$list[$i]['wr_hit']?></p>
</div><?
}//for
?><div id="controlbar" class="highslide-overlay controlbar">
<a href="#" onclick="return hs.previous(this)" title="Previous (left arrow key)"></a>
<a href="#" onclick="return hs.next(this)" title="Next (right arrow key)"></a>
<a href="#" class="highslide-move" title="Click and drag to move"
style="margin-left: 10px"></a>
<a href="#" onclick="return hs.close(this)" title="Close"></a>
</div>
</div><?
if (count($list) == 0){
?><div style='width:100%;border:0px solid silver;margin:0;'>자료가 없습니다.</div><?
}
?>
Parse error: parse error, unexpected $ in /home/hosting_users/dgcoma/www/skin/latest/latest_Highslide/latest.skin.php on line 196
196라인이면 맨끝입니다... 중간에 뭔가 하나드간거 같은데요 ㅠ,ㅠ
196라인이면 맨끝입니다... 중간에 뭔가 하나드간거 같은데요 ㅠ,ㅠ
$dst = imagecreatetruecolor($width, $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);
imagepng($dst, $thumb, $board['bo_2']);
chmod($thumb, 0707);
//-------- 요자리에 } 두개 빠졌네요
}
}
//--------
어차피 그대로 쓰시면 안되고 갤러리형 최신글 스킨을 참고해서 슬라이드 부분만 추가하는게 편할것 같네요.
imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);
imagepng($dst, $thumb, $board['bo_2']);
chmod($thumb, 0707);
//-------- 요자리에 } 두개 빠졌네요
}
}
//--------
어차피 그대로 쓰시면 안되고 갤러리형 최신글 스킨을 참고해서 슬라이드 부분만 추가하는게 편할것 같네요.
일단 그림을 불러와 지는것은 됬습니다^_^
하지만 클릭을 햇더니..(재가 index2.php파일에 latest를 시켰습니다)
index.php로 가버리네요 ㅡ.ㅡ
상태표시줄에는 페이지에 오류가 잇습니다..가 떠잇고 ㅠ,ㅠ
하지만 클릭을 햇더니..(재가 index2.php파일에 latest를 시켰습니다)
index.php로 가버리네요 ㅡ.ㅡ
상태표시줄에는 페이지에 오류가 잇습니다..가 떠잇고 ㅠ,ㅠ
잘 이해가 안되는군요.
테스트 링크를 올려주세요.
테스트 링크를 올려주세요.
http://dgcoma.cafe24.com/skin/latest/latest_Highslide/highslide 폴더가 없는것 같네요.
1, 하이슬라이드 소스다운로드 - http://vikjavev.no/highslide/
2, /skin/latest/latest_Highslide 폴더를 만들고 다운받은 파일 압축해제후 내부에 있는 highlside폴더만 /skin/latest/latest_Highslide/ 하위에 폴더째로 업로드합니다.
----------
큰 이미지 링크 수정해주세요.
<a id="thumb_<?=$list[$i]['wr_id']?>" href="<?=$url?>" class="highslide" onclick="return hs.expand(this, { captionId: 'caption_<?=$list[$i]['wr_id']?>' } )">
-->
<a id="thumb_<?=$list[$i]['wr_id']?>" href="<?=$dest_file?>" class="highslide" onclick="return hs.expand(this, { captionId: 'caption_<?=$list[$i]['wr_id']?>' } )">
1, 하이슬라이드 소스다운로드 - http://vikjavev.no/highslide/
2, /skin/latest/latest_Highslide 폴더를 만들고 다운받은 파일 압축해제후 내부에 있는 highlside폴더만 /skin/latest/latest_Highslide/ 하위에 폴더째로 업로드합니다.
----------
큰 이미지 링크 수정해주세요.
<a id="thumb_<?=$list[$i]['wr_id']?>" href="<?=$url?>" class="highslide" onclick="return hs.expand(this, { captionId: 'caption_<?=$list[$i]['wr_id']?>' } )">
-->
<a id="thumb_<?=$list[$i]['wr_id']?>" href="<?=$dest_file?>" class="highslide" onclick="return hs.expand(this, { captionId: 'caption_<?=$list[$i]['wr_id']?>' } )">