[심심풀이] 회사 연혁 부분을 플러그인으로.. 정보
[심심풀이] 회사 연혁 부분을 플러그인으로..첨부파일
테스트한 버전5.4.5.2
호환 가능 버전5.4
본문
https://sir.kr/g5_skin/571?sfl=wr_subject%7C%7Cwr_content&stx=%EC%97%B0%ED%98%81
회사 연혁 부분을 플러그인으로 변경
-게시판 형식으로 회사연혁 보여주는 부분이 몬가 보기가 좀 그래서 ...
127.0.0.1/history
관리자 로그인
관리자 페이지 수정 가능
data/dbconfig.php 한줄 추가
$g5['history_table'] = G5_TABLE_PREFIX.'history'; //회사연혁
adm //관리자 페이지 부분
extend // 관리자 메뉴 추가
plugin // 플러그 리스트 보는 부분
history //폴더 index.php 파일 ($g5['title'] = "연혁"; //타이틀 변경 가능)
history/index.php
<?php
include_once('_common.php');
$g5['title'] = "회사연혁"; // Title 명칭 변경 이쪽에서..
include_once('../_head.php');
if(defined('G5_THEME_PATH')) {
require_once(G5_THEME_PATH.'/head.php');
require_once(G5_PLUGIN_PATH.'/history/index.php');
require_once(G5_THEME_PATH.'/tail.php');
return;
}
include_once('../_tail.php');
?>
extend
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 아래 return 주석을 풀면 사용안함
//return;
class history {
public $admin_number = 200900; // 관리자모드 출력 장소
public static function getInstance()
{
static $instance = null;
if (null === $instance) {
$instance = new self();
}
return $instance;
}
public static function singletonMethod()
{
return self::getInstance();
}
public function __construct() {
$this->add_hooksv();
}
public function add_hooksv(){
// 관리자 메뉴 추가
add_replace('admin_menu', array($this, 'add_admin_menu'), 1, 1);
}
public function add_admin_menu($admin_menu){
// 관리자 -> 게시판관리 메뉴의 기본키는 menu300 입니다. ( adm/admin.menu300.php 파일을 참고)
//관리자 메뉴 나오는 부분 설정란
$admin_menu['menu200'][] = array(
200900, '회사연혁', G5_ADMIN_URL.'/historylist.php', 'bbs_num_reorder'
);
return $admin_menu;
}
}
$GLOBALS['history'] = history::getInstance();
plugin/history/index.php
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$history_url = G5_PLUGIN_URL."/history";
add_stylesheet('<link rel="stylesheet" href="'.$history_url.'/css/style.css">', 20);
if ($is_admin)
echo '<div class="ctt_admin"><a href="'.G5_ADMIN_URL.'/historylist.php" class="btn_admin btn"><span class="sound_only">내용 수정</span><i class="fa fa-cog fa-spin fa-fw"></i></a></div>';
?>
<div class="sub_con widthfix">
<div class="history_div mt55">
<!-- 목록 시작 -->
<?php
$sql = " SELECT * FROM $g5[history_table] ORDER BY co_year desc ";
$result=sql_query($sql);
$count = 0;
while($data=sql_fetch_array($result)) {
$count++;
$hList[]=$data;
if($preYear != $data['co_year']) {
$preYear = $data['co_year'];
if($count > 1) {
$cicle_img = '<div class="year_body"><span>'.$data['co_year'].'</span></div>';
} else if($count == 1){
$cicle_img = '<div class="year_body first"><span>'.$data['co_year'].'</span></div>';
}
echo ' <div class="p_box '.$margin_top.'">';
echo ' <div class="history_img">'.$cicle_img.'</div>';
echo ' <div class="history_txt">';
$sql_detail = " select * from $g5[history_table] where co_year = $data[co_year] order by co_year desc ";
$result_detail = sql_query($sql_detail);
$history_icon = '';
for ($i=0; $hList = sql_fetch_array($result_detail); $i++) {
if($i == 0) {
if($i > -1) $margin_top = "mt30";
echo '<div class="tit">';
echo ' <h4>'.$hList['co_year'].'</h4>';
echo ' <div class="bar"></div>';
echo '</div>';
}
$disp_month = $hList['co_month'];
$disp_day = $hList['co_day'];
$display = $disp_month.".".$disp_day." ";
echo '<p class="mt5">';
echo $display.rtrim(nl2br($hList['co_content']));
if($thumb['src']) {
$history_icon .= '<div class="history_icon">';
$history_icon .= '<strong>'.$hList[co_year].'</strong>';
$history_icon .= '<p class="tit">'.$thumb['alt'].'</p>';
$history_icon .= '</div>';
}
}
echo ' </div>';
echo $history_icon;
echo ' </div>';
}
}
?>
<div class="p_box">
<div class="history_img"><img src="<?php echo $history_url;?>/css/img/history_start.gif" style="position:absolute;bottom:0;left:83px;" alt="history_start"></div>
<div class="history_txt">
</div>
</div>
</div>
<div class="mt40"></div>
</div>
<script type="text/javascript">
var num = 0;
jQuery(document).ready(function(){
jQuery(".history_img").animate({opacity:0, marginTop:"120px"}, 0);
jQuery(".history_txt").animate({opacity:0, marginTop:"-50px"}, 0);
$(".history_icon").animate({opacity:0, marginTop:"-50px"}, 0);
})
jQuery(window).load(function(){
jQuery(".history_img").each(function(index){
jQuery.easing.def = "easeOutQuart";
num++;
jQuery(".history_img").eq(index).delay((450 * num)).animate({opacity:1, marginTop:"0px"}, 900);
jQuery(".history_txt").eq(index).delay((650 * num)).animate({opacity:1, marginTop:"0px"}, 900);
$(".history_icon").eq(index).delay((650 * num)).animate({opacity:1, marginTop:"0px"}, 600);
})
})
</script>
<!-- } 목록 끝 -->
data\dbconfig.php
$g5['menu_table'] = G5_TABLE_PREFIX.'menu'; // 메뉴관리 테이블
$g5['social_profile_table'] = G5_TABLE_PREFIX.'member_social_profiles'; // 소셜 로그인 테이블
$g5['history_table'] = G5_TABLE_PREFIX.'history'; //회사연혁 한줄 추가해주세요
adm/historylist.php
//DB 추가됩니다. dbconfig.php에 $g5['history_table'] = G5_TABLE_PREFIX.'history'; 추가되야지 작동됩니다.
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['history_table']}` (
`co_id` int(11) NOT NULL AUTO_INCREMENT,
`co_html` tinyint(4) NOT NULL DEFAULT '0',
`co_year` int(4) NOT NULL DEFAULT '0',
`co_month` int(2) NOT NULL DEFAULT '0',
`co_day` int(2) NOT NULL DEFAULT '0',
`co_content` longtext NOT NULL,
PRIMARY KEY (`co_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
플러그인 특성 기능에 아니라 생각하시면 바로 삭제합니다.
2021.4.2 20:28 버그 수정
history_21-6-21.7z 더 최적화 버전입니다.
그냥 파일 업로드 하면 끝
data/dbconfig.php 파일에
$g5['history_table'] = G5_TABLE_PREFIX.'history'; //회사연혁
추가 초 간단..
!-->!-->!-->!-->!-->
추천
17
17
댓글 전체
좋은 자료 올려 주셔서 감사 드립니다.
오 좋습니다. 잘 사용하겠습니다
오오~ 멋진 플러그인 정말 감사드려요! ^-^
추천 꾹 눌러드렸어요~ :)
추천 꾹 눌러드렸어요~ :)
와 깔끔하네요. 감사합니다.
감사합니다.
굿굿!! ♥♥♥
감사합니다.
감사합니다.
감사합니다.
공부하겠습니당 ^^
와우!
첨부파일의 history/index.php 가 잘못된 것 같습니다. 위 글의 내용으로 바꾸니까 잘 됩니다.
우와~ 멋지네요
좋은 기능이네요!
혹시 이거 설치 도와주실분 계신가요?
에러부분 알려주세요
여분필드는 설정한것 같은데...
사실 제가 잘 몰라서요
Warning: Use of undefined constant bo_1 - assumed 'bo_1' (this will throw an Error in a future version of PHP) in /host/home2/daekyng/html/skin/board/history_edit/board_head.skin.php on line 2
Warning: Use of undefined constant bo_2 - assumed 'bo_2' (this will throw an Error in a future version of PHP) in /host/home2/daekyng/html/skin/board/history_edit/board_head.skin.php on line 5
Warning: Use of undefined constant bo_3 - assumed 'bo_3' (this will throw an Error in a future version of PHP) in /host/home2/daekyng/html/skin/board/history_edit/board_head.skin.php on line 9
Warning: Use of undefined constant bo_4 - assumed 'bo_4' (this will throw an Error in a future version of PHP) in /host/home2/daekyng/html/skin/board/history_edit/board_head.skin.php on line 12
회사연혁
Fatal error: Uncaught Error: Call to undefined function mysql_num_rows() in /host/home2/daekyng/html/skin/board/history_edit/list.skin.php:43 Stack trace: #0 /host/home2/daekyng/html/bbs/list.php(255): include_once() #1 /host/home2/daekyng/html/bbs/board.php(237): include_once('/host/home2/dae...') #2 {main} thrown in /host/home2/daekyng/html/skin/board/history_edit/list.skin.php on line 43
사실 제가 잘 몰라서요
Warning: Use of undefined constant bo_1 - assumed 'bo_1' (this will throw an Error in a future version of PHP) in /host/home2/daekyng/html/skin/board/history_edit/board_head.skin.php on line 2
Warning: Use of undefined constant bo_2 - assumed 'bo_2' (this will throw an Error in a future version of PHP) in /host/home2/daekyng/html/skin/board/history_edit/board_head.skin.php on line 5
Warning: Use of undefined constant bo_3 - assumed 'bo_3' (this will throw an Error in a future version of PHP) in /host/home2/daekyng/html/skin/board/history_edit/board_head.skin.php on line 9
Warning: Use of undefined constant bo_4 - assumed 'bo_4' (this will throw an Error in a future version of PHP) in /host/home2/daekyng/html/skin/board/history_edit/board_head.skin.php on line 12
회사연혁
Fatal error: Uncaught Error: Call to undefined function mysql_num_rows() in /host/home2/daekyng/html/skin/board/history_edit/list.skin.php:43 Stack trace: #0 /host/home2/daekyng/html/bbs/list.php(255): include_once() #1 /host/home2/daekyng/html/bbs/board.php(237): include_once('/host/home2/dae...') #2 {main} thrown in /host/home2/daekyng/html/skin/board/history_edit/list.skin.php on line 43
여분필드 아닙니다. 참고로 이건 게시판 스킨 아닙니다.
감사합니다...
ㅠㅠ 하고싶은데 할줄몰아서요
ㅠㅠ 하고싶은데 할줄몰아서요
참조 영상 : https://serviceapi.nmv.naver.com/flash/convertIframeTag.nhn?vid=17DE25D9991FF85921C467F2F9897408C13F&outKey=V126ee33c0f48cb7fc64e1b6811099841c5e0db9794f5ffd708bf1b6811099841c5e0&width=544&height=306
두번째 파일( history_21-6-21.7z (10.3K) 0회 2021-06-21 21:50:42) 다운로드 받아보세요
두번째 파일( history_21-6-21.7z (10.3K) 0회 2021-06-21 21:50:42) 다운로드 받아보세요
진짜 진짜 감사합니다...
이제 수정도해서 배경도 넣기도 하고..
일까지는 필요없어서 월까지만 넣어봤어요..
어려운 시간 내주셔서 감사합니다.
이제 수정도해서 배경도 넣기도 하고..
일까지는 필요없어서 월까지만 넣어봤어요..
어려운 시간 내주셔서 감사합니다.
감사합니다.
좋은 자료 감사합니다.
좋은 자료 감사합니다.
좋은 자료 감사합니다.
아직 포인트가 없어서 설치는 못하지만!
아직 포인트가 없어서 설치는 못하지만!
좋은 자료 감사합니다. 잘 쓰겠습니다.
좋은자료 너무 감사합니다.
ALTER TABLE `g5_history` ADD `co_tag_filter_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `co_content`
1146 : Table 'saimdangsilver.g5_history' doesn't exist
error file : /sid/adm/historywrite.php
테이블생성이 안될때는 어떻게 하면 될런지요??
1146 : Table 'saimdangsilver.g5_history' doesn't exist
error file : /sid/adm/historywrite.php
테이블생성이 안될때는 어떻게 하면 될런지요??
data/dbconfig.php 한줄 추가
$g5['history_table'] = G5_TABLE_PREFIX.'history'; //회사연혁
추가하셨나요?
$g5['history_table'] = G5_TABLE_PREFIX.'history'; //회사연혁
추가하셨나요?
잘쓰겠습니다