짧은주소 수정중
This commit is contained in:
1 parent
25bd7430fc
commit
f66300a394
6 files changed
+18
-15
No files matched your search
+1
-1
@@ -229,7 +229,7 @@ if ($is_search_bbs) {
|
||||
|
||||
$write_href = '';
|
||||
if ($member['mb_level'] >= $board['bo_write_level']) {
|
||||
$write_href = './write.php?bo_table='.$bo_table;
|
||||
$write_href = get_pretty_url($bo_table, '', '', 'write');
|
||||
}
|
||||
|
||||
$nobr_begin = $nobr_end = "";
|
||||
|
||||
+7
-4
@@ -61,13 +61,16 @@ if (isset($next['wr_id']) && $next['wr_id']) {
|
||||
|
||||
// 쓰기 링크
|
||||
$write_href = '';
|
||||
if ($member['mb_level'] >= $board['bo_write_level'])
|
||||
$write_href = './write.php?bo_table='.$bo_table;
|
||||
if ($member['mb_level'] >= $board['bo_write_level']) {
|
||||
$write_href = get_pretty_url($bo_table, '', '', 'write');
|
||||
}
|
||||
|
||||
// 답변 링크
|
||||
$reply_href = '';
|
||||
if ($member['mb_level'] >= $board['bo_reply_level'])
|
||||
$reply_href = './write.php?w=r&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr;
|
||||
if ($member['mb_level'] >= $board['bo_reply_level']) {
|
||||
//$reply_href = './write.php?w=r&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr;
|
||||
$reply_href = get_pretty_url($bo_table, '', 'wr_id='.$wr_id.$qstr, 'write');
|
||||
}
|
||||
|
||||
// 수정, 삭제 링크
|
||||
$update_href = $delete_href = '';
|
||||
|
||||
+5
-5
@@ -2,24 +2,22 @@
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
// 짧은 주소 형식으로 만들어서 가져온다.
|
||||
function get_pretty_url($folder, $no='', $query_string='')
|
||||
function get_pretty_url($folder, $no='', $query_string='', $action='')
|
||||
{
|
||||
global $g5, $config;
|
||||
|
||||
$config['cf_bbs_rewrite'] = 1;
|
||||
|
||||
/*
|
||||
static $boards = array();
|
||||
|
||||
if( ! $boards ){
|
||||
$sql = " select bo_table from {$gml['board_table']} ";
|
||||
$sql = " select bo_table from {$g5['board_table']} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$boards[] = $row['bo_table'];
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// use shortten url
|
||||
if($config['cf_bbs_rewrite']) {
|
||||
@@ -27,7 +25,9 @@ function get_pretty_url($folder, $no='', $query_string='')
|
||||
$url = G5_URL. '/'. $folder;
|
||||
if($no) {
|
||||
$url .= '/'. $no;
|
||||
}
|
||||
} else if($action) {
|
||||
$url .= '/'. $action;
|
||||
}
|
||||
|
||||
} else {
|
||||
$url = G5_URL. '/'.$folder;
|
||||
|
||||
@@ -6,7 +6,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">',
|
||||
?>
|
||||
|
||||
<div class="lat">
|
||||
<h2 class="lat_title"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li>
|
||||
@@ -47,6 +47,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">',
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
<a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
|
||||
</div>
|
||||
@@ -7,7 +7,7 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
?>
|
||||
|
||||
<div class="notice">
|
||||
<h2><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><i class="fa fa-bullhorn" aria-hidden="true"></i><span class="sound_only"><?php echo $bo_subject ?></span></a></h2>
|
||||
<h2><a href="<?php echo get_pretty_url($bo_table); ?>"><i class="fa fa-bullhorn" aria-hidden="true"></i><span class="sound_only"><?php echo $bo_subject ?></span></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li>
|
||||
|
||||
@@ -9,7 +9,7 @@ $thumb_height = 150;
|
||||
?>
|
||||
|
||||
<div class="pic_lt">
|
||||
<h2 class="lat_title"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
@@ -62,6 +62,6 @@ $thumb_height = 150;
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
<a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
|
||||
</div>
|
||||
Reference in new issue
Block a user