<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>何苦.org - KingCMS与SEO</title><link>http://www.heku.org/</link><description>热爱互联网,专注搜索引擎营销 - </description><generator>RainbowSoft Studio Z-Blog 1.8 Devo Build 80201</generator><language>zh-CN</language><copyright>Copyright 何苦.org. Some Rights Reserved.</copyright><pubDate>Thu, 09 Sep 2010 04:06:29 +0800</pubDate><item><title>kingcms安装在Godaddy文件上传问题</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/117.html</link><pubDate>Tue, 30 Mar 2010 04:26:54 +0800</pubDate><guid>http://www.heku.org/KingCMS/117.html</guid><description><![CDATA[<p>&nbsp;</p><p>&nbsp;</p><p style="padding: 0px; margin: 10px 0px 15px;">一直没有用到KingCMS的上传功能，突然发现上传不能使用，提示目录没有权限，同样还是目录级别的问题。</p><p style="padding: 0px; margin: 10px 0px 15px;">需要修改两个地方：</p><div class="codeText"><div class="codeHead">/你的文件或站点目录/page/system/config.asp</div><ol class="dp-vb">    <li style="padding: 0px; margin: 0px;" class="alt"><span><span class="comment">'上传目录<span class="Apple-converted-space">&nbsp;</span></span><span>&nbsp;&nbsp;</span></span></li>    <li style="padding: 0px; margin: 0px;"><span>&nbsp;const&nbsp;king_upath&nbsp;=&nbsp;</span><span class="string">&quot;你的文件或站点目录/up_files&quot;</span><span>&nbsp;&nbsp;</span></li></ol></div><p style="padding: 0px; margin: 10px 0px 15px;">同样多级目录跟着相应增加</p><p style="padding: 0px; margin: 10px 0px 15px;">因为扩展性不强，每次安装在gd目录一旦改变目录级别就需要修改，于是写了一个小函数</p><div class="codeText"><div class="codeHead">将这段代码加在需要加的位置里，然后使用filepath函数就行</div><ol class="dp-vb">    <li style="padding: 0px; margin: 0px;" class="alt"><span><span class="keyword">Dim</span><span>&nbsp;filepath,f1,f2 &nbsp;&nbsp;</span></span></li>    <li style="padding: 0px; margin: 0px;"><span>f1=server.mappath(</span><span class="string">&quot;/&quot;</span><span>) &nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>f2=server.mappath(</span><span class="string">&quot;fun.asp&quot;</span><span>) &nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;"><span>filepath=replace(right(f2,len(f2)-len(f1)),</span><span class="string">&quot;\&quot;,&quot;</span><span>/</span><span class="string">&quot;)<span class="Apple-converted-space">&nbsp;</span></span>&nbsp;</li>    <li style="padding: 0px; margin: 0px;" class="alt"><span><span class="string">Dim&nbsp;reg&nbsp;<span class="Apple-converted-space">&nbsp;</span></span>&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;"><span><span class="string">set&nbsp;reg&nbsp;=&nbsp;New&nbsp;RegExp&nbsp;<span class="Apple-converted-space">&nbsp;</span></span>&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span><span class="string">reg.pattern&nbsp;=&nbsp;&quot;</span><span>/\w{1}.\w*/\w*/\w*.asp</span><span class="string">&quot;<span class="Apple-converted-space">&nbsp;</span></span>&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;"><span><span class="string">reg.IgnoreCase&nbsp;=false<span class="Apple-converted-space">&nbsp;</span></span>&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span><span class="string">reg.Global&nbsp;=&nbsp;True&nbsp;<span class="Apple-converted-space">&nbsp;</span></span>&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;"><span><span class="string">filepath=reg.Replace(filepath,&quot;</span><span>&quot;)&nbsp;&nbsp;</span></span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span><span class="comment">'上传目录<span class="Apple-converted-space">&nbsp;</span></span><span>&nbsp;&nbsp;</span></span></li>    <li style="padding: 0px; margin: 0px;"><span>&nbsp;const&nbsp;king_upath&nbsp;=&nbsp;<font color="#0000ff">filepath&amp;</font></span><span class="string">&quot;up_files&quot;</span><span>&nbsp;</span></li></ol></div><p style="padding: 0px; margin: 10px 0px 15px;">这个没写成全局函数，因为可能牵涉要改的函数太多了，比如ad模块的ssi也需要修改类似的路径。</p><p style="padding: 0px; margin: 10px 0px 15px;">第二个需要修改的是fckeditor的上传函数</p><div class="codeText"><div class="codeHead">找到/你的文件或站点目录/admin/system/editor/FCKeditor/editor/filemanager/connectors/asp/config.asp</div><ol class="dp-vb">    <li style="padding: 0px; margin: 0px;" class="alt"><span><span class="comment">'&nbsp;You&nbsp;should&nbsp;look&nbsp;at&nbsp;the&nbsp;settings&nbsp;for&nbsp;each&nbsp;resource&nbsp;type&nbsp;to&nbsp;get&nbsp;the&nbsp;full&nbsp;potential<span class="Apple-converted-space">&nbsp;</span></span><span>&nbsp;&nbsp;</span></span></li>    <li style="padding: 0px; margin: 0px;"><span class="keyword">Dim</span><span>&nbsp;ConfigUserFilesPath &nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>ConfigUserFilesPath&nbsp;=&nbsp;</span><span class="string">&quot;/你的文件或站点目录/up_files/&quot;</span><span>&nbsp;&nbsp;</span></li></ol></div><p style="padding: 0px; margin: 10px 0px 15px;">&nbsp;</p><p style="padding: 0px; margin: 10px 0px 15px;">另外就是godaddy上的时间格式和国内主机的格式不一样，使用date()函数的话是这样显示 &quot;7/11/2009&quot; 而不是 &quot;2009-7-11&quot; 如果是作为目录的话就多了很多层级也容易出错，所以要写成这样</p><div class="codeText"><div class="codeHead">自定义一个date函数，格式成想要的样子</div><ol class="dp-vb">    <li style="padding: 0px; margin: 0px;" class="alt"><span><span class="keyword">Dim</span><span>&nbsp;dDate &nbsp;&nbsp;</span></span></li>    <li style="padding: 0px; margin: 0px;"><span>dDate&nbsp;=&nbsp;Year(Now)&nbsp;&amp;&nbsp;</span><span class="string">&quot;-&quot;</span><span>&nbsp;&amp;&nbsp;Month(Now)&nbsp;&amp;&nbsp;</span><span class="string">&quot;-&quot;</span><span>&nbsp;&amp;&nbsp;Day(Now)&nbsp;&nbsp;</span></li></ol></div><p style="padding: 0px; margin: 10px 0px 15px;">具体用的地方比如fckeditor上传目录的设置</p><div class="codeText"><div class="codeHead">找到/你的文件或站点目录/admin/system/editor/FCKeditor/editor/filemanager/connectors/asp/config.asp;其他格式的上传也可以这样修改</div><ol class="dp-vb">    <li style="padding: 0px; margin: 0px;" class="alt"><span><span class="keyword">Dim</span><span>&nbsp;dDate &nbsp;&nbsp;</span></span></li>    <li style="padding: 0px; margin: 0px;"><span>dDate&nbsp;=&nbsp;Year(Now)&nbsp;&amp;&nbsp;</span><span class="string">&quot;-&quot;</span><span>&nbsp;&amp;&nbsp;Month(Now)&nbsp;&amp;&nbsp;</span><span class="string">&quot;-&quot;</span><span>&nbsp;&amp;&nbsp;Day(Now) &nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>&nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;"><span>ConfigAllowedExtensions.Add&nbsp;</span><span class="string">&quot;Image&quot;</span><span>,&nbsp;</span><span class="string">&quot;bmp|gif|jpeg|jpg|png&quot;</span><span>&nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>ConfigDeniedExtensions.Add&nbsp;&nbsp;</span><span class="string">&quot;Image&quot;</span><span>,&nbsp;</span><span class="string">&quot;&quot;</span><span>&nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;"><span>ConfigFileTypesPath.Add&nbsp;</span><span class="string">&quot;Image&quot;</span><span>,&nbsp;ConfigUserFilesPath&nbsp;&amp;&nbsp;</span><span class="string">&quot;image/&quot;</span><span>&amp;dDate &nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>ConfigFileTypesAbsolutePath.Add&nbsp;</span><span class="string">&quot;Image&quot;</span><span>,&nbsp;</span><span class="string">&quot;&quot;</span><span>&nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;"><span>ConfigQuickUploadPath.Add&nbsp;</span><span class="string">&quot;Image&quot;</span><span>,&nbsp;ConfigUserFilesPath&amp;&nbsp;</span><span class="string">&quot;image/&quot;</span><span>&amp;dDate &nbsp;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>ConfigQuickUploadAbsolutePath.Add&nbsp;</span><span class="string">&quot;Image&quot;</span><span>,&nbsp;</span><span class="string">&quot;&quot;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span><span>ConfigAllowedExtensions.Add&nbsp;&quot;Flash&quot;, &quot;swf|flv&quot;</span></span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>ConfigDeniedExtensions.Add&nbsp;&quot;Flash&quot;, &quot;&quot;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>ConfigFileTypesPath.Add &quot;Flash&quot;, ConfigUserFilesPath &amp; &quot;flash/<font color="#0000ff">&quot;<span class="Apple-converted-space">&nbsp;</span></font><span>&amp;dDate</span></span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>ConfigFileTypesAbsolutePath.Add &quot;Flash&quot;, &quot;&quot;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>ConfigQuickUploadPath.Add &quot;Flash&quot;, ConfigUserFilesPath &amp; &quot;flash/<font color="#0000ff">&quot;<span class="Apple-converted-space">&nbsp;</span></font><span>&amp;dDate</span></span></li>    <li style="padding: 0px; margin: 0px;" class="alt"><span>ConfigQuickUploadAbsolutePath.Add &quot;Flash&quot;, &quot;&quot;&nbsp;</span></li>    <li style="padding: 0px; margin: 0px;" class="alt">&nbsp;</li>    <li style="padding: 0px; margin: 0px;" class="alt">............</li></ol></div><p>&nbsp;</p><p>原文链接:<a href="http://www.s-un.cn/Code/KingCMS-install-on-Godaddy-4.shtml">http://www.s-un.cn/Code/KingCMS-install-on-Godaddy-4.shtml</a></p><p>&nbsp;</p><p><strong><br type="_moz" /></strong></p><p><strong>何苦的测试结果</strong></p><p>&nbsp;</p><p>1.加上了函数以后没法登陆. 大概是我不懂程序的问题...</p><p>2.直接修改了路径,上传的图片是可以显示了. 但是图片的路径地址是 带空间完整路径的. (这个不大好说明白,用过Godaddy空间的朋友应该可以理解).&nbsp;&nbsp; 目前的空间用起来倒是没什么问题.&nbsp; 但是换到非Godaddy空间恐怕图片显示还是会有问题.</p><p>&nbsp;</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/117.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=117</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=117&amp;key=7333edcc</trackback:ping></item><item><title>正则表达式--替换网址</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/zhengze-url.html</link><pubDate>Fri, 15 May 2009 20:15:42 +0800</pubDate><guid>http://www.heku.org/KingCMS/zhengze-url.html</guid><description><![CDATA[<p>&nbsp;([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?</p><p>&nbsp;</p><p>替换掉内容中的 网址.</p><p>&nbsp;</p><p>可在 DW中执行.</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/zhengze-url.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=92</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=92&amp;key=3ada5b2f</trackback:ping></item><item><title>KingCMS分页链接增加斜杠的修改</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/KingCMS_list_code.html</link><pubDate>Mon, 23 Mar 2009 02:30:51 +0800</pubDate><guid>http://www.heku.org/KingCMS/KingCMS_list_code.html</guid><description><![CDATA[<p><strong>问题:</strong>KingCMS的列表页页码链接处,链接结尾都不是/结尾,会被当作301处理,在Godaddy的服务器也有问题.</p><p>先转贴下Ash的处理总结.</p><p>---------我是分割线---------------</p><p>找了一下，修改page/system/fun.asp，搜索'pagelist，大概在2684行</p><p>function pagelist(l1,l2,l3,l5)<br />&nbsp;if instr(l1,&quot;$&quot;)=0 then exit function<br />&nbsp;if l5=0 then exit function<br />&nbsp;dim l4,k,l6,l7,I2<br />&nbsp;l2=int(l2):l3=int(l3):l5=int(l5)<br />&nbsp;if l2&gt;3 then <br />&nbsp;&nbsp;l4=(&quot;&lt;a href=&quot;&quot;&quot;&amp;replace(l1,&quot;$&quot;,&quot;&quot;)&amp;&quot;&quot;&quot;&gt;1 ...&lt;/a&gt;&quot;)'<br />&nbsp;end if<br />&nbsp;if l2&gt;2 then<br />&nbsp;&nbsp;l4=l4&amp;(&quot;&lt;a href=&quot;&quot;&quot;&amp;replace(l1,&quot;$&quot;,l2-1)&amp;&quot;&quot;&quot;&gt;&amp;lsaquo;&amp;lsaquo;&lt;/a&gt;&quot;)<br />&nbsp;elseif l2=2 then<br />&nbsp;&nbsp;l4=l4&amp;(&quot;&lt;a href=&quot;&quot;&quot;&amp;replace(l1,&quot;$&quot;,&quot;&quot;)&amp;<span style="background-color: #ff6600">&quot;/&quot;&quot;</span>&gt;&amp;lsaquo;&amp;lsaquo;&lt;/a&gt;&quot;)<br />&nbsp;end if<br />&nbsp;for k=l2-2 to l2+7<br />&nbsp;&nbsp;if k&gt;=1 and k&lt;=l3 then<br />&nbsp;&nbsp;&nbsp;if cstr(k)=cstr(l2) then<br />&nbsp;&nbsp;&nbsp;&nbsp;l4=l4&amp;(&quot;&lt;strong&gt;&quot;&amp;k&amp;&quot;&lt;/strong&gt;&quot;)<br />&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;if k=1 then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l4=l4&amp;(&quot;&lt;a href=&quot;&quot;&quot;&amp;replace(l1,&quot;$&quot;,&quot;&quot;)&amp;&quot;&quot;&quot;&gt;&quot;&amp;k&amp;&quot;&lt;/a&gt;&quot;)<br />&nbsp;&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l4=l4&amp;(&quot;&lt;a href=&quot;&quot;&quot;&amp;replace(l1,&quot;$&quot;,k)&amp;<span style="background-color: #ff6600">&quot;/&quot;&quot;</span>&gt;&quot;&amp;k&amp;&quot;&lt;/a&gt;&quot;)<br />&nbsp;&nbsp;&nbsp;&nbsp;end if<br />&nbsp;&nbsp;&nbsp;end if<br />&nbsp;&nbsp;end if<br />&nbsp;next<br />&nbsp;if l2&lt;l3 and l3&lt;&gt;1 then<br />&nbsp;&nbsp;l4=l4&amp;(&quot;&lt;a href=&quot;&quot;&quot;&amp;replace(l1,&quot;$&quot;,l2+1)&amp;<span style="background-color: #ff6600">&quot;/&quot;&quot;</span>&gt;&amp;rsaquo;&amp;rsaquo;&lt;/a&gt;&quot;)<br />&nbsp;end if<br />&nbsp;if l2&lt;l3-7 then<br />&nbsp;&nbsp;l4=l4&amp;(&quot;&lt;a href=&quot;&quot;&quot;&amp;replace(l1,&quot;$&quot;,l3)&amp;<span style="background-color: #ff6600">&quot;/&quot;&quot;</span>&gt;... &quot;&amp;l3&amp;&quot;&lt;/a&gt;&quot;)<br />&nbsp;end if</p><p>&nbsp;I2=split(l1,&quot;$&quot;)<br />&nbsp;pagelist=&quot;&lt;span class=&quot;&quot;k_pagelist&quot;&quot;&gt;&lt;em&gt;&quot;&amp;l5&amp;&quot;&lt;/em&gt;&quot;&amp;l4&amp;&quot;&lt;/span&gt;&quot;<br />end function</p><p>---------我是分割线---------------</p><p>我之前也做过一个 <a target="_blank" href="http://www.heku.org.cn/KingCMS/KingCMS-list.html">KingCMS列表页的修改</a>&nbsp; 的笔记.不过是个半吊子工程.没有Ash的这么详实.</p><p>按照Ash的修改,今天又发现了一个新问题.</p><p>后台项目列表中 /random/index.asp?action=field&amp;listid=1 这样的页面上的 分页链接也是有问题的.第二页会成为</p><p>&nbsp;/random/index.asp?action=field&amp;pid=2&amp;rn=20&amp;listid=1/ 这样的链接样式. Ash给的方法是在/之前加上一个 &amp; 即可.</p><p>找到了加的地方.在 admin/OO_public/code/admin/index.asp 中,第340行,改成&nbsp;</p><p>&nbsp;&nbsp;dp.purl=&quot;index.asp?action=field&amp;pid=$&amp;rn=&quot;&amp;dp.rn&amp;&quot;&amp;listid=&quot;&amp;listid&amp;&quot;&amp;&quot;</p><p>这里修改的是 自定义模块的通用代码,至于文章模板的,当然应该在 admin/article/index.asp中,修改方法基本一致.</p><p>&nbsp;</p><p>有不明白的再来问我~~</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/KingCMS_list_code.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=89</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=89&amp;key=298ef1ad</trackback:ping></item><item><title>KingCMS后台项目列表每页显示条目改进</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/KingCMS_list_number.html</link><pubDate>Sun, 22 Mar 2009 22:16:15 +0800</pubDate><guid>http://www.heku.org/KingCMS/KingCMS_list_number.html</guid><description><![CDATA[<p><span style="background-color: rgb(204, 255, 255); ">&nbsp;<span class="Apple-tab-span" style="white-space: pre; ">	</span>private sub class_initialize()</span></p><div><span style="background-color: rgb(204, 255, 255); "><span class="Apple-tab-span" style="white-space: pre; ">		</span>r_rn=quest(&quot;rn&quot;,2):if len(r_rn)=0 then r_rn=20</span></div><div><span style="background-color: rgb(204, 255, 255); "><span class="Apple-tab-span" style="white-space: pre; ">		</span> &nbsp; &nbsp;if int(r_rn)>500 then r_rn=200</span></div><div><span style="background-color: rgb(204, 255, 255); "><span class="Apple-tab-span" style="white-space: pre; ">		</span> &nbsp; &nbsp;if 500>int(r_rn)>200 then r_rn=200</span></div><div><span style="background-color: rgb(204, 255, 255); "><span class="Apple-tab-span" style="white-space: pre; ">			</span>if 200>int(r_rn)>100 then r_rn=100</span></div><div><span style="background-color: rgb(204, 255, 255); "><span class="Apple-tab-span" style="white-space: pre; ">			</span>if int(r_rn)&lt;10 then r_rn=10</span></div><div>这个是修改之后的</div><div>&nbsp;</div><div><div><span class="Apple-tab-span" style="white-space:pre">			</span>if int(r_rn)>100 then r_rn=100</div><div><span class="Apple-tab-span" style="white-space:pre">			</span>if int(r_rn)&lt;10 then r_rn=10</div><div>&nbsp;</div><div>这个是修改之前的.</div><div>&nbsp;</div><div>修改的文件名是 page/system/fun.asp</div><div>&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>I2=array(&quot;20&quot;,&quot;40&quot;,&quot;100&quot;,&quot;200&quot;,&quot;500&quot;)</div><div>&nbsp;</div><div>在第2560行还增加了 &nbsp;,&quot;500&quot;</div><div>&nbsp;</div><div>这样可以处理了俩问题.</div><div>1.之前的KingCMS后台列表中,每页显示200条无效,点完了总是显示每页100条.</div><div>2.增加 了一个 每页显示 500条.适合大批量的处理...</div></div>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/KingCMS_list_number.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=88</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=88&amp;key=7752f4d7</trackback:ping></item><item><title>SQL语句跨表复制数据</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/sql-table_2175.html</link><pubDate>Tue, 25 Nov 2008 23:07:29 +0800</pubDate><guid>http://www.heku.org/KingCMS/sql-table_2175.html</guid><description><![CDATA[<p><span style="color: #ff0000">insert into kingart(arttitle,artcontent,artpath,artdate) select title,content,num,time from dbo_xwdt </span></p><p><span style="color: #000000">从数据表dbo_xwdt中复制四个字段,分别到数据表kingart中</span></p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/sql-table_2175.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=74</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=74&amp;key=302c8f4c</trackback:ping></item><item><title>Access与MS SQL Server数据库的相互转换</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/access-mssql.html</link><pubDate>Mon, 17 Nov 2008 18:38:10 +0800</pubDate><guid>http://www.heku.org/KingCMS/access-mssql.html</guid><description><![CDATA[<p>一、将Access 数据库数据移植转换为SQL Server 2000<br />第一步，开启SQLSERVER 2000服务管理，打开&ldquo;企业管理器&rdquo;，新建一个数据库，名称为&ldquo;Access数据转换&rdquo;；<br />第二步，运行&ldquo;导入和导出数据&rdquo;，打开&ldquo;DTS导入/导出向导&rdquo;。选择数据源时，有两种选择：&ldquo;Driver do Microsoft Access(*.mdb)&rdquo;或&ldquo;Microsoft Access&rdquo;（前者所选是的ODBC驱动程序，后者则是微软提供的数据接口），下面作分别介绍：<br />如果选择前者&ldquo;Driver do Microsoft Access(*.mdb)&rdquo;，需要新建&ldquo;文件数据源&rdquo;，选择安装数据源的驱动程序为&ldquo;Driver do Microsoft Access(*.mdb)&rdquo;，并保存此连接的文件数据源的名称为&ldquo;db.dsn&rdquo;。在弹出的&ldquo;ODBC Microsoft Access安装&rdquo;对话框中，选择确认要转换的源Access数据库后，返回选择&ldquo;文件DSN&rdquo;为&ldquo;db.dsn&rdquo;；若选择后者&ldquo;Microsoft Access&rdquo;，则相对简单，只需选择确认源Access数据库的路径即可。 第三步，选择目标数据库为&ldquo;Access数据转换&rdquo;，在&ldquo;指定表复制或查询&rdquo;中选择&ldquo;从源数据库中复制表和视图&rdquo;，然后选择审计相关的数据表进行导入/导 出操作。这样就把Access数据导入到SQL SERVER&ldquo;Access数据转换&rdquo;数据库中。<br />二、将SQL Server 2000数据库数据移植转换到Access中<br />第一步，打开ACCESS，新建一个数据库，命名为&ldquo;SQL SERVER数据转换&rdquo;；<br />第二步，在&ldquo;文件&rdquo;菜单中打开&ldquo;获取外部数据&agrave;导入&rdquo;，在&ldquo;导入&rdquo;对话框中选择类型为&ldquo;ODBC数据库（）&rdquo;，即打开&ldquo;选择数据源&rdquo;对话框；<br />第三步，新建&ldquo;文件数据源&rdquo;，选择安装数据源的驱动程序为&ldquo;SQL SERVER&rdquo;，并保存此连接的文件数据源的名称为&ldquo;Sql server.dsn&rdquo;，即可打开&ldquo;创建到SQL SERVER的新数据源&rdquo;对话框，这将帮助建立一个能用于连接SQL SERVER的ODBC数据源。在此对话框中，选择被连接的SQL SERVER服务器的名称及登陆方式，并且在&ldquo;更改默认的数据库&rdquo;下拉列表中选择要进行数据转换的SQL SERVER数据库的名称，此后，测试ODBC数据源是否连接成功，若是，即可进入&ldquo;导入对象&rdquo;对话框；<br />第四步，在&ldquo;导入对象&rdquo;对话框的&ldquo;表&rdquo;选项卡中选择要导入到ACCESS中的SQL SERVER表，点击&ldquo;确定&rdquo;即可将SQL SERVER 2000中数据转换为ACCESS数据格式。</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/access-mssql.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=72</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=72&amp;key=de6ee3ba</trackback:ping></item><item><title>如何在数据库某字段后追加特定文本?</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/access-replace.html</link><pubDate>Sat, 15 Nov 2008 10:33:08 +0800</pubDate><guid>http://www.heku.org/KingCMS/access-replace.html</guid><description><![CDATA[<p>update gonsfaeqwerggao set num = num + &quot;.htm&quot;</p><p>&nbsp;</p><p>access输入sql语句的方法</p><p><font face="宋体" size="2">左边菜单，查询<br />右边，在设计视图中创建查询<br />不选择表，直接点关闭<br />会看到上面菜单下第一项是SQL,点一下，就可以输入sql语句&nbsp;</font></p><p>&nbsp;</p><p><font face="宋体" size="2">很菜鸟的问题,感谢1j同学.各位看到的表笑话哦~</font></p><p>&nbsp;</p><p>&nbsp;</p><p><font face="宋体" size="2">-----------追加内容-------------</font></p><p><font face="宋体" size="2">批量替换数据库中的部分内容.</font></p><p><font face="宋体" size="2">UPDATE kingart SET artdescription = replace(artdescription,&quot;SEO&quot;,&quot;搜索引擎优化&quot;);<br /></font></p><p>&nbsp;</p><p>--------2010.8.30追加--------</p><p>&nbsp;</p><p>直接在access建立查询,貌似不能执行带+的语句,提示格式不符.</p><p>&nbsp;</p><p>改成&amp;符号可以执行.如下:</p><p>&nbsp;</p><p><p>UPDATE king__baidu_page SET kpath = korder&amp;&quot;.htm&quot;, korder = kid&nbsp;WHERE kid&gt;5394;</p><div>&nbsp;</div></p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/access-replace.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=71</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=71&amp;key=02112b35</trackback:ping></item><item><title>修正KingCMS xml地图bug</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/KingCMS-xml.html</link><pubDate>Wed, 22 Oct 2008 23:36:58 +0800</pubDate><guid>http://www.heku.org/KingCMS/KingCMS-xml.html</guid><description><![CDATA[<p>继续KingCMS的bug修正。。痛苦ing</p><p><br />5.修正xml地图的生成<br /><br />'&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;url&gt;&quot;<br />'&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;loc&gt;&quot;&amp;getpath(data(2,i),0,king.siteurl&amp;king.inst&amp;listpath&amp;&quot;/&quot;&amp;data(1,i))&amp;&quot;&lt;/loc&gt;&quot;<br />'&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;lastmod&gt;&quot;&amp;formatdate(data(0,i),1)&amp;&quot;&lt;/lastmod&gt;&quot;<br />'&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;priority&gt;&quot;&amp;formatnumber((data(4,i)+data(5,i)+2)/4,1,true)&amp;&quot;&lt;/priority&gt;&quot;<br />'&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;/url&gt;&quot;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;url&gt;&quot;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;loc&gt;&quot;&amp;getpath(data(2,i),0,king.siteurl&amp;king.inst&amp;listpath&amp;&quot;/&quot;&amp;data(1,i))&amp;&quot;&lt;/loc&gt;&quot;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;lastmod&gt;&quot;&amp;formatdate(data(0,i),&quot;yyyy-MM-dd&quot;)&amp;&quot;&lt;/lastmod&gt;&quot;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;priority&gt;&quot;&amp;formatnumber((data(4,i)+data(5,i)+2)/4,1,true)&amp;&quot;&lt;/priority&gt;&quot;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;changefreq&gt;daily&lt;/changefreq&gt;&quot;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outmap=outmap&amp;&quot;&lt;/url&gt;&quot;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; '上面修改的网站地图的生成。by何苦</p><p>&nbsp;</p><p>貌似OO模块的这部分代码跟Article模块的这部分代码是相同的。</p><p>&nbsp;</p><p>直接搜索 &lt;lastmod&gt;找到的这部分代码。在 page/module/fun.asp里边的。</p><p>&nbsp;</p><p>替换即可。</p><p>用来修正Google提示的xml地图日期不正确的错误。</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/KingCMS-xml.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=67</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=67&amp;key=6a32a932</trackback:ping></item><item><title>(转)KingCMS安装在Godaddy修改记录</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/66.html</link><pubDate>Mon, 06 Oct 2008 12:45:36 +0800</pubDate><guid>http://www.heku.org/KingCMS/66.html</guid><description><![CDATA[<p>第一次用Godaddy的时候安装KingCMS的时候遇到问题了.所以加入了KingCMS的群.结果.半年过去了.问题也没解决了.</p><p>前几天.ASH解决了.这里转帖下解决办法.顺便夸下.ash真是蛮强大.哈哈</p><p>-----------------------------</p><p>启用了一个 <strong>Godaddy Deluxe Hosting - Windows</strong>的主机</p><p>关于<strong>Godaddy</strong>的安装配置这里就不再叙述了，不明白可以留言。</p><p>对于<strong>Kingcms</strong>，因为程序是可以安装在子目录的，<strong>Kingcms</strong>会用程序自动探到文件安装的目录。而Godaddy是域名绑定在子目录上，这就造成了比如一个米</p><p><font color="#ff6600">http://www.baobao100.cn</font>是绑定在Godaddy FTP空间里的Baobao这个目录，那么用<font color="#ff6600">http://www.baobao100.cn/</font>可以正常访问，用<font color="#ff6600">http://www.baobao100.cn/baobao/</font>的路径也可以访问。</p><p>虽然说不造成特别大的影响但链接全部都变成了<font color="#ff6600">http://www.baobao100.cn/baobao/Info/yjzx/132119141.shtml</font>这样的模式而不是<font color="#ff6600">http://www.baobao100.cn/Info/yjzx/132119141.shtml</font>这样的模式，包括图片什么的都会多一级目录。</p><p>其实问题并不太大，出于对seo和安全的考虑，其实也算不上seo，只是我不想显示主文件的名字在外面而已，做了一些修改。</p><p>首先找到page/system/fun.asp这个文件，打开搜索<span style="font-size: medium"><strong><font size="3">'inst</font></strong></span>这个字符<br />大概是在231行这样子</p><p>public property get inst<br />&nbsp;dim scriptname,l1,I1,I2,I3<br />&nbsp;if r_inst=&quot;&quot; then<br />&nbsp;&nbsp;I1=server.mappath(&quot;/&quot;)<br />&nbsp;&nbsp;I2=server.mappath(&quot;../../&quot;)<br />&nbsp;&nbsp;if instr(I2,I1)&gt;0 then<br />&nbsp;&nbsp;&nbsp;r_inst=replace(right(I2,len(I2)-len(I1)),&quot;\&quot;,&quot;/&quot;)&amp;&quot;/&quot;<br />&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;error lang(&quot;error/virtualdirectory&quot;)&amp;&quot;&lt;br/&gt;&quot;<br />&nbsp;&nbsp;end if<br />&nbsp;end if<br />&nbsp;inst=r_inst<br />end property</p><p>将I2修改为&nbsp;I2=server.mappath(&quot;../../../&quot;)<br />修改理由是，原来的是读出站点物理路径然后再读出文件所在的路径，再计算出实际安装的主目录。<br />我的因为是用的域名绑定二级目录而不是主目录，所以多一级目录，如果在Godaddy里是安装在三级目录那么这个地方也跟着变成&nbsp;I2=server.mappath(&quot;../../../../&quot;)根据需要进行修改。</p><p>到这里其实问题就修改完成了，因为Godaddy是可以直接用米访问二级目录的，所以没什么问题。</p><p>但如果使用了AD模块中的{king:ad name=&quot;xxxx&quot; type=&quot;ssi&quot;}这个标签就会有问题了，因为ssi是读实际物理路径的，那么就再修改这个文件Page/ad/Fun.asp</p><p>打开文件搜索<strong>select case lcase(adtype)</strong></p><p>大概在146行</p><p>&nbsp;&nbsp;&nbsp;select case lcase(adtype)<br />&nbsp;&nbsp;&nbsp;case&quot;js&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;I1=&quot;&lt;span id=&quot;&quot;k_ad_&quot;&amp;adname&amp;&quot;&quot;&quot;&gt;&lt;/span&gt;&lt;script type=&quot;&quot;text/javascript&quot;&quot;&gt;gethtm('&quot;&amp;king.inst&amp;t_ad.path&amp;&quot;/&quot;&amp;adname&amp;t_ad.ext&amp;&quot;','k_ad_&quot;&amp;adname&amp;&quot;');&lt;/script&gt;&quot;<br />&nbsp;&nbsp;&nbsp;case&quot;jscode&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;I1=&quot;&lt;script type=&quot;&quot;text/javascript&quot;&quot; src=&quot;&quot;&quot;&amp;king.inst&amp;t_ad.path&amp;&quot;/&quot;&amp;adname&amp;t_ad.ext&amp;&quot;&quot;&quot;&gt;&lt;/script&gt;&quot;<br />&nbsp;&nbsp;&nbsp;case&quot;ssi&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;I1=&quot;&lt;!-- #include virtual=&quot;&quot;&quot;&amp;king.inst&amp;t_ad.path&amp;&quot;/&quot;&amp;adname&amp;t_ad.ext&amp;&quot;&quot;&quot; --&gt;&quot;<br />&nbsp;&nbsp;&nbsp;case&quot;iframe&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;I1=&quot;&lt;iframe frameborder=&quot;&quot;0&quot;&quot; id=&quot;&quot;k_ad_&quot;&amp;adname&amp;&quot;&quot;&quot; scrolling=&quot;&quot;no&quot;&quot; width=&quot;&quot;&quot;&amp;rs(0)&amp;&quot;&quot;&quot; height=&quot;&quot;&quot;&amp;rs(1)&amp;&quot;&quot;&quot; src=&quot;&quot;&quot;&amp;king.inst&amp;t_ad.path&amp;&quot;/&quot;&amp;adname&amp;t_ad.ext&amp;&quot;&quot;&quot;&gt;&lt;/iframe&gt;&quot;</p><p>源文件是这样</p><p>替换成</p><p>&nbsp;&nbsp;&nbsp;&nbsp;select case lcase(adtype)<br />&nbsp;&nbsp;&nbsp;case&quot;js&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;I1=&quot;&lt;span id=&quot;&quot;k_ad_&quot;&amp;adname&amp;&quot;&quot;&quot;&gt;&lt;/span&gt;&lt;script type=&quot;&quot;text/javascript&quot;&quot;&gt;gethtm('&quot;&amp;king.inst&amp;t_ad.path&amp;&quot;/&quot;&amp;adname&amp;t_ad.ext&amp;&quot;','k_ad_&quot;&amp;adname&amp;&quot;');&lt;/script&gt;&quot;<br />&nbsp;&nbsp;&nbsp;case&quot;jscode&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;I1=&quot;&lt;script type=&quot;&quot;text/javascript&quot;&quot; src=&quot;&quot;&quot;&amp;king.inst&amp;t_ad.path&amp;&quot;/&quot;&amp;adname&amp;t_ad.ext&amp;&quot;&quot;&quot;&gt;&lt;/script&gt;&quot;<br />&nbsp;&nbsp;&nbsp;case&quot;ssi&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;I1=&quot;&lt;!-- #include virtual=&quot;&quot;<span style="color: #ff0000"><span><span><strong>/baobao</strong></span></span></span>&quot;&amp;king.inst&amp;t_ad.path&amp;&quot;/&quot;&amp;adname&amp;t_ad.ext&amp;&quot;&quot;&quot; --&gt;&quot;<br />&nbsp;&nbsp;&nbsp;case&quot;iframe&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;I1=&quot;&lt;iframe frameborder=&quot;&quot;0&quot;&quot; id=&quot;&quot;k_ad_&quot;&amp;adname&amp;&quot;&quot;&quot; scrolling=&quot;&quot;no&quot;&quot; width=&quot;&quot;&quot;&amp;rs(0)&amp;&quot;&quot;&quot; height=&quot;&quot;&quot;&amp;rs(1)&amp;&quot;&quot;&quot; src=&quot;&quot;&quot;&amp;king.inst&amp;t_ad.path&amp;&quot;/&quot;&amp;adname&amp;t_ad.ext&amp;&quot;&quot;&quot;&gt;&lt;/iframe&gt;&quot;</p><p>红色部分是我的二级文件夹的名字，其他的也可以加上，但我测试过iframe jscode js其实都不会有问题。</p><p>修改到这结束。</p><p>其实可以再加一个参数来计算这个，只是动的就比较多了，先暂时这样用，如果出现其他问题的话就再改。据我的了解，KingCMS读物理路径的地方并不多。</p><p>&nbsp;</p><p>&nbsp;</p><p>另外再记录一个虚拟目录安装KingCMS的方法</p><div class="t_msgfont" id="postmessage_339141">在page/system/fun.asp里修改,如有问题欢迎讨论.<br /><br />public property get inst<br />&nbsp; &nbsp; &nbsp; &nbsp; dim scriptname,l1,I1,I2,I3,n<br />&nbsp; &nbsp; &nbsp; &nbsp; if r_inst=&quot;&quot; then<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;'I1=server.mappath(&quot;/&quot;) 'disabled by xWay<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;scriptname = lcase(request.servervariables(&quot;script_name&quot;))<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; I2=lcase(server.mappath(&quot;../../&quot;))<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'r_inst=replace(right(I2,len(I2)-len(I1)),&quot;\&quot;,&quot;/&quot;)&amp;&quot;/&quot;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I3 = split(trim(I2),&quot;\&quot;)<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;l1=ubound(I3)<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;n= instr(scriptname, I3(l1))<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;if n&gt;0 then<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;r_inst = left(scriptname, n +len(I3(l1)))<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;else<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;r_inst = &quot;/&quot;<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;end if<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;'---------------------------------------------<br />&nbsp; &nbsp; &nbsp; &nbsp; end if<br />&nbsp; &nbsp; &nbsp; &nbsp; inst=r_inst<br />end property</div><script src="http://www.s-un.cn/PLUGIN/copytofriends/copy.js" type="text/javascript"></script><p>原文地址:</p><p><a href="http://www.s-un.cn/Article/program-code/KingCMS-install-on-Godaddy-2008-10-02-133/KingCMS-install-on-Godaddy.shtml">http://www.s-un.cn/Article/program-code/KingCMS-install-on-Godaddy-2008-10-02-133/KingCMS-install-on-Godaddy.shtml</a></p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/66.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=66</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=66&amp;key=0417650f</trackback:ping></item><item><title>{转}KingCMS广告菜单编辑器修改</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/king-ad-fc.html</link><pubDate>Mon, 06 Oct 2008 12:36:45 +0800</pubDate><guid>http://www.heku.org/KingCMS/king-ad-fc.html</guid><description><![CDATA[<p>为了自己更新的方便，还是将KingCMS的编辑器改了一下，找了好几个编辑器，不是传输数据有问题就是不符合XHTML编码，有个不错呢又不能上传图片，而KingCMS自带的FCKeditor编辑器会自动加上&lt;p&gt;和&lt;br /&gt;，最后找到了这个精简版本的FCKeditor，改好的效果如下，这个编辑器和KingCMS自带的部分是分开的，也就是说后台无论如何修改编辑器的属性不影响这里。<br /><br /><a class="lightbox" href="http://www.s-un.cn/upload/2008/10/200810061203317266.jpg"><img class="lightbox" style="oldpaddingtop: ; oldbordertopwidth: ; oldpaddingbottom: ; oldborderbottomwidth: ; oldpaddingright: ; oldborderrightwidth: ; oldpaddingleft: ; oldborderleftwidth: " alt="广告模块编辑器" width="400" onload="" src="http://www.s-un.cn/upload/2008/10/200810061203317266.jpg" /></a></p><p>上传部分的代码是用的最新的FCKeditor部分，尽量避免漏洞的威胁吧，至于有没有没空研究了。</p><p>先下载这个<a target="_blank" tip="" href="http://www.heku.org/upload/2008/10/SmallEditor.zip">文件压缩包</a>&nbsp;解压到KingCMS的Admin/System/editor/目录下，确保直接路径应该是这样<br />Admin/System/editor/SmallEditor/fckconfig.js<br />Admin/System/editor/SmallEditor/editor/fckeditor.html<br />如果自行修改了Admin目录的名称，根据需要自行修改。</p><p>现在来修改程序，我提供两种方式的修改吧，打开page/system/fun.asp，搜索 'form_editor<br />第一种方式是在后台的选择编辑器中可以选择&nbsp;，那么找到这个部分</p><p style="margin-left: 40px">public sub form_editor(l1,l2,l3,l4)<br />&nbsp;dim I1,configpath<br />&nbsp;if cstr(l4)=&quot;0&quot; then l4=&quot;&quot;<br />&nbsp;Il &quot;&lt;p id=&quot;&quot;editor&quot;&quot;&gt;&lt;label&gt;&quot;&amp;l2&amp;&quot;&lt;/label&gt;&quot;<br />&nbsp;select case lcase(r_editor)<br />&nbsp;case lcase(king_fckeditor_path)<br />&nbsp;&nbsp;dim ofckeditor<br />&nbsp;&nbsp;set ofckeditor=new fckeditor<br />'&nbsp;&nbsp;ofckeditor.toolbarset=&quot;Default&quot;<br />&nbsp;&nbsp;ofckeditor.basepath=&quot;../system/editor/&quot;&amp;king_fckeditor_path&amp;&quot;/&quot;<br />&nbsp;&nbsp;ofckeditor.value=l3<br />&nbsp;&nbsp;ofckeditor.create l1<br />&nbsp;&nbsp;set ofckeditor=nothing<br />&nbsp;case&quot;ewebeditor&quot;<br />&nbsp;</p><p>在case&quot;ewebeditor&quot;上面插入下面这一段</p><p style="margin-left: 40px">&nbsp;case&quot;samlleditor&quot;<br />&nbsp;&nbsp;dim sfckeditor<br />&nbsp;&nbsp;set sfckeditor=new fckeditor<br />&nbsp; &nbsp;sfckeditor.toolbarset=&quot;Default&quot;<br />&nbsp;&nbsp;&nbsp; sfckeditor.Width= &quot;90%&quot;<br />&nbsp;&nbsp;sfckeditor.basepath=&quot;../system/editor/SmallEditor/&quot;<br />&nbsp;&nbsp;sfckeditor.value=l3<br />&nbsp;&nbsp;sfckeditor.create l1<br />&nbsp;&nbsp;set sfckeditor=nothing</p><p>保存就可以了，这样后台应该可以选择samlleditor了，选择后所有的编辑器都变成了这个，然后找到Admin/ad/index.asp</p><p>找到这段代码&nbsp;<br />&lt;textarea name=&quot;&quot;adtext&quot;&quot; rows=&quot;&quot;15&quot;&quot; cols=&quot;&quot;10&quot;&quot; class=&quot;&quot;in5&quot;&quot;&gt;&quot;&amp;formencode(data(1,0))&amp;&quot;&lt;/textarea&gt;&quot;<br />&nbsp;Il king.check(&quot;adtext|0|&quot;&amp;encode(ad.lang(&quot;check/text&quot;)))<br />将其注释掉，然后加入<br />Il king.form_editor(&quot;adtext&quot;,ad.lang(&quot;label/text&quot;),data(1,0),&quot;adtext|0|&quot;&amp;encode(ad.lang(&quot;check/text&quot;)))<br />就大功告成了</p><p>第二种方法其实很简单</p><p>将public sub form_editor(l1,l2,l3,l4)这个函数整段复制出来，去掉中间不要的比如case&quot;ewebeditor&quot; 和case&quot;codepress&quot;部分，如下，加入橙色部分</p><p style="margin-left: 40px">public sub <span style="color: #ff6600">form_smalleditor</span>(l1,l2,l3,l4)<br />&nbsp;dim I1,configpath<br />&nbsp;if cstr(l4)=&quot;0&quot; then l4=&quot;&quot;<br />&nbsp;Il &quot;&lt;p id=&quot;&quot;editor&quot;&quot;&gt;&lt;label&gt;&quot;&amp;l2&amp;&quot;&lt;/label&gt;&quot;<br />&nbsp;select case lcase(&quot;<font color="#ff6600">samlleditor</font>&quot;)</p><p style="margin-left: 40px"><br />&nbsp;case lcase(king_fckeditor_path)<br />&nbsp;&nbsp;dim ofckeditor<br />&nbsp;&nbsp;set ofckeditor=new fckeditor<br />&nbsp; ofckeditor.toolbarset=&quot;Default&quot;<br />&nbsp;&nbsp;ofckeditor.basepath=&quot;../system/editor/&quot;&amp;king_fckeditor_path&amp;&quot;/&quot;<br />&nbsp;&nbsp;ofckeditor.value=l3<br />&nbsp;&nbsp;ofckeditor.create l1<br />&nbsp;&nbsp;set ofckeditor=nothing<br />&nbsp;</p><p style="margin-left: 40px"><span style="color: #ff6600">&nbsp;case&quot;samlleditor&quot;<br />&nbsp;&nbsp;dim sfckeditor<br />&nbsp;&nbsp;set sfckeditor=new fckeditor<br />&nbsp; &nbsp;sfckeditor.toolbarset=&quot;Default&quot;<br />&nbsp;&nbsp;&nbsp; sfckeditor.Width= &quot;90%&quot;<br />&nbsp;&nbsp;sfckeditor.basepath=&quot;../system/editor/SmallEditor/&quot;<br />&nbsp;&nbsp;sfckeditor.value=l3<br />&nbsp;&nbsp;sfckeditor.create l1<br />&nbsp;&nbsp;set sfckeditor=nothing</span></p><p style="margin-left: 40px">&nbsp;case else'包括html<br />&nbsp;&nbsp;configpath=&quot;../system/editor&quot;&amp;r_editor&amp;&quot;/config.inc&quot;<br />&nbsp;&nbsp;if isexist(configpath) then<br />&nbsp;&nbsp;&nbsp;I1=readfile(configpath)'读取内容<br />&nbsp;&nbsp;&nbsp;I1=replace(I1,&quot;{king:break/}&quot;,hem2js(king_break))'换行代码<br />&nbsp;&nbsp;&nbsp;I1=replace(I1,&quot;{king:value/}&quot;,formencode(l3))'内容替换<br />&nbsp;&nbsp;&nbsp;I1=replace(I1,&quot;{king:name/}&quot;,l1)'name替换<br />&nbsp;&nbsp;&nbsp;Il I1<br />&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;Il &quot;&lt;style type=&quot;&quot;text/css&quot;&quot;&gt;@import &quot;&quot;../system/editor/html/style.css&quot;&quot;;&lt;/style&gt;&quot;<br />&nbsp;&nbsp;&nbsp;Il &quot;&lt;script type=&quot;&quot;text/javascript&quot;&quot;&gt;var textbox='&quot;&amp;l1&amp;&quot;';var king_break='&quot;&amp;htm2js(king_break)&amp;&quot;'&lt;/script&gt;&quot;<br />&nbsp;&nbsp;&nbsp;Il &quot;&lt;script src=&quot;&quot;../system/editor/html/htm.js&quot;&quot; type=&quot;&quot;text/javascript&quot;&quot;&gt;&lt;/script&gt;&quot;<br />&nbsp;&nbsp;&nbsp;Il &quot;&lt;img src=&quot;&quot;../system/editor/html/button.gif&quot;&quot; onclick=&quot;&quot;javascript:gethtml(this,event);&quot;&quot; onmousemove=&quot;&quot;showTitle(this,event);&quot;&quot; id=&quot;&quot;k_htmimg&quot;&quot;/&gt;&quot;<br />&nbsp;&nbsp;&nbsp;Il &quot;&lt;br /&gt;&quot;<br />&nbsp;&nbsp;&nbsp;Il &quot;&lt;div id=&quot;&quot;k_color&quot;&quot;&gt;&lt;img src=&quot;&quot;../system/editor/html/color.gif&quot;&quot;&nbsp; onclick=&quot;&quot;javascript:getIndex(this,event);&quot;&quot; onmousemove=&quot;&quot;showColor(this,event)&quot;&quot;/&gt;&lt;/div&gt;&quot;<br />&nbsp;&nbsp;&nbsp;Il &quot;&lt;iframe style=&quot;&quot;width:0;height:0;border:0;&quot;&quot; id=&quot;&quot;dtf&quot;&quot;&gt;&lt;/iframe&gt;&quot;<br />&nbsp;&nbsp;&nbsp;Il &quot;&lt;textarea name=&quot;&quot;&quot;&amp;l1&amp;&quot;&quot;&quot; rows=&quot;&quot;25&quot;&quot; cols=&quot;&quot;100&quot;&quot; id=&quot;&quot;txt&quot;&quot; onclick=&quot;&quot;javascript:storeCaret(this);hiddenDiv();&quot;&quot;&gt;&quot;&amp;formencode(l3)&amp;&quot;&lt;/textarea&gt;&quot;<br />&nbsp;&nbsp;&nbsp;Il &quot;&lt;script type=&quot;&quot;text/javascript&quot;&quot;&gt;txtContent=document.getElementById(&quot;&quot;txt&quot;&quot;);dtf=document.getElementById(&quot;&quot;dtf&quot;&quot;);&lt;/script&gt;&quot;<br />&nbsp;&nbsp;end if<br />&nbsp;end select<br />&nbsp;Il king.check(l4)<br />&nbsp;Il &quot;&lt;/p&gt;&quot;<br />end sub</p><p>&nbsp;然后打开Admin/ad/index.asp，对应的将</p><p>&lt;textarea name=&quot;&quot;adtext&quot;&quot; rows=&quot;&quot;15&quot;&quot; cols=&quot;&quot;10&quot;&quot; class=&quot;&quot;in5&quot;&quot;&gt;&quot;&amp;formencode(data(1,0))&amp;&quot;&lt;/textarea&gt;&quot;<br />&nbsp;Il king.check(&quot;adtext|0|&quot;&amp;encode(ad.lang(&quot;check/text&quot;)))<br />将其注释掉，然后加入<br />Il king.<span style="color: #ff6600">form_smalleditor</span>(&quot;adtext&quot;,ad.lang(&quot;label/text&quot;),data(1,0),&quot;adtext|0|&quot;&amp;encode(ad.lang(&quot;check/text&quot;)))</p><p>这样广告系统的编辑器就和整站的分开了，要修改就自己动手修改了。</p><p>&nbsp;</p><p>另外附带说两句Fckeditor我打开了上传ConfigIsEnabled = True，关闭的话改成False，设置了上传的目录为ConfigUserFilesPath = &quot;/up-files/image/other/&quot;</p><p>修改的话自行打开SmallEditor/editor/filemanager/upload/asp/config.asp进行修改</p><p><a target="_blank" href="http://www.s-un.cn/guestbook.asp">其他有问题给我留言吧。</a></p><p>原文地址：</p><p><a href="http://www.s-un.cn/Article/program-code/KingCMS-Ad-Editor-Change-2008-10-06-138/KingCMS-Ad-Editor-Change.shtml">http://www.s-un.cn/Article/program-code/KingCMS-Ad-Editor-Change-2008-10-06-138/KingCMS-Ad-Editor-Change.shtml</a></p><script src="http://www.s-un.cn/PLUGIN/copytofriends/copy.js" type="text/javascript"></script><p>&nbsp;</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/king-ad-fc.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=65</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=65&amp;key=7e3f3061</trackback:ping></item><item><title>select随机读取数据以及数据记录随机排序</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/sql-random.html</link><pubDate>Mon, 06 Oct 2008 10:02:24 +0800</pubDate><guid>http://www.heku.org/KingCMS/sql-random.html</guid><description><![CDATA[<p><span style="background-color: #ffff00">{king:sql cmd=&quot;select top 15 artid,arttitle,artpath,artdescription,artshow from kingart where listid=7 and artshow=1 order by right(cstr(rnd(-int(rnd(-timer())*100+artid)))*1000*Now(),2);&quot;}<br />&nbsp; &lt;li>&lt;a href=&quot;/Symptom/(king:#2/)&quot; title=&quot;(king:#3/)&quot;>(king:#1/)&lt;/a>&lt;/li>{/king}</span></p><p><span style="background-color: #ffffff"><span>做一个笔记,这个记录,是从KingCMS的kingart数据表中随机读取15条数据,随机排序.重点就在</span></span></p><p><span style="background-color: #ffffff"><span>order by right(cstr(rnd(-int(rnd(-timer())*100+kid)))*1000*Now(),2)</span></span></p><p>&nbsp;</p><p><span style="background-color: #ffffff"><span>另外还有种写法 <span style="background-color: #ffffff"><span>order by rnd(artid) desc;</span></span></span></span></p><p><span style="background-color: #ffffff"><span><span style="background-color: #ffffff"><span>这个,读取的结果确实也是随机了.可是怎么重新生成几次页面之后,还是显示的顺序不变呢?</span></span></span></span></p><p><span style="background-color: #ffffff"><span><span style="background-color: #ffffff"><span>一看程序就头大,直接采用第一种写法吧.</span></span></span></span></p><p><span style="background-color: #ffffff"><span><span style="background-color: #ffffff"><span>对了,忘了说了.我的数据库是 Access的,貌似MSSQL的有的地方会不太一样.</span></span></span></span></p><p><span style="background-color: #ffffff"><span>___________________</span></span></p><p>感慨一下,这几天搞网站搞的,都快偏离seo了,,去当程序员算了嘛<img alt="" src="http://www.heku.org/image/face/Sleep.gif" /></p><p>&nbsp;</p><p>-----------------------------------------</p><p>11.21更新</p><p>MSSQL中,随机排序的sql函数是&nbsp;<span style="color: rgb(255, 0, 0); ">order by newID() desc &nbsp;测试通过的.</span></p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/sql-random.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=63</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=63&amp;key=2d13e068</trackback:ping></item><item><title>KingCMS模块文章一键生成.</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/KingCMS-createpage.html</link><pubDate>Sat, 20 Sep 2008 23:42:15 +0800</pubDate><guid>http://www.heku.org/KingCMS/KingCMS-createpage.html</guid><description><![CDATA[<p>从后台目录/Article/index.asp的第555行开始,代码如下</p><p>&nbsp;case&quot;createpage&quot;<br />&nbsp;&nbsp;if len(list)&gt;0 then<br />&nbsp; '悟空 重新获取listid,将子栏目包括进去,by何苦,在根列表点击下拉-生成列表及文章,可以实现包含子分类在内的模块文章一键生成.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set rs=conn.execute(&quot;select listid from kingart_list where listid in (&quot; &amp; list &amp; &quot;) or listid1 in (&quot; &amp; list &amp; &quot;);&quot;)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list = &quot;&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if not rs.eof and not rs.bof then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data = rs.getrows()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for i=0 to ubound(data,2)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if len(list)&gt;0 then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list = list &amp; &quot;,&quot; &amp; data(0, i)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list = data(0,i)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rs.close<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set rs = nothing<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '------以上是何苦加的,文章模块可以实现一键生成的代码<br />&nbsp;&nbsp;&nbsp;set rs=conn.execute(&quot;select artid from kingart where listid in (&quot;&amp;list&amp;&quot;);&quot;)<br />&nbsp;&nbsp;&nbsp;&nbsp;if not rs.eof and not rs.bof then</p><p>&nbsp;</p><p>注释中间的代码是后来添加的,其他地方代码不变.</p><p>结果:</p><p>在文章管理的根目录下,全选,点击下拉菜单中的 生成列表及文章,即可实现文章模块所有文件的一键生成.</p><p>自定义模块后面文章讨论</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/KingCMS-createpage.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=62</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=62&amp;key=94363373</trackback:ping></item><item><title>KingCMS,sql标签的一个示例</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/king-sql.html</link><pubDate>Thu, 18 Sep 2008 11:24:57 +0800</pubDate><guid>http://www.heku.org/KingCMS/king-sql.html</guid><description><![CDATA[<p>&lt;ul&gt;{king:sql cmd=&quot;select top 70 kup,kid,kc_image,ktitle,kc_urlpath,kdescription from king__link_page where listid=1 and kup=1 and kshow=1 order by kid desc;&quot;} <br />&lt;li&gt;&lt;a href=&quot;(king:#4/)&quot; title=&quot;(king:#5/)&quot;&gt;(king:#3/)&lt;/a&gt;&lt;/li&gt;{/king}&lt;/ul&gt;</p><p>&nbsp;</p><p>这个是调用友情链接显示的,其中读取出来的,有一部分字段没有用到.</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/king-sql.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=61</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=61&amp;key=6e1becd5</trackback:ping></item><item><title>KingCMS列表页显示&amp;quot;不显示&amp;quot;的内容解决办法</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/KingCMS-list.html</link><pubDate>Sat, 12 Jul 2008 00:19:31 +0800</pubDate><guid>http://www.heku.org/KingCMS/KingCMS-list.html</guid><description><![CDATA[<p><span style="background-color: #ffff00">set rs=conn.execute(&quot;select &quot;&amp;sql&amp;&quot; from kingart where artshow=1 and listid=&quot;&amp;datalist(0,j)&amp;&quot; or listids like '%,&quot;&amp;datalist(0,j)&amp;&quot;,%' order by artup desc,artorder &quot;&amp;jsorder&amp;&quot;,artid &quot;&amp;jsorder&amp;&quot;;&quot;)</span><br />'下面一行,是原来的代码,上面一行是新加的.为了解决列表页面显示设置为&quot;不显示&quot;的文章的问题-by何苦<br /><span style="background-color: #ffff99">'&nbsp;&nbsp;set rs=conn.execute(&quot;select &quot;&amp;sql&amp;&quot; from kingart where listid=&quot;&amp;datalist(0,j)&amp;&quot; or listids like '%,&quot;&amp;datalist(0,j)&amp;&quot;,%' order by artup desc,artorder &quot;&amp;jsorder&amp;&quot;,artid &quot;&amp;jsorder&amp;&quot;;&quot;)</span></p><p>对了,文件名是page/article/fun.asp 第250行开始.</p><p>此方法解决kingcms5.0文章列表页中显示已经设置为隐藏的文章的问题</p><p>&nbsp;</p><p>自定义模块的改法:</p><p>一般在 250以后,比如说我这一次新做的一个留言管理模块,字段kshow是设置是否显示的.</p><p>那加上一个 <span style="background-color: #ffff00">kshow=1 and </span></p><p><span style="color: #ff0000"><span style="background-color: #ffffff"><span>需要注意的是:自定义模块,在重新生成以后.文件会修改回修改之前的fun.asp.这个文件需要重新修改.</span></span></span></p><p>&nbsp;</p><p><span style="color: #ff0000"><span style="background-color: #ffffff"><span>2008.11.12更新</span></span></span></p><p><span style="color: #ff0000"><span style="background-color: #ffffff"><span>自定义模块的永久修改</span></span></span></p><p><span style="color: #ff0000"><span style="background-color: #ffffff"><span>修改OO_public/code/page/fun.asp中第290行,增加 kshow=1 and</span></span></span></p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/KingCMS-list.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=49</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=49&amp;key=a3ce7b3b</trackback:ping></item><item><title>KingCMS修改默认文章名</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/king-article.html</link><pubDate>Sun, 06 Jul 2008 23:19:29 +0800</pubDate><guid>http://www.heku.org/KingCMS/king-article.html</guid><description><![CDATA[<p>前段时间的几次测试,发现<a target="_blank" href="http://www.baidu.com">百度</a>对完全拼音的单独目录名收录不是太友好,</p><p>有两种可能:</p><p>1.程序自动实现的,与网页title完全吻合</p><p>2.拼音文件夹长度过长.</p><p>而KingCMS正好符合了这个特征.普遍反应的对文件页面的收录非常不好.因此,想把默认的目录名改成 ID.htm这种格式.</p><p>可以通过修改程序实现.</p><p><span style="background-color: #c0c0c0">在admin\Article\index.asp中修改路径为1.htm，2.htm，n.htm的方法<br />修改：<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data(11,0)=art.lang(&quot;common/pinyin&quot;)<br />为：<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data(11,0)=king.neworder(&quot;kingart&quot;,&quot;artid&quot;)&amp;&quot;.&quot;&amp;split(king_ext,&quot;.&quot;)(1)</span></p><p><span style="background-color: #c0c0c0">修改为md5格式的<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data(11,0)=&quot;MD5&quot;<br />日期格式生成路径:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data(11,0)=formatdate(now,2)&amp;&quot;/&quot;&amp;king.neworder(&quot;kingart&quot;,&quot;artid&quot;)<br />自定义发布模块类推 </span></p><p><span style="background-color: #ffffff"><span>刚做了一个产品展示的自定义模块,代码是这样修改的</span></span></p><p><span style="background-color: #c0c0c0"><span><span>&nbsp;&nbsp;&nbsp;'data(8,0)=kc.lang(&quot;common/pinyin&quot;)<br />&nbsp;&nbsp;&nbsp;data(8,0)=king.neworder(&quot;king__product_page&quot;,&quot;kid&quot;)&amp;&quot;.&quot;&amp;split(king_ext,&quot;.&quot;)(1)</span></span></span><span style="background-color: #ffffff"><span><br />&nbsp;&nbsp;&nbsp;'上面一行是何苦修改的,自定义发布模块king_product,发布新文章时的默认文章名.从默认的拼音格式,换为ID.htm格式</span></span></p><p>&nbsp;</p><p>其中,<font style="background-color: #c0c0c0">king__product_page是KingCMS数据表的名字,kid是数据表中字段的名字.</font></p><p>&nbsp;</p><p><span style="color: #ff0000">2009.2.18新增:</span></p><p>自定义模块彻底修改</p><p>修改admin/OO_public/code/admin/index.asp注释掉了687行,增加了688行.</p><p><span style="background-color: #c0c0c0">&nbsp;if king.ismethod or len(kid)=0 then<br />&nbsp;&nbsp;dataform=split(sql,&quot;,&quot;)<br />&nbsp;&nbsp;redim data(ubound(dataform),0)<br />&nbsp;&nbsp;for i=0 to ubound(dataform)<br />&nbsp;&nbsp;&nbsp;data(i,0)=form(dataform(i))<br />&nbsp;&nbsp;next<br />&nbsp;&nbsp;if king.ismethod=false then<br />&nbsp;&nbsp;&nbsp;data(1,0)=1<br />&nbsp;&nbsp;&nbsp;'data(8,0)=kc.lang(&quot;common/pinyin&quot;)<br />&nbsp;&nbsp;&nbsp;data(8,0)=king.neworder(&quot;king__{OO}_page&quot;,&quot;kid&quot;)&amp;&quot;.&quot;&amp;split(king_ext,&quot;.&quot;)(1)<br />&nbsp;&nbsp;&nbsp;'上一行688行新增,注释了687行,修改自定义模块新文章文件名为id.htm<br />{FDEFAULT}<br />&nbsp;&nbsp;end if</span></p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/king-article.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=45</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=45&amp;key=a727cc5d</trackback:ping></item><item><title>kingcms简单修改文章列表路径</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/kingcms-list-url.html</link><pubDate>Thu, 19 Jun 2008 01:44:45 +0800</pubDate><guid>http://www.heku.org/KingCMS/kingcms-list-url.html</guid><description><![CDATA[<p>文章列表中,有&nbsp; 第几页的链接.</p><p>原来的时候,链接结束后面没有加&nbsp; / (斜杠).</p><p>动手修改程序,加上了这一个.修改了以下几个地方.</p><p>在fun.asp文件的第2704行 加上一个/ 改后代码为</p><p><span style="background-color: #ccffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l4=l4&amp;(&quot;&lt;a href=&quot;&quot;&quot;&amp;replace(l1,&quot;$&quot;,k)&amp;&quot;<span style="color: #ff0000">/</span>&quot;&quot;&gt;&quot;&amp;k&amp;&quot;&lt;/a&gt;&quot;)</span></p><p>在fun.asp文件的第2710行 加上一个/ 改后代码为</p><p>&nbsp;<span style="background-color: #ccffff">&nbsp;l4=l4&amp;(&quot;&lt;a href=&quot;&quot;&quot;&amp;replace(l1,&quot;$&quot;,l2+1)&amp;&quot;<span style="color: #ff0000">/</span>&quot;&quot;&gt;&amp;rsaquo;&amp;rsaquo;&lt;/a&gt;&quot;)</span></p><p>对了,这个版本是&nbsp; KingCMS.5.0.1.0508</p><p>-------10.11发现新问题-------</p><p>由此更改后，在搜索结果页面的页码链接处，也被加入了/作为结束.</p><p>&nbsp;</p><p>实际上,这样是打不开的一个页面.先去掉再说...</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/kingcms-list-url.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=38</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=38&amp;key=baf200b4</trackback:ping></item><item><title>kingcms捕获爬虫原理</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/kingcms-spider.html</link><pubDate>Fri, 13 Jun 2008 20:28:11 +0800</pubDate><guid>http://www.heku.org/KingCMS/kingcms-spider.html</guid><description><![CDATA[<p>网站上线多天,第一批的网站很正常,后台可以看到.而且 ,遇到了第二次更新的时候,也放了出来.</p><p>可是,其他的几批站,百度蜘蛛一直没有来.</p><p>6.12的时候,从iis的log里看到百度的蜘蛛陆陆续续访问后几批的网站.</p><p>可是,kc的后台却并没有记录下来.是什么原因呢?难道是需要服务器的某种环境支持?</p><p>思考了好久,也在群里跟其他人讨论.对照 iis 的log记录,以及 kc后台的记录.发现.第一次记录的googlebot,是googlebot第一次访问了search.asp,之前访问过js文件,也访问乐htm文件,但是都没有记录.</p><p>也就是说:<b>kc是通过asp文件来记录爬虫的爬行记录.</b></p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/kingcms-spider.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=36</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=36&amp;key=fd4d189f</trackback:ping></item><item><title>[笔记]kingcms5.0文章中关键词自动添加链接</title><author>heku@heku.org (何苦)</author><link>http://www.heku.org/KingCMS/kingcms-keyword.html</link><pubDate>Wed, 21 May 2008 20:40:32 +0800</pubDate><guid>http://www.heku.org/KingCMS/kingcms-keyword.html</guid><description><![CDATA[<p>前些天从<a href="http://www.sdseo.com.cn/">白冰</a>那里得到了一个可以在文章中自动添加链接的修改版的<a href="http://www.kingcms.com/">kingcms</a>5.0</p><p>用了下,感觉很不错.</p><p>前几天添加了几篇文章,发现,除了自己定义的链接之外,在&nbsp; kingsystem表中定义的关键词,也就是网站后台-参数设置处所定义的关键词,也会自动添加链接,链接指向到了&nbsp; page/system/search.asp?&nbsp; 这样的站内搜索结果.</p><p>这样下来,一篇文章,字数不到200,却带了七八个链接.</p><p>如此下去,觉得似乎并不是太有必要每个关键词都带链接.因此,想控制一下.</p><p>再看了老白改后的程序,在 page/system/fun.asp文件中写了自定义的关键词替换链接的程序代码.</p><p>程序很烂,只能找替代的解决办法来实现自己的思路.</p><p>&nbsp;</p><p><b>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;I1=I5.replace(I1,&quot;&lt;a href=&quot;&quot;&quot;&amp;l4&amp;&quot;$1&quot;&quot; target=&quot;&quot;_blank&quot;&quot; title=&quot;&quot;$1&quot;&quot;&gt;$1&lt;/a&gt;&quot;)</b></p><p><b>把第2826行注释掉.OK,文章中只会给自己在 keyword.mdb中定义的关键词自动添加链接.kingsystem表中的关键词将不会自动添加链接..</b></p><p>&nbsp;</p><p>问题解决.</p><p>&nbsp;</p>]]></description><category>KingCMS与SEO</category><comments>http://www.heku.org/KingCMS/kingcms-keyword.html#comment</comments><wfw:comment>http://www.heku.org/</wfw:comment><wfw:commentRss>http://www.heku.org/feed.asp?cmt=25</wfw:commentRss><trackback:ping>http://www.heku.org/cmd.asp?act=tb&amp;id=25&amp;key=23be63aa</trackback:ping></item></channel></rss>
