<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[5D Home]]></title> 
<link>http://www.5dhome.net/myblog/index.php</link> 
<description><![CDATA[PHP, Typo3 CMS, Typolight CMS, Javascript, Jquery, Windows, Linux, iphone]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[5D Home]]></copyright>
<item>
<link>http://www.5dhome.net/myblog/read.php?202</link>
<title><![CDATA[Content-Box 的用法 // Typolight Teaser]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[typolight]]></category>
<pubDate>Thu, 28 Feb 2008 02:57:52 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?202</guid> 
<description>
<![CDATA[ 
	为了解决左右两边的动态Teaser问题，开发了该组件，更方便了左右Teaser的内容管理。使用Content Box组件分以下几个步骤。<br/><br/><span style="font-size: 14px;"><strong>一、安装组件<br/><br/>二、创建Moudule<br/><br/>三、在Layout中调用<br/><br/>四、创建Teaser（基于Content Box组件）</strong></span><br/><br/><br/><span style="font-size: 14px;"><strong><span style="color: #FF4500;">一、安装组件</span></strong></span><br/>首先安装Content Box组件，安装方法就不细说了和其他的modules安装是一样的，将组件拷贝到system/modules下面，然后在install.php中提交表，刷新后台即可。<br/><br/><span style="color: #FF4500;">下载Content Box组件</span><br/><a href="attachment/boxes_v1.6.zip">点击这里下载文件</a><br/><span style="font-size: 14px;"><strong><span style="color: #FF4500;">二、创建Moudule</span></strong></span><br/>进入Layout-&gt;Modules新建一个Module，输入Module名字，选择类型为Content Box，保存Module。<br/><br/><br/><img src="http://www.5dhome.net/myblog/template/DarkBlue/images/viewimage.gif" alt=""/><a href="http://www.5dhome.net/myblog/attachment/1204168156_0.png" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://www.5dhome.net/myblog/attachment/1204168156_0.png" target="_blank">http://www.5dhome.net/mybl...</a><br/><br/><br/><br/><span style="font-size: 14px;"><strong><span style="color: #FF4500;">三、在Layout中调用</span></strong></span><br/>进入Layout-&gt;Page Layouts中，选择要进行整合的Layout布局，将刚建好的Module嵌入到Layout中，在这里可以定义Module的显示位置。<br/><br/><br/><img src="http://www.5dhome.net/myblog/template/DarkBlue/images/viewimage.gif" alt=""/><a href="http://www.5dhome.net/myblog/attachment/1204168427_0.png" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://www.5dhome.net/myblog/attachment/1204168427_0.png" target="_blank">http://www.5dhome.net/mybl...</a><br/><br/><br/><br/><span style="font-size: 14px;"><strong><span style="color: #FF4500;">四、创建Teaser（基于Content Box组件）</span></strong></span><br/>最后一步也是最重要的一步，进入Content-&gt;Content Box中，创建一个Box，这里我只介绍几个主要参数。<br/><br/>a) 控制box的位置，即排序<br/><br/><img src="http://www.5dhome.net/myblog/template/DarkBlue/images/viewimage.gif" alt=""/><a href="http://www.5dhome.net/myblog/attachment/1204169550_0.png" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://www.5dhome.net/myblog/attachment/1204169550_0.png" target="_blank">http://www.5dhome.net/mybl...</a><br/><br/><br/>b) 指定box所属module，在前面我们建了module（相当于容器），这里把新建的box的放入module中<br/><br/><img src="http://www.5dhome.net/myblog/template/DarkBlue/images/viewimage.gif" alt=""/><a href="http://www.5dhome.net/myblog/attachment/1204169681_0.png" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://www.5dhome.net/myblog/attachment/1204169681_0.png" target="_blank">http://www.5dhome.net/mybl...</a><br/><br/><br/>c) 指定页面，控制当前的content box在哪些页面显示，展开页面树，选择所要控制显示的页面即可<br/><br/><img src="http://www.5dhome.net/myblog/template/DarkBlue/images/viewimage.gif" alt=""/><a href="http://www.5dhome.net/myblog/attachment/1204169859_0.png" target="_blank">点击在新窗口中浏览此图片</a><br/><a href="http://www.5dhome.net/myblog/attachment/1204169859_0.png" target="_blank">http://www.5dhome.net/mybl...</a><br/><br/><br/><span style="font-size: 18px;">Over ~~</span>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?201</link>
<title><![CDATA[FTP帐户和Apache帐户冲突问题解决 // typolight CMS]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[typolight]]></category>
<pubDate>Thu, 21 Feb 2008 09:09:12 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?201</guid> 
<description>
<![CDATA[ 
	typolight系统的后台File manager问题<br/><br/>由于typolight上传文件可以从后台上传，当然每一个网站基本上都能支持ftp上传，问题就在typolight系统上传的文件，文件的owner是apache帐号，这导致了ftp上传和typolight后台上传的文件冲突了。<br/><br/>说简单点就是，ftp上传的文件通过后台是无法修改和删除的，而后台上传的文件通过ftp工具连接上也没有权限去做任何操作。<br/><br/>解决的办法其实很简单<br/><br/>登陆到后台，通过System-&gt;settings配置FTP信息，打开Use FTP to modify files选项，激活后台文件系统也用FTP进行管理即可，激活了Use FTP to modify files选项后，输入正确的FTP帐号信息和文件目录信息即可。<br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=typolight" rel="tag">typolight</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?183</link>
<title><![CDATA[如何在typolight的module里添加rich text的组件]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[typolight]]></category>
<pubDate>Tue, 30 Oct 2007 08:26:05 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?183</guid> 
<description>
<![CDATA[ 
	1、在数据库中找到表tl_module，添加一个和html字段一样的text字段，名为rte<br/><br/>2、打开system/modules/backend/dca/tl_module.php文件<br/><br/>3、找到代码第94行左右，在&#039;html&#039; =&gt; &#039;name,type;html&#039;,新增一行代码&#039;rte&#039; =&gt; &#039;name,type,headline;rte,cssID&#039;,完后如下：<br/><div class="code"><br/>&#039;palettes&#039; =&gt; array<br/>(<br/>...<br/>&#039;html&#039; &nbsp; =&gt; &#039;name,type;html&#039;,<br/>&#039;rte&#039; &nbsp; &nbsp; =&gt; &#039;name,type,headline;rte,cssID&#039;,<br/>...<br/>)<br/></div><br/><br/>4、找到代码第314行左右，在html数组下增加一个新数组rte，代码如下：<br/><br/><div class="code"><br/> &nbsp; &nbsp;&#039;html&#039; =&gt; array<br/> &nbsp; &nbsp;(<br/> &nbsp; &nbsp; &nbsp;&#039;label&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &amp;$GLOBALS&#91;&#039;TL_LANG&#039;&#93;&#91;&#039;tl_module&#039;&#93;&#91;&#039;html&#039;&#93;,<br/> &nbsp; &nbsp; &nbsp;&#039;exclude&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; true,<br/> &nbsp; &nbsp; &nbsp;&#039;search&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; true,<br/> &nbsp; &nbsp; &nbsp;&#039;inputType&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;textarea&#039;,<br/> &nbsp; &nbsp; &nbsp;&#039;eval&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; array(&#039;allowHtml&#039;=&gt;true)<br/> &nbsp; &nbsp;),<br/><br/> &nbsp; &nbsp;&#039;rte&#039; =&gt; array<br/> &nbsp; &nbsp;(<br/> &nbsp; &nbsp; &nbsp;&#039;label&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &amp;$GLOBALS&#91;&#039;TL_LANG&#039;&#93;&#91;&#039;tl_module&#039;&#93;&#91;&#039;rte&#039;&#93;,<br/> &nbsp; &nbsp; &nbsp;&#039;exclude&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; true,<br/> &nbsp; &nbsp; &nbsp;&#039;search&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; true,<br/> &nbsp; &nbsp; &nbsp;&#039;inputType&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;textarea&#039;,<br/> &nbsp; &nbsp; &nbsp;&#039;eval&#039; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&gt; array(&#039;rte&#039;=&gt;&#039;tinyMCE&#039;),<br/> &nbsp; &nbsp;),<br/></div><br/><br/>5、打开system/modules/backend/languages/en/tl_module.php文件<br/>在代码行54行左右，$GLOBALS[&#039;TL_LANG&#039;][&#039;tl_module&#039;][&#039;html&#039;] 后新增一行代码，如下：<br/><div class="code"><br/>$GLOBALS&#91;&#039;TL_LANG&#039;&#93;&#91;&#039;tl_module&#039;&#93;&#91;&#039;html&#039;&#93; &nbsp;= array(&#039;HTML code&#039;, &#039;Please enter your HTML code.&#039;);<br/>$GLOBALS&#91;&#039;TL_LANG&#039;&#93;&#91;&#039;tl_module&#039;&#93;&#91;&#039;rte&#039;&#93; &nbsp; &nbsp;= array(&#039;Rich Text&#039;, &#039;Please enter your rich text.&#039;);<br/></div><br/><br/>6、打开system/modules/frontend/config文件，在数组中添加rte元素，如下<br/><div class="code"><br/> &nbsp;&#039;miscellaneous&#039; =&gt; array<br/> &nbsp;(<br/> &nbsp; &nbsp;&#039;rte&#039; &nbsp; &nbsp; &nbsp; =&gt; &#039;ModuleRte&#039;,<br/> &nbsp; &nbsp;...<br/> &nbsp;)<br/></div><br/><br/>7、在system/modules/frontend/下新建文件ModuleRte.php，代码如下<br/>[codes=php]<br/>&lt;?php<br/><br/>class ModuleRte extends Module<br/>&#123;<br/><br/> &nbsp;/**<br/> &nbsp; * Template<br/> &nbsp; * @var string<br/> &nbsp; */<br/> &nbsp;protected $strTemplate = &#039;mod_rte&#039;;<br/><br/><br/> &nbsp;/**<br/> &nbsp; * Generate module<br/> &nbsp; */<br/> &nbsp;protected function compile()<br/> &nbsp;&#123;<br/> &nbsp; &nbsp;$this-&gt;Template-&gt;rte = $this-&gt;rte;<br/> &nbsp;&#125;<br/>&#125;<br/><br/>?&gt;<br/>[/codes]<br/><br/>8、在system/modules/frontend/templates/下新建文件mod_rte.tpl，代码如下<br/><br/>[codes=php]<br/>&lt;div class=&quot;&lt;?php echo $this-&gt;class;?&gt;&quot;&gt;<br/>&lt;?php if ($this-&gt;headline): ?&gt;<br/> <br/>&lt;&lt;?php echo $this-&gt;hl; ?&gt;&gt;&lt;?php echo $this-&gt;headline;?&gt;&lt;/&lt;?php echo $this-&gt;hl; ?&gt;&gt;<br/>&lt;?php endif; ?&gt;<br/>&lt;?php echo $this-&gt;rte; ?&gt;<br/>&lt;/div&gt;<br/>[/codes]<br/><br/>9、打开system/modules/frontend/languages/en/modules.php下自己找到合适位置，新增一行代码，如下<br/><div class="code"><br/>$GLOBALS&#91;&#039;TL_LANG&#039;&#93;&#91;&#039;FMD&#039;&#93;&#91;&#039;rte&#039;&#93; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = array(&#039;Rich Text&#039;, &#039;This module allows you to enter rich text.&#039;);<br/></div><br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=typolight" rel="tag">typolight</a>
]]>
</description>
</item><item>
<link>http://www.5dhome.net/myblog/read.php?182</link>
<title><![CDATA[typolight如何调用php文件 // include操作]]></title> 
<author>曼查罗 &lt;34n.sam@gmail.com&gt;</author>
<category><![CDATA[typolight]]></category>
<pubDate>Tue, 30 Oct 2007 05:40:04 +0000</pubDate> 
<guid>http://www.5dhome.net/myblog/read.php?182</guid> 
<description>
<![CDATA[ 
	在html代码出输入&#123;&#123;file::myowncode.php&#125;&#125; . 唯一要注意的是php文件要放置在templates模板位置。<br/>Tags - <a href="http://www.5dhome.net/myblog/tag.php?tag=typolight" rel="tag">typolight</a>
]]>
</description>
</item>
</channel>
</rss>