Browse Source

伪静态修改

develop
叙述、别离 1 month ago
parent
commit
be94584ca5
5 changed files with 18 additions and 18 deletions
  1. +2
    -2
      src/admin/templets/catalog_add.htm
  2. +2
    -2
      src/admin/templets/catalog_add_quick.htm
  3. +2
    -2
      src/admin/templets/catalog_edit.htm
  4. +10
    -10
      src/system/archive/archives.class.php
  5. +2
    -2
      src/system/helpers/channelunit.helper.php

+ 2
- 2
src/admin/templets/catalog_add.htm View File

@@ -247,8 +247,8 @@
<p>{typedir} 栏目保存目录</p>
<p>{cc} 日期加混编id后用转换为适合字母</p>
<p>伪静态规则(Nginx)</p>
<p>rewrite ^/doc-([0-9]+).html$ /apps/view.php?arcID=$1;</p>
<span>rewrite ^/doc-([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2;</span>
<p>rewrite ^/article-([0-9]+).html$ /apps/view.php?arcID=$1;</p>
<span>rewrite ^/article-([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2;</span>
</div>
</td>
<td>SEO标题</td>


+ 2
- 2
src/admin/templets/catalog_add_quick.htm View File

@@ -105,8 +105,8 @@
<p>{typedir} 栏目保存目录</p>
<p>{cc} 日期加混编id后用转换为适合字母</p>
<p>伪静态规则(Nginx)</p>
<p>rewrite ^/doc-([0-9]+).html$ /apps/view.php?arcID=$1;</p>
<span>rewrite ^/doc-([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2;</span>
<p>rewrite ^/article-([0-9]+).html$ /apps/view.php?arcID=$1;</p>
<span>rewrite ^/article-([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2;</span>
</div>
</td>
<td>默认页的名称</td>


+ 2
- 2
src/admin/templets/catalog_edit.htm View File

@@ -230,8 +230,8 @@
<p>{typedir} 栏目保存目录</p>
<p>{cc} 日期加混编id后用转换为适合字母</p>
<p>伪静态规则(Nginx)</p>
<p>rewrite ^/doc-([0-9]+).html$ /apps/view.php?arcID=$1;</p>
<span>rewrite ^/doc-([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2;</span>
<p>rewrite ^/article-([0-9]+).html$ /apps/view.php?arcID=$1;</p>
<span>rewrite ^/article-([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2;</span>
</div>
</td>
<td>SEO标题</td>


+ 10
- 10
src/system/archive/archives.class.php View File

@@ -859,7 +859,7 @@ class Archives
foreach ($this->SplitTitles as $k => $v) {
if ($i == 1) {
if ($cfg_rewrite == 'Y') {
$revalue .= "<a href='/doc-$aid-$i.html'>$v</a>";
$revalue .= "<a href='/article-$aid-$i.html'>$v</a>";
} else {
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>";
}
@@ -868,7 +868,7 @@ class Archives
$revalue .= " $v ";
} else {
if ($cfg_rewrite == 'Y') {
$revalue .= "<a href='/doc-$aid-$i.html'>$v</a>";
$revalue .= "<a href='/article-$aid-$i.html'>$v</a>";
} else {
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>";
}
@@ -882,20 +882,20 @@ class Archives
foreach ($this->SplitTitles as $k => $v) {
if ($i == 1) {
if ($cfg_rewrite == 'Y') {
$revalue .= "<option value='/doc-$aid-$i.html'>{$i}、{$v}</option>";
$revalue .= "<option value='/article-$aid-$i.html'>{$i}、{$v}</option>";
} else {
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>";
}
} else {
if ($pageNo == $i) {
if ($cfg_rewrite == 'Y') {
$revalue .= "<option value='/doc-$aid-$i.html' selected>{$i}、{$v}</option>";
$revalue .= "<option value='/article-$aid-$i.html' selected>{$i}、{$v}</option>";
} else {
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i' selected>{$i}、{$v}</option>";
}
} else {
if ($cfg_rewrite == 'Y') {
$revalue .= "<option value='/doc-$aid-$i.html'>{$i}、{$v}</option>";
$revalue .= "<option value='/article-$aid-$i.html'>{$i}、{$v}</option>";
} else {
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>";
}
@@ -930,13 +930,13 @@ class Archives
} else {
if ($nPage == 1) {
if ($cfg_rewrite == 'Y') {
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/doc-$aid.html'>上页</a></li>";
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/article-$aid.html'>上页</a></li>";
} else {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->Fields['phpurl']."/view.php?aid=$aid'>上页</a></li>";
}
} else {
if ($cfg_rewrite == 'Y') {
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/doc-$aid-$nPage.html'>上页</a></li>";
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/article-$aid-$nPage.html'>上页</a></li>";
} else {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$nPage'>上页</a></li>";
}
@@ -946,7 +946,7 @@ class Archives
if ($i == 1) {
if ($nowPage != 1) {
if ($cfg_rewrite == 'Y') {
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/doc-$aid.html'>1</a></li>";
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/article-$aid.html'>1</a></li>";
} else {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->Fields['phpurl']."/view.php?aid=$aid'>1</a></li>";
}
@@ -957,7 +957,7 @@ class Archives
$n = $i;
if ($nowPage != $i) {
if ($cfg_rewrite == 'Y') {
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/doc-$aid-$i.html'>{$n}</a></li>";
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/article-$aid-$i.html'>{$n}</a></li>";
} else {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$n}</a></li>";
}
@@ -968,7 +968,7 @@ class Archives
}
if ($lPage <= $totalPage) {
if ($cfg_rewrite == 'Y') {
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/doc-$aid-$lPage.html'>下页</a></li>";
$PageList .= "<li class='page-item'><a class='page-link' href='".$cfg_cmsurl."/article-$aid-$lPage.html'>下页</a></li>";
} else {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$lPage'>下页</a></li>";
}


+ 2
- 2
src/system/helpers/channelunit.helper.php View File

@@ -205,8 +205,8 @@ if (!function_exists('GetFileName')) {
//动态文档
if ($rank != 0 || $ismake == -1 || $typeid == 0 || $money > 0) {
if ($cfg_rewrite == 'Y') {
//开启伪静态文档/doc-1.html、/doc-2.html,则分页/doc-1-1.html、/doc-1-2.html
return $GLOBALS['cfg_cmspath']."/doc-".$aid.".html";
//开启伪静态文档/article-1.html、/article-2.html,则分页/article-1-1.html、/article-1-2.html
return $GLOBALS['cfg_cmspath']."/article-".$aid.".html";
} else {
return $GLOBALS['cfg_phpurl']."/view.php?aid=$aid";
}


Loading…
Cancel
Save