Files
dnssash/theme/rd.dnssash/rb.custom/tech_section/module.php
T
2026-06-11 18:47:38 +09:00

48 lines
1.6 KiB
PHP

<?php
if (!defined('_GNUBOARD_')) exit;
/**
* rb.custom :: tech_section/module.php
* '신기술' 최신글 모듈
*/
// 💡 [최종 수정] 이 모듈은 독립적으로 동작하므로, 다른 모듈과 충돌하지 않는 자신만의 고유 ID를 생성합니다.
$tech_id = 'ts_' . uniqid();
?>
<div class="tech-section-module" id="<?php echo $tech_id; ?>">
<!-- <h2>신기술</h2>-->
<?php
// 💡 [최종 수정] latest() 함수의 4번째 인자(subject_len)를 0으로 설정하여 제목과 '더보기' 링크를 모두 제거합니다.
echo latest('theme/pic_block', 'newtech', 5, 0);
?>
</div>
<link rel="stylesheet" href="<?php echo G5_THEME_URL; ?>/rb.custom/tech_section/module.css?ver=<?php echo G5_CSS_VER; ?>">
<script>
(function() {
var currentModuleId = '<?php echo $tech_id; ?>';
var initFunctionName = 'initTechModule';
var scriptId = 'tech-module-script-' + currentModuleId;
if (document.getElementById(scriptId)) {
if (typeof window[initFunctionName] === 'function') {
window[initFunctionName](currentModuleId);
}
return;
}
var script = document.createElement('script');
script.id = scriptId;
script.src = '<?php echo G5_THEME_URL; ?>/rb.custom/tech_section/module.js?ver=<?php echo G5_JS_VER; ?>';
script.async = true;
script.onload = function() {
if (typeof window[initFunctionName] === 'function') {
window[initFunctionName](currentModuleId);
}
};
document.head.appendChild(script);
})();
</script>