ar.custom2 lastest 작업중 정보
ar.custom2 lastest 작업중
본문
최소의 코딩, 최대의 효과,
게으른 개발자와 맨탈붕괴디자이너를 위한 맞춤형 lastest 종결자..
<?
$buff=<<<EOT
<div class='box border1'>
<ul class='list1'>
<!--{@ list}-->
<li><a href="{href}">{subject}</a></li>
<!--{/}-->
</ul>
</div>
EOT;
$options=array('width'=>380,'height'=>280,'thumb_count'=>1,'content_len'=>50,'content'=>$buff);
echo latest('ar.custom2', 'society', 5, 50,1,$options);
?>
<?
//$g5[show]=1;
$buff=<<<EOT
<div class='box border1'>
<h2 class="lat_title padding_0 margin-bottom-5">
<a href="{href1}">
<em class="txt_label">{bo_subject}</em>
</a>
</h2>
<a href="{G5_BBS_URL}/board.php?bo_table={bo_table}" class="lt_more"><i class="fa fa-plus" aria-hidden="true"></i></a>
<!--{row1}-->
<li class="size_t2">
<a href="{href}" class="thumb clearfix">
<div class="wrap_thumb">
<span class="thumb_g"><img src="{thumb}" class="thumb_img" alt=""></span>
</div>
<div class="cont_item">
<strong class="tit_item">{subject}</strong>
<p class="tit_content">{content}</p>
<span class="data_item"><span class="txt_info2">{ca_name}</span></span>
</div>
</a>
</li>
<!--{/row1}-->
<ul class='list1'>
<!--{@ list}-->
<li><a href="{href}">{subject}</a></li>
<!--{/}-->
</ul>
</div>
EOT;
$options=array('width'=>170,'height'=>100,'thumb_count'=>1,'content_len'=>50,'content'=>$buff);
echo latest('ar.custom2', 'free', 5, 80,1,$options);
?>
<?php
/* 2018-02-19 howcode.co.kr */
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
//$options=array('width'=>380,'height'=>280,'thumb_count'=>1,'content_len'=>50,'content'=>$buff);
//global $bo_subject;
if (!function_exists('tmp_conv_row1')) {
function tmp_conv_row1($i,$row,$content) {
global $g5,$bo_table,$options;
$bo_table=$g5['bo_table'];
$g5['arr_tr']['{count}']=$i+1;
$g5['arr_tr']['{subject}']=$row['subject'];
$g5['arr_tr']['{subject'.($i+1).'}']=$row['subject'];
$g5['arr_tr']['{wr_subject}']=$row['wr_subject'];
$g5['arr_tr']['{wr_subject'.($i+1).'}']=$row['wr_subject'];
$g5['arr_tr']['{wr_content}']=$row['wr_content'];
$g5['arr_tr']['{wr_content'.($i+1).'}']=$row['wr_content'];
$g5['arr_tr']['{content}']=cut_str(strip_tags2($row['wr_content']),$options['content_len']);
$g5['arr_tr']['{content'.($i+1).'}']=$g5['arr_tr']['{content}'];
$g5['arr_tr']['{href}']=$row['href'];
$g5['arr_tr']['{href'.($i+1).'}']=$row['href'];
$g5['arr_tr']['{ca_name}']=$row['ca_name'];
$g5['arr_tr']['{ca_name'.($i+1).'}']=$row['ca_name'];
$g5['arr_tr']['{wr_datetime}']=$row['wr_datetime'];
$g5['arr_tr']['{wr_datetime'.($i+1).'}']=$row['wr_datetime'];
$g5['arr_tr']['{datetime}']=$row['datetime2'];
$g5['arr_tr']['{datetime'.($i+1).'}']=$row['datetime2'];
$g5['arr_tr']['{wr_name}']=$row['wr_name'];
$g5['arr_tr']['{wr_name'.($i+1).'}']=$row['wr_name'];
$g5['arr_tr']['{wr_comment}']=number_format($row['wr_comment']);
$g5['arr_tr']['{wr_comment'.($i+1).'}']=number_format($row['wr_comment']);
$row['mb_icon']='';
$mb_dir = substr($row['mb_id'],0,2);
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$row['mb_id'].'.gif';
if (file_exists($icon_file)) {
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$row['mb_icon']=G5_DATA_URL.'/member/'.$mb_dir.'/'.$row['mb_id'].'.gif';
}
$g5['arr_tr']['{mb_icon}']=$row['mb_icon'];
if($options['width']) {
if (!$options['thumb_count']) $options['thumb_count']=999;
if ($row['icon_secret']) $g5['arr_tr']['{subject}'].="<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
$thumb=array();
if ($options['height'] && $options['width'] && $options['thumb_count']-->0) {
$thumb = get_list_thumbnail($bo_table, $row['wr_id'], $options['width'], $options['height'], false, true);
}
if(!$thumb['src'] && $options['width']) {
if($addr=ar_check_youtube_id($row["wr_link1"].$row["wr_content"])) {
$src_file=ar_get_default_youtube_img($addr,$options['width']); //유튜브 크기별 기본 섬네일
$thumb['src']=$src_file;
}
}
if($thumb['src'])
$g5['arr_tr']['{thumb}']=$thumb['src'];
else
$g5['arr_tr']['{thumb}']='noimg';
}
if ($row['icon_new']) $g5['arr_tr']['{subject}'].="<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";
if ($row['icon_hot']) $g5['arr_tr']['{subject}'].="<span class=\"hot_icon\">H<span class=\"sound_only\">인기글</span></span>";
return strtr($content,$g5['arr_tr']);
}
}
//if (!$g5[show]) return;
$content=$options['content'];
$g5['bo_subject']=$bo_subject;
$g5['bo_table']=$bo_table;
$g5['arr_tr']=array();
$g5['arr_tr']['{bo_table}']=$bo_table;
$g5['arr_tr']['G5_BBS_URL']=G5_BBS_URL;
$g5['arr_tr']['G5_URL']=G5_URL;
$g5['arr_tr']['{bo_subject}']=$g5['bo_subject'];
$content=strtr($content,$g5['arr_tr']);
foreach($list as $i=>$row) {
if (preg_match('/<!--\{row'.($i+1).'\}-->(.*)<!--\{\/row'.($i+1).'\}-->/is',$content,$match)) {
$buff=tmp_conv_row1($i,$row,$match[0]);
$content=str_replace($match[0],$buff,$content);
$list[$i]=array();
}
}
if (!preg_match('/(.*)<!--\{@ list\}-->(.*)<!--\{\/\}-->(.*)/is',$content,$match)) {
echo $content;
return;
}
if ($g5[show]) {
//echo "<xmp>";
//var_dump($match);
//echo "</xmp>";
}
//echo "</xmp>";
//exit;
$out='';
for ($i=0; $i<count($list); $i++) {
if (!$list[$i]) continue;
$buff=tmp_conv_row1($i,$list[$i],$match[2]);
$out.=str_replace($match[2],$buff,$match[2]);
}
$out=$match[1].$out.$match[3];
$out=strtr($out,$g5['arr_tr']);
unset($g5['arr_tr'],$match);
echo $out;
//echo "</xmp>";
추천
1
1
댓글 3개

어머나 [code] 여긴 이상하군. 별천진가?

@로빈아빠 여긴 적용이 안된듯 합니다.
@리자님께 건의를 해보심이.....ㅎㅎ
@리자님께 건의를 해보심이.....ㅎㅎ

[code]안먹히네요