day}','{$catid}','{$id}','{$page}','{$pinyin}'),array($categorydir,$catdir,$year,$month,$day,$catid,$id,$page,$pinyin),$urlrule); 42. $create_to_html_root = $category['create_to_html_root'];
43. if(preg_match(\44. if($category['parentid'] && $_match[0]) { 45. foreach ($this->categorys as $_key=>$_value) {
46. if($_value['create_to_html_root'] && $_value['url']==$_match[0].'/')
$create_to_html_root = 1; 47. } 48. } 49. } 50.
51. if($create_to_html_root) { 52. $html_root = ''; 53. } else {
54. $html_root = $this->html_root; 55. } 56.
57. if($content_ishtml && $url) {
58. if (strpos($urls, $domain_dir)!==false) { 59. $url_arr[1] = $html_root.'/'.$urls;
60. $url_arr[0] = str_replace($domain_dir, $url, $urls); 61. } else {
62. $url_arr[1] = $html_root.'/'.$domain_dir.$urls; 63. $url_arr[0] = WEB_PATH == '/' ? $url.$urls :
substr(WEB_PATH,0,-1).$url.$urls; 64. }
65. } elseif($content_ishtml) {
66. $url_arr[0] = WEB_PATH == '/' ? $html_root.'/'.$urls :
substr(WEB_PATH,0,-1).$html_root.'/'.$urls; 67. $url_arr[1] = $html_root.'/'.$urls; 68. } else {
69. $url_arr[0] = $url_arr[1] = APP_PATH.$urls; 70. }
71. //生成静态 ,在添加文章的时候,同时生成静态,不在批量更新URL处调用 72. if($content_ishtml && $data) {
73. $html = pc_base::load_app_class('html', 'content'); 74. $data['id'] = $id;
75. $html->show($url_arr[1],$data); 76. //在添加和修改内容处定义了 INDEX_HTML
77. if(defined('INDEX_HTML')) $html->index();
78. if(defined('RELATION_HTML')) $html->create_relation_html($catid); 79. } 80.
81. return $url_arr; 82. } 复制代码
注意是整个函数替换掉.这个函数是昨天的最新版本.不想替换的可以自己对比和原来函数,只是增加了一段代码.
然后就可以在url规则里使用 {$pinyin} 这个url标志了.注意是内容规则(show),不适用栏目url
16、shtml设置如何设置 解决:
1.
2. 修改url规则的.html变成.shtml
3. 如果你是为静态的就要修改 .htaccess 文件 4. RewriteRule ^index.shtml index.php
5. RewriteRule ^content-([0-9]+)-([0-9]+)-([0-9]+).shtml
index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3
6.
7. RewriteRule ^show-([0-9]+)-([0-9]+)-([0-9]+).shtml
index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3 8. RewriteRule ^pic-([0-9]+)-([0-9]+)-([0-9]+).shtml
index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3 9.
10. RewriteRule ^down-([0-9]+)-([0-9]+)-([0-9]+).shtml
index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3 11.
12. RewriteRule ^list-([0-9]+)-([0-9]+).shtml
index.php?m=content&c=index&a=lists&catid=$1&page=$2
复制代码
17、内容页的标签调用 解决:
1. 2.
3. 直接用字段变量解决 4. 如 : 5. 字段 test
6. 模板中用{$test}即可
复制代码
18、文章评论页调用会员头像 解决:
1. 2. /**
3. * 获取用户头像,建议传入phpssouid
4. * @param $uid 默认为phpssouid
5. * @param $is_userid $uid是否为v9 userid,如果为真,执行sql查询此用户的phpssouid 6. * @param $size 头像大小 有四种[30x30 45x45 90x90 180x180] 默认30 7. */
8. function get_memberavatar($uid, $is_userid='', $size='30'); 复制代码