주목님의 달력스킨에 랜덤적용... 정보
최신글 주목님의 달력스킨에 랜덤적용...첨부파일
본문
주목님의 달력스킨(http://www.sir.co.kr/bbs/tb.php/g4_skin/8833)에 랜덤 적용...
새로고침할때마다 색상이 변합니다...
3분만에 후딱 만들어 지더군요...
잡스런 짜집퍼 인생...
스킨 및 겉모습은 주목님의 스킨과 똑같으므로 스샷은 올리지 않겠습니다.
적용법은 원제작자이신 짚신님의 방법(http://www.sir.co.kr/bbs/tb.php/g4_skin/1519 )과 똑같습니다...
전에 주목님의 스킨을 받아 적용중이라면 ./lib/latest.lib.php에 추가하신부분 삭제하시고 아래 짚신님의 원소스로 회귀해야 합니다...
적용법도
<? echo latest_schedule("calendar","게시판이름","색상명"); ?>이 아니라
그냥 <? echo latest_schedule("calendar","게시판이름"); ?>입니다.
아래 짚신님 스킨의 언급 참고하세요.
1. ./lib/latest.lib.php 파일을 열어서 맨아래에 다음을 추가한다.
//=============================================================
function latest_schedule($skin_dir='', $bo_table)
{
global $config;
global $g4;
global $year, $month;
// 스킨디렉토리값이 넘어왔다면
if ($skin_dir) {
$latest_skin_path = "./$g4[path]/skin/latest/$skin_dir";
}
$write_table = $g4[write_prefix] . $bo_table;
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
//==============================================================
2. schedulex 폴더와 내용을 skin/board/ 에 복사한다.
3. calendar 폴더와 내용을 skin/latest/ 에 복사한다.
4. 일정관리 게시판을 추가하고 스킨을 schedulex 로 선택한다.
5.pop_schedule.php 파일을 root directory에 복사한다.
6. index.php 달력을 보이고 싶은 위치에
<? echo latest_schedule("calendar","게시판이름"); ?>
를 추가한다.
새로고침할때마다 색상이 변합니다...
3분만에 후딱 만들어 지더군요...
잡스런 짜집퍼 인생...
스킨 및 겉모습은 주목님의 스킨과 똑같으므로 스샷은 올리지 않겠습니다.
적용법은 원제작자이신 짚신님의 방법(http://www.sir.co.kr/bbs/tb.php/g4_skin/1519 )과 똑같습니다...
전에 주목님의 스킨을 받아 적용중이라면 ./lib/latest.lib.php에 추가하신부분 삭제하시고 아래 짚신님의 원소스로 회귀해야 합니다...
적용법도
<? echo latest_schedule("calendar","게시판이름","색상명"); ?>이 아니라
그냥 <? echo latest_schedule("calendar","게시판이름"); ?>입니다.
아래 짚신님 스킨의 언급 참고하세요.
1. ./lib/latest.lib.php 파일을 열어서 맨아래에 다음을 추가한다.
//=============================================================
function latest_schedule($skin_dir='', $bo_table)
{
global $config;
global $g4;
global $year, $month;
// 스킨디렉토리값이 넘어왔다면
if ($skin_dir) {
$latest_skin_path = "./$g4[path]/skin/latest/$skin_dir";
}
$write_table = $g4[write_prefix] . $bo_table;
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
//==============================================================
2. schedulex 폴더와 내용을 skin/board/ 에 복사한다.
3. calendar 폴더와 내용을 skin/latest/ 에 복사한다.
4. 일정관리 게시판을 추가하고 스킨을 schedulex 로 선택한다.
5.pop_schedule.php 파일을 root directory에 복사한다.
6. index.php 달력을 보이고 싶은 위치에
<? echo latest_schedule("calendar","게시판이름"); ?>
를 추가한다.
추천
0
0
댓글 전체
ㅡㅜ
1.
메인화면 상단에
function latest_schedule($skin_dir='', $bo_table) { global $config; global $g4; global $year, $month; // 스킨디렉토리값이 넘어왔다면 if ($skin_dir) { $latest_skin_path = "./$g4[path]/skin/latest/$skin_dir"; } $write_table = $g4[write_prefix] . $bo_table; ob_start(); include "$latest_skin_path/latest.skin.php"; $content = ob_get_contents(); ob_end_clean(); return $content; }
==> 이런 에러가 뜨구요.
2.
<? echo latest_schedule("calendar","게시판이름"); ?> 를 입력한 곳에
Fatal error: Call to undefined function: latest_schedule() in /home/hosting_users/www/bbs2/index.php on line 25
==> 이런 에러가 뜨네요. 왜 그런 것인지...
큰 달력이나 글 쓰기 폼은 이상없이 출력되는데, 메인화면의 새끼 달력은 볼 수가 없네요.
아시는 분께 도움 부탁드립니다.
1.
메인화면 상단에
function latest_schedule($skin_dir='', $bo_table) { global $config; global $g4; global $year, $month; // 스킨디렉토리값이 넘어왔다면 if ($skin_dir) { $latest_skin_path = "./$g4[path]/skin/latest/$skin_dir"; } $write_table = $g4[write_prefix] . $bo_table; ob_start(); include "$latest_skin_path/latest.skin.php"; $content = ob_get_contents(); ob_end_clean(); return $content; }
==> 이런 에러가 뜨구요.
2.
<? echo latest_schedule("calendar","게시판이름"); ?> 를 입력한 곳에
Fatal error: Call to undefined function: latest_schedule() in /home/hosting_users/www/bbs2/index.php on line 25
==> 이런 에러가 뜨네요. 왜 그런 것인지...
큰 달력이나 글 쓰기 폼은 이상없이 출력되는데, 메인화면의 새끼 달력은 볼 수가 없네요.
아시는 분께 도움 부탁드립니다.
언급하신글로보아 latest.lib.php 맨 하단에
?>를 추가하여 닫아 주셔야 할듯...
중간에 ?>가 있으면 안됩니다...맨끝에 가있어야죠...
참고로 제 latest.lib.php는 다음과 같습니다...
--------------------------------------------------------------------------------------------------------------------------------
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $brch="")
{
global $config;
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/$config[cf_latest_skin]";
$list = array();
$sql = " select * from {$g4[board_table]} where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4[write_prefix] . $bo_table; // 게시판 테이블 전체이름
if ($brch == "H") // 넘어온 값이 "H" 즉 hit 일때
$brch = "wr_hit"; // hit 순으로 쿼리
elseif ($brch == "C") // 넘어온 값이 "C" 즉 comment 일때
$brch ="wr_comment"; // comment 순으로 쿼리
elseif ($brch == "R") //넘온값이 "R" 즉 random 일때
$brch = "rand()"; // 랜덤 쿼리
elseif ($brch == "G") //넘온값이 "G" 즉 추천 일때
$brch = "wr_good"; // 추천 쿼리
else // 넘어온값이 없거나 그이외 일때
$brch = "wr_id"; // 걍 최근순으로 쿼리
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by $brch desc limit 0, $rows ";
//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
// 일정관리 팝업열기
function latest_schedule($skin_dir='', $bo_table)
{
global $config;
global $g4;
global $year, $month;
// 스킨디렉토리값이 넘어왔다면
if ($skin_dir) {
$latest_skin_path = "./$g4[path]/skin/latest/$skin_dir";
}
$write_table = $g4[write_prefix] . $bo_table;
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
----------------------------------------------------------------------------------------------------------------------------
?>를 추가하여 닫아 주셔야 할듯...
중간에 ?>가 있으면 안됩니다...맨끝에 가있어야죠...
참고로 제 latest.lib.php는 다음과 같습니다...
--------------------------------------------------------------------------------------------------------------------------------
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $brch="")
{
global $config;
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/$config[cf_latest_skin]";
$list = array();
$sql = " select * from {$g4[board_table]} where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4[write_prefix] . $bo_table; // 게시판 테이블 전체이름
if ($brch == "H") // 넘어온 값이 "H" 즉 hit 일때
$brch = "wr_hit"; // hit 순으로 쿼리
elseif ($brch == "C") // 넘어온 값이 "C" 즉 comment 일때
$brch ="wr_comment"; // comment 순으로 쿼리
elseif ($brch == "R") //넘온값이 "R" 즉 random 일때
$brch = "rand()"; // 랜덤 쿼리
elseif ($brch == "G") //넘온값이 "G" 즉 추천 일때
$brch = "wr_good"; // 추천 쿼리
else // 넘어온값이 없거나 그이외 일때
$brch = "wr_id"; // 걍 최근순으로 쿼리
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by $brch desc limit 0, $rows ";
//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
// 일정관리 팝업열기
function latest_schedule($skin_dir='', $bo_table)
{
global $config;
global $g4;
global $year, $month;
// 스킨디렉토리값이 넘어왔다면
if ($skin_dir) {
$latest_skin_path = "./$g4[path]/skin/latest/$skin_dir";
}
$write_table = $g4[write_prefix] . $bo_table;
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
----------------------------------------------------------------------------------------------------------------------------
ㄳㄳㄴ
^^