<?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>DeepOcean</title>
	<atom:link href="http://deepocean.amoyu.org/feed" rel="self" type="application/rss+xml" />
	<link>http://deepocean.amoyu.org</link>
	<description>Memorize Sth.</description>
	<lastBuildDate>Fri, 26 Feb 2010 00:00:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Symbol LS-2106光枪设置条码</title>
		<link>http://deepocean.amoyu.org/archives/332</link>
		<comments>http://deepocean.amoyu.org/archives/332#comments</comments>
		<pubDate>Wed, 16 Dec 2009 01:11:51 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[软硬维护]]></category>
		<category><![CDATA[维护]]></category>
		<category><![CDATA[symbol]]></category>
		<category><![CDATA[光枪]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/?p=332</guid>
		<description><![CDATA[Symbol LS-2106 光枪初始设置中默认是不带后缀数据的，但在图书馆的实际使用往往是需要光枪每扫描完一个条码后带一个回车键，以确认数据录入。经过在Symbol网站搜索，找到了该光枪手册，因原英文手册内容比较繁杂，特意从中将相关设置的条码截取出来，另外做了一份设置条码手册，以便日后使用。
Symbol ls2106 光枪自动回车设置条码
]]></description>
			<content:encoded><![CDATA[<p>Symbol LS-2106 光枪初始设置中默认是不带后缀数据的，但在图书馆的实际使用往往是需要光枪每扫描完一个条码后带一个回车键，以确认数据录入。经过在Symbol网站搜索，找到了该光枪手册，因原英文手册内容比较繁杂，特意从中将相关设置的条码截取出来，另外做了一份设置条码手册，以便日后使用。</p>
<p><a href="http://deepocean.amoyu.org/wp-content/uploads/2009/12/Microsoft-Word-Symbol-ls2106-光枪自动回车设置条码.pdf"></a><a href="http://deepocean.amoyu.org/wp-content/uploads/2009/12/Microsoft-Word-Symbol-ls2106-光枪自动回车设置条码.pdf">Symbol ls2106 光枪自动回车设置条码</a></p>
]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/332/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>links for 2009-11-07</title>
		<link>http://deepocean.amoyu.org/archives/329</link>
		<comments>http://deepocean.amoyu.org/archives/329#comments</comments>
		<pubDate>Sat, 07 Nov 2009 13:03:41 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[经验技巧]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/archives/329</guid>
		<description><![CDATA[

Internet Archive Search: subject:&#34;code4lib&#34;
(tags: code4lib library)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.archive.org/search.php?query=subject%3A%22code4lib%22">Internet Archive Search: subject:&quot;code4lib&quot;</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/deepocean/code4lib">code4lib</a> <a href="http://delicious.com/deepocean/library">library</a>)</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/329/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server 2008安装过程中要求“重新启动服务器”的问题</title>
		<link>http://deepocean.amoyu.org/archives/311</link>
		<comments>http://deepocean.amoyu.org/archives/311#comments</comments>
		<pubDate>Wed, 16 Sep 2009 05:15:57 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[经验技巧]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/archives/311</guid>
		<description><![CDATA[如果之前安装过SQL Server 2008，当再次安装以增加新的功能时，可能在安装检查时出现“必须重启服务器”的要求，但重启之后还是有同样的错误。
可以修改注册表文件，解决此问题：
到HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager 位置
在右边窗口右击PendingFilerenameOperations，选择删除该键下所有内容，然后确认。
]]></description>
			<content:encoded><![CDATA[<p>如果之前安装过SQL Server 2008，当再次安装以增加新的功能时，可能在安装检查时出现“必须重启服务器”的要求，但重启之后还是有同样的错误。</p>
<p>可以修改注册表文件，解决此问题：<br />
到HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager 位置<br />
在右边窗口右击PendingFilerenameOperations，选择删除该键下所有内容，然后确认。</p>
]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/311/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>在Joomla中增加友情链接</title>
		<link>http://deepocean.amoyu.org/archives/305</link>
		<comments>http://deepocean.amoyu.org/archives/305#comments</comments>
		<pubDate>Thu, 27 Aug 2009 09:31:29 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[应用心得]]></category>
		<category><![CDATA[Joomla]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/?p=305</guid>
		<description><![CDATA[Joomla默认安装后有一个组件是友情链接，具体的使用方法是：
1. 新建菜单
2. 在菜单类型中的内部链接项选择“友情链接”，会出现三个子类，分别是：所有分类，分类和提交友情链接版面。而这里的所有分类和分类，则可以通过组件-》友情链接进行设置。
3. 最后再在模块管理中，启用新建的“友情链接”模块即可。
经过设置，发现在首页出现的友情链接菜单，实际上根选择“文章分类”类型的菜单类似，都是通过菜单链接到一个内部页面，只不过这个内部页面不是文章列表，而是一些链接的列表罢了。
这根我们通常认为的友情链接是有所区别的，经过搜索和测试，可以这样创建友情链接：
1. 新建菜单“友情链接”
2. 菜单-》友情链接-》创建-》外部链接-》标题和链接设置好-》保存
3. 模块管理中，启用“友情链接”模块
因为在菜单中使用的是外部链接项，所以通过此菜单项就可直接连接到其它网站
]]></description>
			<content:encoded><![CDATA[<p>Joomla默认安装后有一个组件是友情链接，具体的使用方法是：<br />
1. 新建菜单<br />
2. 在菜单类型中的内部链接项选择“友情链接”，会出现三个子类，分别是：所有分类，分类和提交友情链接版面。而这里的所有分类和分类，则可以通过组件-》友情链接进行设置。<br />
3. 最后再在模块管理中，启用新建的“友情链接”模块即可。<br />
经过设置，发现在首页出现的友情链接菜单，实际上根选择“文章分类”类型的菜单类似，都是通过菜单链接到一个内部页面，只不过这个内部页面不是文章列表，而是一些链接的列表罢了。</p>
<p>这根我们通常认为的友情链接是有所区别的，经过搜索和测试，可以这样创建友情链接：<br />
1. 新建菜单“友情链接”<br />
2. 菜单-》友情链接-》创建-》外部链接-》标题和链接设置好-》保存<br />
3. 模块管理中，启用“友情链接”模块<br />
因为在菜单中使用的是外部链接项，所以通过此菜单项就可直接连接到其它网站</p>
]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/305/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>links for 2009-08-21</title>
		<link>http://deepocean.amoyu.org/archives/303</link>
		<comments>http://deepocean.amoyu.org/archives/303#comments</comments>
		<pubDate>Sat, 22 Aug 2009 00:02:40 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[经验技巧]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/archives/303</guid>
		<description><![CDATA[

翻译：我是如何向我老婆解释REST(表象化状态转变)的 How I Explained REST to My Wife Version 0.1.2 &#8211; Windows Live
我是如何向我老婆解释REST
(tags: webservices rest web2.0)


How I Explained REST to My Wife
(tags: webservices rest web2.0)


wiki.dbpedia.org : Online Access
The DBpedia data set can be accessed online via a SPARQL query endpoint and as Linked Data.
(tags: dbpedia linkeddata API)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://dengpeng.spaces.live.com/blog/cns!2CC4700381D476A!1200.entry">翻译：我是如何向我老婆解释REST(表象化状态转变)的 How I Explained REST to My Wife Version 0.1.2 &#8211; Windows Live</a></div>
<div class="delicious-extended">我是如何向我老婆解释REST</div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/deepocean/webservices">webservices</a> <a href="http://delicious.com/deepocean/rest">rest</a> <a href="http://delicious.com/deepocean/web2.0">web2.0</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://tomayko.com/writings/rest-to-my-wife">How I Explained REST to My Wife</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/deepocean/webservices">webservices</a> <a href="http://delicious.com/deepocean/rest">rest</a> <a href="http://delicious.com/deepocean/web2.0">web2.0</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://wiki.dbpedia.org/OnlineAccess">wiki.dbpedia.org : Online Access</a></div>
<div class="delicious-extended">The DBpedia data set can be accessed online via a SPARQL query endpoint and as Linked Data.</div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/deepocean/dbpedia">dbpedia</a> <a href="http://delicious.com/deepocean/linkeddata">linkeddata</a> <a href="http://delicious.com/deepocean/API">API</a>)</div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/303/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP处理JSON</title>
		<link>http://deepocean.amoyu.org/archives/197</link>
		<comments>http://deepocean.amoyu.org/archives/197#comments</comments>
		<pubDate>Tue, 11 Aug 2009 04:46:30 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[编程相关]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/?p=197</guid>
		<description><![CDATA[PHP5.2以上版本中可使用函数json_encode和json_decode操作JSON。
json_encode 用于将数组转化为JSON对象
json_decode 用于将JSON对象转化为PHP对象或者数组
两者的使用说明，可以参见手册上的函数说明。
下面介绍几个实例和应用中需要注意的地方。

json_encode 只作用于utf8编码的数据，非utf8编码数据需要转换

数组转化为utf8：
$encodedArray = array_map&#40;utf8_encode, $rawArray&#41;;


json_decode也只能作用于utf8编码的数据，否则返回结果可能为NULL

$contents = file_get_contents&#40;$url&#41;;
$contents = utf8_encode&#40;$contents&#41;;
$results = json_decode&#40;$contents&#41;;


php中的对象名要用双引号，否则json_decode会出错

Bad&#40;s&#41; &#40;return NULL&#41;:
&#123;30:'13',31:'14',32:'15'&#125;
&#123;&#91;30:'13',31:'14',32:'15'&#93;&#125;
&#123;&#91;&#34;30&#34;:&#34;13&#34;,&#34;31&#34;:&#34;14&#34;,&#34;32&#34;:&#34;15&#34;&#93;&#125;
&#160;
Good :
&#91;&#123;&#34;30&#34;:&#34;13&#34;,&#34;31&#34;:&#34;14&#34;,&#34;32&#34;:&#34;15&#34;&#125;&#93;



相关资源：JSON在线验证
]]></description>
			<content:encoded><![CDATA[<p>PHP5.2以上版本中可使用函数<a href="http://cn.php.net/manual/en/function.json-encode.php">json_encode</a>和<a href="http://cn.php.net/manual/en/function.json-decode.php">json_decode</a>操作JSON。</p>
<p>json_encode 用于将数组转化为JSON对象</p>
<p>json_decode 用于将JSON对象转化为PHP对象或者数组</p>
<p>两者的使用说明，可以参见手册上的函数说明。</p>
<p>下面介绍几个实例和应用中需要注意的地方。</p>
<ol>
<li>json_encode 只作用于utf8编码的数据，非utf8编码数据需要转换

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">数组转化为utf8：
<span style="color: #000088;">$encodedArray</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_map</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">utf8_encode</span><span style="color: #339933;">,</span> <span style="color: #000088;">$rawArray</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>json_decode也只能作用于utf8编码的数据，否则返回结果可能为NULL

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$contents</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$contents</span> <span style="color: #339933;">=</span> <span style="color: #990000;">utf8_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$contents</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$contents</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>php中的对象名要用双引号，否则json_decode会出错

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Bad<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
<span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">30</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'13'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">31</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'14'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">32</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'15'</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#123;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">30</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'13'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">31</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'14'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">32</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'15'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#123;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;30&quot;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;13&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;31&quot;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;14&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;32&quot;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;15&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span>
&nbsp;
Good <span style="color: #339933;">:</span>
<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;30&quot;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;13&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;31&quot;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;14&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;32&quot;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;15&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span></pre></div></div>

</li>
</ol>
<p>相关资源：<a href="http://www.jsonlint.com/">JSON在线验证</a></p>
]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/197/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>在SmartTemplate中使用Begin End处理数组</title>
		<link>http://deepocean.amoyu.org/archives/295</link>
		<comments>http://deepocean.amoyu.org/archives/295#comments</comments>
		<pubDate>Tue, 11 Aug 2009 03:19:30 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[编程相关]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SmartTemplate]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/?p=295</guid>
		<description><![CDATA[SmartTemplate是一种PHP模板引擎，可以将php代码中的变量通过assgine函数赋值给模板输出变量。当php代码中欲输出的变量为数组时，怎样才能在模板中正确的输出呢？
使用Begin&#8230;.End语句，可以读取一个整数索引数组的值，而数组中的元素则必须为字符串索引的数组。上面的话不好理解，给两个例子：

$users = array&#40;
array&#40; 'NAME' =&#62; 'John Doe', 'GROUP' =&#62; 'ADMIN' &#41;,
array&#40; 'NAME' =&#62; 'Jack Doe', 'GROUP' =&#62; 'SUPPORT' &#41;,
array&#40; 'NAME' =&#62; 'James Doe', 'GROUP' =&#62; 'GUEST' &#41;,
array&#40; 'NAME' =&#62; 'Jane Doe', 'GROUP' =&#62; 'GUEST' &#41;,
&#41;; 
&#160;
$links = array&#40;
array&#40;
'TITLE' =&#62; 'PHP',
'URL' =&#62; 'http://www.php.net/',
&#41;,
array&#40;
'TITLE' =&#62; 'Apache',
'URL' =&#62; 'http://www.apache.org/',
&#41;,
array&#40;
'TITLE' =&#62; 'MySQL',
'URL' =&#62; 'http://www.mysql.com/',
&#41;,
&#41;;

在模板文件中使用Begin&#8230;End语句，

&#60;!-- BEGIN users --&#62; 
&#60;tr class=&#34;col{ROWBIT}&#34;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>SmartTemplate是一种PHP模板引擎，可以将php代码中的变量通过assgine函数赋值给模板输出变量。当php代码中欲输出的变量为数组时，怎样才能在模板中正确的输出呢？</p>
<p>使用Begin&#8230;.End语句，可以读取一个整数索引数组的值，而数组中的元素则必须为字符串索引的数组。上面的话不好理解，给两个例子：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$users</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'NAME'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'John Doe'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'GROUP'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ADMIN'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'NAME'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Jack Doe'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'GROUP'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'SUPPORT'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'NAME'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'James Doe'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'GROUP'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'GUEST'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'NAME'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Jane Doe'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'GROUP'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'GUEST'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #000088;">$links</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">'TITLE'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'PHP'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'URL'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://www.php.net/'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">'TITLE'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Apache'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'URL'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://www.apache.org/'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
<span style="color: #0000ff;">'TITLE'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'MySQL'</span><span style="color: #339933;">,</span>
<span style="color: #0000ff;">'URL'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://www.mysql.com/'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>在模板文件中使用Begin&#8230;End语句，</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- BEGIN users --&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;col{ROWBIT}&quot;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> {ROWCNT} <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> {NAME} <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> {GROUP} <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span> 
<span style="color: #808080; font-style: italic;">&lt;!-- END users --&gt;</span> 
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- BEGIN links --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;{URL}&quot;</span>&gt;</span> {TITLE} <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!-- END links --&gt;</span></pre></div></div>

<p>ROWCNT : 此元素在父数组中的具体位置 (0,1,2,3,&#8230;n)<br />
ROWBIT :  此元素在子数组中的位置. (0,1,0,1,0,1,&#8230;)</p>
<p>最后输出的结果为</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;col0&quot;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 0 <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> John Doe <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> ADMIN <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;col1&quot;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 1 <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> Jack Doe <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> SUPPORT <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;col0&quot;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 2 <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> James Doe <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> GUEST <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;col1&quot;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 3 <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> Jane Doe <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span> GUEST <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.php.net/&quot;</span>&gt;</span> PHP <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.apache.org/&quot;</span>&gt;</span> Apache <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.mysql.com/&quot;</span>&gt;</span> MySQL <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<p>参考：<a href="http://deepocean.amoyu.org/wp-content/uploads/2009/08/smarttemplate.doc">smarttemplate中文文档（部分）</a></p>
]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/295/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>windows主机安装PHP5+Mysql5需要注意的问题</title>
		<link>http://deepocean.amoyu.org/archives/292</link>
		<comments>http://deepocean.amoyu.org/archives/292#comments</comments>
		<pubDate>Mon, 10 Aug 2009 10:48:50 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[软硬维护]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/archives/292</guid>
		<description><![CDATA[安装php5和mysql5可以直接下载安装包，并执行安装程序。因为php5默认是不支持mysql的，所以需要对php.ini进行设置。
如果你用IIS作为web server，则在windows目录下找php.ini。如果是apache作为web server，则在apache安装目录下找php.ini。
然后修改php.ini，将;extension=php_mysql.dll这行最前端的“；”去掉。接着就是需要注意的地方了，一定要copy php目录下的libmysql.dll到window系统目录中，否则无法加载。最后重启Apache，使用phpinfo查看一下，mysql是否加载成功。
===2009.9.3 更新===
今日发现使用PHP5.2.10版本+MySQL5.1.3版本时会因为PHP和MySQL的版本问题，引起php_mysql无法加载的情况。
使用php_mysqli模块，访问phpMyAdmin时出现提示：Your PHP MySQL library version 5.0.67 differs from your MySQL server version 5.1.30.
经查询，发现时由于PHP5.2版本中的php_mysql扩展无法支持MySQL5.1.3
经重新安装低版本的MySQL5.0后，php_mysql可以正常加载，且phpMyAdmin也未出现其他异常提示
]]></description>
			<content:encoded><![CDATA[<p>安装php5和mysql5可以直接下载安装包，并执行安装程序。因为php5默认是不支持mysql的，所以需要对php.ini进行设置。</p>
<p>如果你用IIS作为web server，则在windows目录下找php.ini。如果是apache作为web server，则在apache安装目录下找php.ini。</p>
<p>然后修改php.ini，将;extension=php_mysql.dll这行最前端的“；”去掉。接着就是需要注意的地方了，一定要copy php目录下的libmysql.dll到window系统目录中，否则无法加载。最后重启Apache，使用phpinfo查看一下，mysql是否加载成功。</p>
<p>===2009.9.3 更新===<br />
今日发现使用PHP5.2.10版本+MySQL5.1.3版本时会因为PHP和MySQL的版本问题，引起php_mysql无法加载的情况。<br />
使用php_mysqli模块，访问phpMyAdmin时出现提示：Your PHP MySQL library version 5.0.67 differs from your MySQL server version 5.1.30.<br />
经查询，发现时由于PHP5.2版本中的php_mysql扩展无法支持MySQL5.1.3<br />
经重新安装低版本的MySQL5.0后，php_mysql可以正常加载，且phpMyAdmin也未出现其他异常提示</p>
]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/292/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ntwdblib.dll引起的php无法加载mssql扩展</title>
		<link>http://deepocean.amoyu.org/archives/288</link>
		<comments>http://deepocean.amoyu.org/archives/288#comments</comments>
		<pubDate>Sat, 08 Aug 2009 07:37:29 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[软硬维护]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/?p=288</guid>
		<description><![CDATA[今天在测试机上使用PHP连接MS SQL Server，按照老办法无非就是以下三个步骤就能搞定

在Apache的httpd.conf中找到PHPIniDir的位置，然后找出php.ini来
去掉php.ini中“；extension=php_mssql.dll” 前方的分号
重启Apache

但是今天试了多次，仍然在phpinfo中无法看到成功加载mssql的信息。Google了一下，发现问题是由Windows目录下的ntwdblib.dll版本太早而引起的。如果你发现服务器上的该文件版本小于 80.194.0，则很有可能造成PHP无法加载mssql扩展的问题。
要解决也很简单，可以找一台安装SQL Server的机器，copy该机上的同名文件，或在 这里 下载一个新版本的覆盖服务器上的同名文件即可。
参考文章：http://www.userscape.com/helpdesk/index.php?pg=kb.page&#38;id=13
]]></description>
			<content:encoded><![CDATA[<p>今天在测试机上使用PHP连接MS SQL Server，按照老办法无非就是以下三个步骤就能搞定</p>
<ol>
<li>在Apache的httpd.conf中找到PHPIniDir的位置，然后找出php.ini来</li>
<li>去掉php.ini中“；extension=<strong><span style="color: #ff0000;">php</span></strong>_<strong><span style="color: #ff0000;">mssql</span></strong>.dll” 前方的分号</li>
<li>重启Apache</li>
</ol>
<p>但是今天试了多次，仍然在phpinfo中无法看到成功加载mssql的信息。Google了一下，发现问题是由Windows目录下的ntwdblib.dll版本太早而引起的。如果你发现服务器上的该文件版本小于 80.194.0，则很有可能造成PHP无法加载mssql扩展的问题。</p>
<p>要解决也很简单，可以找一台安装SQL Server的机器，copy该机上的同名文件，或在 <a href="http://www.userscape.com/ntwdblib.dll"></a><a href="http://www.userscape.com/ntwdblib.dll">这里</a> 下载一个新版本的覆盖服务器上的同名文件即可。</p>
<p>参考文章：<a href="http://www.userscape.com/helpdesk/index.php?pg=kb.page&amp;id=13">http://www.userscape.com/helpdesk/index.php?pg=kb.page&amp;id=13</a></p>
]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/288/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Joomla单元/分类介绍中插入模块</title>
		<link>http://deepocean.amoyu.org/archives/276</link>
		<comments>http://deepocean.amoyu.org/archives/276#comments</comments>
		<pubDate>Thu, 06 Aug 2009 12:22:13 +0000</pubDate>
		<dc:creator>zhxxmu</dc:creator>
				<category><![CDATA[应用心得]]></category>
		<category><![CDATA[Joomla]]></category>

		<guid isPermaLink="false">http://deepocean.amoyu.org/?p=276</guid>
		<description><![CDATA[近来在测试Joomla，想实现的一个功能是将Joomla中的模块加入到单元/分类的介绍中，在后台管理中似乎没有这样的设置，而修改模板index.html文件，增加新的position也无法达到想要的效果。最后在Joomla！中文技术讨论区中寻求帮助，终于找到了解决方法。
一、最新版（1.5.3以上)中，可以在单元/分类介绍中直接加入如下代码:
{loadposition ***}
然后在模块管理中，将希望插入到介绍部分的模块位置设置为***（与loadposition后面的位置一致）。这样就可以在介绍部分插入相应的模板了，但是因为css的问题，模块样式会消失。要如何实现css，我还没有测试，大概可以通过模块管理中的css后缀，进行修改。
二、其他版本（1.5.*）安装loadmodule_for_category_description_v1.5插件，可以在文章中任意位置加入模块

 下载安装。安装时，在joomla后台管理：扩展-》安装卸载—》上传压缩包文件-》选择下载好的zip文件进行安装
在扩展-》插件管理中启用loadmodule for Section/Category Description
在分类介绍模板中增加触发器

打开&#60;Joomla root folder&#62;/components/com_content/views/category, 找到view.html.php
打开该文件，转到39行，在其后加入下面的代码


$category    =&#38;amp; $this-&#38;gt;get&#40;'Category'&#41;;
$dispatcher    =&#38;amp; JDispatcher::getInstance&#40;&#41;;
JPluginHelper::importPlugin&#40;'content'&#41;;
$results = $dispatcher-&#38;gt;trigger&#40;'onBeforeDisplayTitle', array &#40;&#38;amp; $category&#41;&#41;;


保存


在单元介绍模板中增加触发器

打开&#60;Joomla root folder&#62;/components/com_content/views/section, 找到view.html.php
打开该文件，转到39行，在其后加入下面的代码


$section    =&#38;amp; $this-&#38;gt;get&#40;'Section'&#41;;
$dispatcher    =&#38;amp; JDispatcher::getInstance&#40;&#41;;
JPluginHelper::importPlugin&#40;'content'&#41;;
$results = $dispatcher-&#38;gt;trigger&#40;'onBeforeDisplayTitle', array &#40;&#38;amp; $section&#41;&#41;;


转到87行，加入




$dispatcher =&#38;amp; JDispatcher::getInstance&#40;&#41;;
JPluginHelper::importPlugin&#40;'content'&#41;;
for&#40;$i = 0; $i &#38;lt; count&#40;$categories&#41;; $i++&#41;
&#123;
$category =&#38;amp; $categories&#91;$i&#93;;
$category-&#38;gt;link = JRoute::_&#40;'index.php?view=category&#38;amp;id='.
$category-&#38;gt;slug&#41;;
$results=$dispatcher-&#38;gt;trigger&#40;'onBeforeDisplayTitle', array&#40;&#38;amp;$category&#41;&#41;;
&#125;
if &#40;$total == 0&#41; &#123;
$params-&#38;gt;set&#40;'show_categories', false&#41;;
&#125;


保存


在单元/分类介绍，或者文章内容的任意地方加入{loadposition ***}，然后再在模块管理中设置模块位置为***，就可以实现在介绍或者文章中插入模块。

参考内容：

How to include modules in Content item [...]]]></description>
			<content:encoded><![CDATA[<p>近来在测试Joomla，想实现的一个功能是将Joomla中的模块加入到单元/分类的介绍中，在后台管理中似乎没有这样的设置，而修改模板index.html文件，增加新的position也无法达到想要的效果。最后在<a href="http://www.joomla.org.tw/phpbb3/viewtopic.php?f=5&amp;t=4585">Joomla！中文技术讨论区</a>中寻求帮助，终于找到了解决方法。</p>
<p>一、最新版（1.5.3以上)中，可以在单元/分类介绍中直接加入如下代码:</p>
<p>{loadposition ***}</p>
<p>然后在模块管理中，将希望插入到介绍部分的模块位置设置为***（与loadposition后面的位置一致）。这样就可以在介绍部分插入相应的模板了，但是因为css的问题，模块样式会消失。要如何实现css，我还没有测试，大概可以通过模块管理中的css后缀，进行修改。</p>
<p>二、其他版本（1.5.*）安装<span id="link1"><a href="http://www.kksou.com/php-gtk2/Joomla/plugin-loadmodule-for-Section/Category-Description.php#install">loadmodule_for_category_description_v1.5</a>插件，可以在文章中任意位置加入模块</span></p>
<ol>
<li><span> 下载安装。安装时，在joomla后台管理：扩展-》安装卸载—》</span>上传压缩包文件-》选择下载好的zip文件进行安装</li>
<li>在扩展-》插件管理中启用<a href="http://localhost/joomla/administrator/index.php?option=com_plugins&amp;view=plugin&amp;client=site&amp;task=edit&amp;cid%5B%5D=34">loadmodule for Section/Category Description</a></li>
<li>在分类介绍模板中增加触发器
<ul>
<li><code>打开&lt;Joomla root folder&gt;/components/com_content/views/category</code>, 找到<strong>view.html.php</strong></li>
<li>打开该文件，转到39行，在其后加入下面的代码</li>
<li>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$category</span>    <span style="color: #339933;">=&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Category'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dispatcher</span>    <span style="color: #339933;">=&amp;</span>amp<span style="color: #339933;">;</span> JDispatcher<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
JPluginHelper<span style="color: #339933;">::</span><span style="color: #004000;">importPlugin</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'content'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dispatcher</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>trigger<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'onBeforeDisplayTitle'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #000088;">$category</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>保存</li>
</ul>
</li>
<li>在单元介绍模板中增加触发器
<ul>
<li><code>打开&lt;Joomla root folder&gt;/components/com_content/views/section</code>, 找到<strong>view.html.php</strong></li>
<li>打开该文件，转到39行，在其后加入下面的代码</li>
<li>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$section</span>    <span style="color: #339933;">=&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Section'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dispatcher</span>    <span style="color: #339933;">=&amp;</span>amp<span style="color: #339933;">;</span> JDispatcher<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
JPluginHelper<span style="color: #339933;">::</span><span style="color: #004000;">importPlugin</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'content'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dispatcher</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>trigger<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'onBeforeDisplayTitle'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #000088;">$section</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>转到87行，加入</li>
</ul>
<ul>
<li>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$dispatcher</span> <span style="color: #339933;">=&amp;</span>amp<span style="color: #339933;">;</span> JDispatcher<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
JPluginHelper<span style="color: #339933;">::</span><span style="color: #004000;">importPlugin</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'content'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$categories</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$category</span> <span style="color: #339933;">=&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #000088;">$categories</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$category</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>link <span style="color: #339933;">=</span> JRoute<span style="color: #339933;">::</span>_<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'index.php?view=category&amp;amp;id='</span><span style="color: #339933;">.</span>
<span style="color: #000088;">$category</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>slug<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$results</span><span style="color: #339933;">=</span><span style="color: #000088;">$dispatcher</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>trigger<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'onBeforeDisplayTitle'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span><span style="color: #000088;">$category</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$total</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$params</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>set<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'show_categories'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</li>
<li>保存</li>
</ul>
</li>
<li>在单元/分类介绍，或者文章内容的任意地方加入{loadposition ***}，然后再在模块管理中设置模块位置为***，就可以实现在介绍或者文章中插入模块。</li>
</ol>
<p>参考内容：</p>
<ul>
<li><a href="http://www.kksou.com/php-gtk2/Joomla/How-to-include-modules-in-Content-item-for-Joomla-1.5.x.php">How to include modules in Content item (for Joomla 1.5.x)</a></li>
<li><a href="http://forum.joomla.org/viewtopic.php?f=32&amp;t=241444&amp;start=0&amp;sid=1208cbe508329dabd440c657a77db250">How to allow plugins/mambots to work inside of Section/Categories?</a></li>
</ul>
<p>更新：<br />
文章中提到新增加的模块css问题，可以在单元/分类介绍中使用HTML编辑，这样就可以设置新加入模块的css了，例如：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;module heading&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#123;</span>loadposition <span style="color: #339933;">***</span><span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://deepocean.amoyu.org/archives/276/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>