초기화면의 최신 글의 내용만을 모달창으로 하려면 2 채택완료
기해년 새해 복 많이 받으십시오~
다시 한번 질문을 올립니다.
초기화면의 최신 글에서 게시물을 클릭하면 다른 것은 안 나타내고 내용만 모달창으로 띄우려고 합니다.
아래 내용은 슈와이님과 sinbi님이 알려주신 코드입니다. 슈와이님이 그누보드 5.3.2.5 원본, php 5.2 버전에서 테스트를 하면 잘 된다고 합니다. * 초기화면의 최신 글의 내용만을 모달창으로 하려면... → https://sir.kr/qa/289530
저는 그누보드 5.1.11 원본, php 5.2 버전, MySQL 5.0 환경이고 적용하여 보았는데 아무런 변화가 없습니다.
무엇이 문제일까요? 단지 버전차이로 변화가 없을까요?
감사합니다.
--- 아 래 ---
// index.php 하단삽입
// latest.skin.php 하단 삽입 {$v['wr_content']}
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
6년 전
</p>
<p>// 수정본입니다.</p>
<p>// index.php 하단삽입</p>
<p><div id="popup"></div>
<div id="bg"></div>
<style>
#popup { position: absolute; z-index:2000; display: none; width: 800px; height: 500px; overflow: auto; background-color: #fff}
#bg { position: absolute; z-index: 1999; top: 0; left: 0; display: none; width:100%; background-color: #000}
</style>
<script>
var $popup = $("#popup"), $bg = $("#bg");
var $latest = $("html").hasClass("lat") ? $(".lat li") : $(".lt li");
$latest.on("click", function(e) {
e.preventDefault();
var i = $(this).index();
var bo_table = $(this).find("a").attr("href").replace(/.+bo_table=([^&]+).+/, '$1');
var html = $("." + bo_table).eq(i).html();
$bg.show().css('height', $(document).height());
$popup.show().html(html).css({'top' : $(window).height()/2 - $popup.height()/2, 'left' : $(window).width()/2 - $popup.width()/2 });
});
$popup.on("click", function() {
$(this).hide();
$bg.hide();
});
</script></p>
<p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 5개
�
6년 전
�
6년 전
// index.php 하단 삽입
<div id="popup"></div>
<div id="bg"></div>
<style>
#popup { position: absolute; z-index:2000; display: none; width: 800px; height: 500px; overflow: auto; background-color: #fff; padding: 5px; }
#bg { position: absolute; z-index: 1999; top: 0; left: 0; display: none; width:100%; background-color: #000}
</style>
<script>
var $popup = $("#popup"), $bg = $("#bg");
var $latest = $("div").hasClass("lat") ? $(".lat li") : $(".lt li");
$latest.on("click", function(e) {
e.preventDefault();
var i = $(this).index();
var bo_table = $(this).find("a").attr("href").replace(/.+bo_table=([^&]+).+/, '$1');
var html = $("." + bo_table).eq(i).html();
$bg.show().css('height', $(document).height());
$popup.show().html(html).css({'top' : $(window).height()/2 - $popup.height()/2, 'left' : $(window).width()/2 - $popup.width()/2 });
});
$popup.on("click", function() {
$(this).hide();
$bg.hide();
});
</script>
// latest.skin.php 하단삽입
<?php
if (count($list)) {
foreach ($list as $view) {
$html = 0;
if (strstr($view['wr_option'], 'html1'))
$html = 1;
else if (strstr($view['wr_option'], 'html2'))
$html = 2;
$view['content'] = conv_content($view['wr_content'], $html);
printf('<div class="%s" style="display:none">%s</div>', $bo_table, $view['content']);
}
}
?>
<div id="popup"></div>
<div id="bg"></div>
<style>
#popup { position: absolute; z-index:2000; display: none; width: 800px; height: 500px; overflow: auto; background-color: #fff; padding: 5px; }
#bg { position: absolute; z-index: 1999; top: 0; left: 0; display: none; width:100%; background-color: #000}
</style>
<script>
var $popup = $("#popup"), $bg = $("#bg");
var $latest = $("div").hasClass("lat") ? $(".lat li") : $(".lt li");
$latest.on("click", function(e) {
e.preventDefault();
var i = $(this).index();
var bo_table = $(this).find("a").attr("href").replace(/.+bo_table=([^&]+).+/, '$1');
var html = $("." + bo_table).eq(i).html();
$bg.show().css('height', $(document).height());
$popup.show().html(html).css({'top' : $(window).height()/2 - $popup.height()/2, 'left' : $(window).width()/2 - $popup.width()/2 });
});
$popup.on("click", function() {
$(this).hide();
$bg.hide();
});
</script>
// latest.skin.php 하단삽입
<?php
if (count($list)) {
foreach ($list as $view) {
$html = 0;
if (strstr($view['wr_option'], 'html1'))
$html = 1;
else if (strstr($view['wr_option'], 'html2'))
$html = 2;
$view['content'] = conv_content($view['wr_content'], $html);
printf('<div class="%s" style="display:none">%s</div>', $bo_table, $view['content']);
}
}
?>
�
6년 전
감사합니다.
여전히 변화가 없으며 biasic으로 하면 작동이 되지 않아 모달창이 뜨지를 않습니다.
제가 너무 죄송한 것 같습니다....ㅜ
여전히 변화가 없으며 biasic으로 하면 작동이 되지 않아 모달창이 뜨지를 않습니다.
제가 너무 죄송한 것 같습니다....ㅜ
�
6년 전
그누보드 원본 5.1.11 버전용
데모 http://shuai0.dothome.co.kr/
데모파일(index.php, latest.skin.php) http://shuai0.dothome.co.kr/g_5.1.11.zip
데모 http://shuai0.dothome.co.kr/
데모파일(index.php, latest.skin.php) http://shuai0.dothome.co.kr/g_5.1.11.zip
�
6년 전
헉! 너무 감사합니다. 이렇게까지 해주시다니...
제가 운영하는 사이트의 index.php와 latest.skin.php에 문제가 있는 것 같습니다.
한 번 자세히 살펴보겠습니다.
테마를 사용하는 것과 상관이 있는 것인지...
채택은 이미 하였지만 너무 너무 감사드립니다. 복 많이 받으실 겁니다.
제가 운영하는 사이트의 index.php와 latest.skin.php에 문제가 있는 것 같습니다.
한 번 자세히 살펴보겠습니다.
테마를 사용하는 것과 상관이 있는 것인지...
채택은 이미 하였지만 너무 너무 감사드립니다. 복 많이 받으실 겁니다.
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
채택
채택
채택
답변대기
채택
채택
채택
답변대기
답변대기
답변대기
채택
채택
채택
채택
채택
채택
채택
답변대기
그런데 변화가 없습니다.
biasic으로 변경했더니 모달창이 아예 뜨지를 않습니다...ㅜㅜ
제가 적용을 잘 하지 못 하는 것 같습니다.