<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>张振峰 &#187; 修改</title>
	<atom:link href="http://www.zhangzhenfeng.com/tags/%e4%bf%ae%e6%94%b9/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zhangzhenfeng.com</link>
	<description>阵风：天生我材必有用</description>
	<lastBuildDate>Wed, 14 Sep 2011 09:51:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>修改 SiteWeaver默认值的方法和建议</title>
		<link>http://www.zhangzhenfeng.com/siteweaver-modify/</link>
		<comments>http://www.zhangzhenfeng.com/siteweaver-modify/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 02:46:45 +0000</pubDate>
		<dc:creator>阵风</dc:creator>
				<category><![CDATA[动易]]></category>
		<category><![CDATA[修改]]></category>
		<category><![CDATA[开源]]></category>
		<category><![CDATA[语言包]]></category>

		<guid isPermaLink="false">http://www.zhangzhenfeng.com/?p=40</guid>
		<description><![CDATA[<p>现在动易开源了，大家可以自行修改了，但很多人想修改却找不到修改的地方，近日就有很多人在论坛发帖询问。</p><br /><p>下面举例说明我的修改方法（1、查找：<font color=#ff0000><u>通过DreamWeaver在<strong>全站范围</strong>内的<strong>源代码</strong>搜索</u></font><font color=#000000>&#160;&#160;&#160;&#160;2、修改：</font><font color=#ff0000><strong><u>语言包、系统文件——多为admin和include两个文件夹中的文件</u></strong></font>）。首先先提醒一下：<strong><font color=#ff0000>修改内容要有记录，以便查错、恢复和升级。</font></strong></p><br /><p>例如修改标签{$ShowChannel}，首先<u><font color=#ff0000>通过DreamWeaver在<strong>全站范围</strong>内的<strong>源代码</strong>搜索</font></u>ShowChannel，发现Include/PowerEasy.Common.Front.asp中有如下代码</p><br /><p><blockquote>If InStr(strHtml, "{$ShowChannel}") &#62; 0 Then strHtml = Replace(strHtml, "{$ShowChannel}", <font color=#0000ff>GetChannelList</font>(0))</blockquote></p><br /><p>这说明标签{$ShowChannel}取决于<font color=#0000ff>GetChannelList</font>()。再搜索<font color=#0000ff>GetChannelList</font>，发现Include/PowerEasy.Common.Front.asp中有Function GetChannelList(NumNewLine)，已经找到了。</p>]]></description>
			<content:encoded><![CDATA[<p>现在动易开源了，大家可以自行修改了，但很多人想修改却找不到修改的地方，近日就有很多人在论坛发帖询问。</p>
<p>下面举例说明我的修改方法（1、查找：<span style="color: #ff0000;"><span style="text-decoration: underline;">通过DreamWeaver在<strong>全站范围</strong>内的<strong>源代码</strong>搜索</span></span><span style="color: #000000;"> 2、修改：</span><span style="color: #ff0000;"><strong><span style="text-decoration: underline;">语言包、系统文件——多为admin和include两个文件夹中的文件</span></strong></span>）。首先先提醒一下：<strong><span style="color: #ff0000;">修改内容要有记录，以便查错、恢复和升级。</span></strong></p>
<p>例如修改标签{$ShowChannel}，首先<span style="text-decoration: underline;"><span style="color: #ff0000;">通过DreamWeaver在<strong>全站范围</strong>内的<strong>源代码</strong>搜索</span></span>ShowChannel，发现Include/PowerEasy.Common.Front.asp中有如下代码</p>
<blockquote><p>If InStr(strHtml, “{$ShowChannel}”) &gt; 0 Then strHtml = Replace(strHtml, “{$ShowChannel}”, <span style="color: #0000ff;">GetChannelList</span>(0))</p></blockquote>
<p>这说明标签{$ShowChannel}取决于<span style="color: #0000ff;">GetChannelList</span>()。再搜索<span style="color: #0000ff;">GetChannelList</span>，发现Include/PowerEasy.Common.Front.asp中有Function GetChannelList(NumNewLine)，已经找到了。<span id="more-40"></span></p>
<p>下面就是<strong><span style="text-decoration: underline;"><span style="color: #ff0000;">如何修改</span></span></strong>。<br />
大部分情况下，http://www.zhangzhenfeng.com/ 与 http://www.zhangzhenfeng.com/index.asp 的 Google PageRank 是不同的。据说，在google 看来，目录的权重比文件大。默认情况下，动易的标签 {$ShowChannel} 输出时，网站首页、频道首页的地址都是{$InstallDir}index.htm、{$InstallDir}Article/index.asp 的形式，如何才能修改为 {$InstallDir}、{$InstallDir}Article/ 的形式呢？详情请参考<a href="http://www.zhangzhenfeng.com/showchannel-getchannelList/">http://www.zhangzhenfeng.com/showchannel-getchannelList/</a></p>
<p>其中Function GetChannelList(NumNewLine)中的<span style="color: #0000ff;">XmlText(“BaseText”, “FirstPage”, “网站首页”)</span> 表明调用的是语言包文件Language/Gb2312.xml的内容，在&lt;BaseText&gt;与&lt;/BaseText&gt;中的&lt;FirstPage&gt;、&lt;/FirstPage&gt;之间的内容，默认值为”网站首页”，可自行修改。</p>
<p>另外，有时修改系统默认值可以在后台直接通过浏览器查看编译后的html代码帮助查找。例如想修改添加软件时默认外部地址“下载地址1|http://”，在后台添加时右击查看源代码，会发现这取决于JavaScript函数function AddUrl()。利用这一点在“admin_soft.asp”第839、840行找到如下代码</p>
<blockquote><p>Response.Write “function AddUrl(){” &amp; vbCrLf<br />
Response.Write “  var thisurl=”” &amp; XmlText(“Soft”, “DownloadUrlTip”, “下载地址”) &amp; “”+(document.myform.DownloadUrl.length+1)+”|http://”; ” &amp; vbCrLf</p></blockquote>
<p>也就找到了修改的地方了，修改就很容易了。修改语言包可以替换“下载地址1|http://”中的“<strong>下载地址</strong>”，删除+(document.myform.DownloadUrl.length+1)可以删除其中的数字<strong><span style="color: #000000;">1</span></strong><span style="color: #000000;">，还可以修改“http://”为更接近你的软件下载地址的代码如<strong>http://down.free8.net.cn/Files/</strong></span></p>
<p>补充一个源代码中的注释：</p>
<blockquote><p>”**************************************************<br />
”函数名：XmlText<br />
”作  用：从语言包中读取指定节点的值<br />
”参  数：iBigNode &#8212;- 大节点<br />
”        iSmallNode &#8212;- 小节点<br />
”        DefChar &#8212;- 默认值<br />
”返回值：语言包中指定节点的值<br />
”**************************************************<br />
Function XmlText(ByVal iBigNode, ByVal iSmallNode, ByVal DefChar)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.zhangzhenfeng.com/siteweaver-modify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

