帝国下载系统集成FCKeditor编辑器方法 -电脑资料
帝国下载系统除了自带的编辑器外还可以添加其他编辑器,本文教你如何把FCKe
ditor编辑器添加到帝国下载系统中,帝国下载系统集成FCKeditor编辑器方法
。方法如下:1、下载FCKeditor放在网站根目录;
2、找到admin/AddSoft.php第80行,将
<span class="sh_variable" style="FONT-STYLE. normal; COLOR: rgb(34,95,45); FONT-WEIGHT: normal">$softsay</span><span class="sh_symbol">=</span><span class="sh_function" style="FONT-STYLE. normal; COLOR: rgb(0,0,0); FONT-WEIGHT: bold">htmlspecialchars</span><span class="sh_symbol">(</span><span class="sh_variable" style="FONT-STYLE. normal; COLOR: rgb(34,95,45); FONT-WEIGHT: normal">$r</span><span class="sh_symbol">[</span>softsay<span class="sh_symbol">]);</span>
改成
<span class="sh_variable" style="FONT-STYLE. normal; COLOR: rgb(34,95,45); FONT-WEIGHT: normal">$softsay</span><span class="sh_symbol">=</span><span class="sh_variable" style="FONT-STYLE. normal; COLOR: rgb(34,95,45); FONT-WEIGHT: normal">$r</span><span class="sh_symbol">[</span>softsay<span class="sh_symbol">];</span>
3、找到data/form/1.php第224行,将
<span class="sh_symbol"><</span>textarea name<span class="sh_symbol">=</span><span class="sh_string" style="FONT-STYLE. normal; COLOR: rgb(255,0,255); FONT-WEIGHT: normal">"softsay"</span> cols<span class="sh_symbol">=</span><span class="sh_string" style="FONT-STYLE. normal; COLOR: rgb(255,0,255); FONT-WEIGHT: normal">"67"</span> rows<span class="sh_symbol">=</span><span class="sh_string" style="FONT-STYLE. normal; COLOR: rgb(255,0,255); FONT-WEIGHT: normal">"12"</span> style<span class="sh_symbol">=</span><span class="sh_string" style="FONT-STYLE. normal; COLOR: rgb(255,0,255); FONT-WEIGHT: normal">"WIDTH:100%"</span><span class="sh_symbol">><?=</span><span class="sh_variable" style="FONT-STYLE. normal; COLOR: rgb(34,95,45); FONT-WEIGHT: normal">$softsay</span><span class="sh_symbol">?></</span>textarea<span class="sh_symbol">></span>
改成
<span class="sh_symbol"><?=</span><span class="sh_variable" style="FONT-STYLE. normal; COLOR: rgb(34,95,45); FONT-WEIGHT: normal">$oFCKeditor</span><span class="sh_symbol">-></span><span class="sh_function" style="FONT-STYLE. normal; COLOR: rgb(0,0,0); FONT-WEIGHT: bold">Create</span><span class="sh_symbol">();?></span>
4、在顶部?>前增加
<span class="sh_preproc" style="FONT-STYLE. normal; COLOR: rgb(160,32,240); FONT-WEIGHT: normal">include</span><span class="sh_symbol">(</span><span class="sh_string" style="FONT-STYLE. normal; COLOR: rgb(255,0,255); FONT-WEIGHT: normal">"../FCKeditor/fckeditor.php"</span><span class="sh_symbol">)</span> <span class="sh_symbol">;</span> <span class="sh_comment" style="FONT-STYLE. normal; COLOR: rgb(255,0,0); FONT-WEIGHT: normal">//FCKeditor 包含文件</span> <span class="sh_variable" style="FONT-STYLE. normal; COLOR: rgb(34,95,45); FONT-WEIGHT: normal">$oFCKeditor</span> <span class="sh_symbol">=</span> <span class="sh_keyword" style="FONT-STYLE. normal; COLOR: rgb(165,42,42); FONT-WEIGHT: normal">new</span> <span class="sh_function" style="FONT-STYLE. normal; COLOR: rgb(0,0,0); FONT-WEIGHT: bold">FCKeditor</span><span class="sh_symbol">(</span><span class="sh_string" style="FONT-STYLE. normal; COLOR: rgb(255,0,255); FONT-WEIGHT: normal">'softsay'</span><span class="sh_symbol">)</span> <span class="sh_symbol">;</span> <span class="sh_variable" style="FONT-STYLE. normal; COLOR: rgb(34,95,45); FONT-WEIGHT: normal">$oFCKeditor</span><span class="sh_symbol">-></span>BasePath <span class="sh_symbol">=</span> <span class="sh_string" style="FONT-STYLE. normal; COLOR: rgb(255,0,255); FONT-WEIGHT: normal">"../FCKeditor/"</span> <span class="sh_symbol">;</span> <span class="sh_variable" style="FONT-STYLE. normal; COLOR: rgb(34,95,45); FONT-WEIGHT: normal">$oFCKeditor</span><span class="sh_symbol">-></span>Value <span class="sh_symbol">=</span> <span class="sh_string" style="FONT-STYLE. normal; COLOR: rgb(255,0,255); FONT-WEIGHT: normal">"$softsay"</span><span class="sh_symbol">;</span>
5、完成,