设为首页
收藏本站
Archiver
用户
登录
入住
用户名
Email
自动登录
找回密码
密码
登录
入住 CI 中国社区
首页
返回 CodeIgniter 中国首页
论坛
BBS
导读
Guide
个人主页
Space
中文手册
搜索
CodeIgniter 搜索引擎
视频教程
案例
任务
搜索
搜索
本版
帖子
用户
设为首页
收藏本站
Archiver
开启辅助访问
切换到宽版
日志
相册
分享
记录
CodeIgniter4
CodeIgniter3
CodeIgniter2
帖子
好友
道具
勋章
收藏
任务
记录
留言板
设置
我的收藏
退出
腾讯QQ
微信登录
CodeIgniter 中国开发者社区
»
论坛
›
CodeIgniter 开发
›
代码共享与下载
›
为CodeIgniter(v1.6.3) 安装FCKeditor插件
1
2
/ 2 页
下一页
返回列表
查看:
14963
|
回复:
15
[插件 Plugin]
为CodeIgniter(v1.6.3) 安装FCKeditor插件
[复制链接]
杏糖兜油菜
杏糖兜油菜
当前离线
积分
57
IP卡
狗仔卡
发表于 2008-10-15 16:47:47
|
显示全部楼层
|
阅读模式
一篇博客中很好的文章,原文:
http://blog.sina.com.cn/s/blog_4b93170a0100b1e4.html
1. 下载解压FCKeditor 2.6.x, 然后放在system/application/plugins/fckeditor/ 下。
2.根据你的php版本,将fckeditor_php4.php或fckeditor_php5.php复制到 /system/application/libraries/ 下,并更名为 fckeditor.php
3. 打开此文件,将类名更改为 Fckeditor,并修改你的构造器
PHP
复制代码
// PHP 5
function
__construct
(
$instanceName
)
{
$this
->
InstanceName
=
$instanceName
;
$this
->
BasePath
=
'/fckeditor/'
;
$this
->
Width
=
'100%'
;
$this
->
Height
=
'200'
;
$this
->
ToolbarSet
=
'Default'
;
$this
->
Value
=
''
;
$this
->
Config
=
array
(
)
;
}
// PHP 4
function
Fckeditor
(
$instanceName
)
{
$this
->
__construct
(
$instanceName
)
;
}
复制代码
4. 打开 ./system/application/libraries/下的 fckeditor.php,复制FCKeditor_IsCompatibleBrowser()函数里的所有内容,替换到IsCompatible()函数里的所有内容
5. 修改 ./system/application/libraries/fckeditor.php 的 constructor 里的 basepath 定义
$this->BasePath = base_url().'system/application/plugins/fckeditor/' ;
6.如果你使用了.htaccess文件,需要做如下修改
RewriteCond $1 !^(index\.php|images|system/application/plugins/fckeditor)
7. 基本设置完毕,在控制器中调用:
PHP
复制代码
$this
->
load
->
library
(
'fckeditor'
,
'content'
)
;
$this
->
fckeditor
->
ToolbarSet
=
'Basic'
;
$data
[
'fckeditor'
]
=
$this
->
fckeditor
->
CreateHtml
(
)
;
复制代码
在view里用 <?=$fckeditor?>就可以了
8.如果要在一个页面显示多个fckeditor
PHP
复制代码
$this
->
load
->
library
(
'fckeditor'
,
'FCKEDITOR1'
)
;
$this
->
fckeditor
->
BasePath
=
'system/plugins/FCKeditor/'
;
$this
->
fckeditor
->
ToolbarSet
=
'Basic'
;
$data
[
'fck1'
]
=
$this
->
fckeditor
->
CreateHtml
(
)
;
$this
->
fckeditor
->
InstanceName
=
'FCKEDITOR2'
;
$data
[
'fck2'
]
=
$this
->
fckeditor
->
CreateHtml
(
)
;
$this
->
load
->
view
(
'mypage'
,
$data
)
;
//在服务器端,可以这样:
$first_box
=
$this
->
input
->
post
(
'FCKEDITOR1'
)
;
$second_box
=
$this
->
input
->
post
(
'FCKEDITOR2'
)
;
复制代码
其他的一些配置,你可以在fckconfig.js中自己修改
[
本帖最后由 杏糖兜油菜 于 2008-10-15 22:28 编辑
]
评分
参与人数
2
威望
+10
收起
理由
oraclelee
+ 5
Hex
+ 5
原创内容
查看全部评分
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
千斤顶
显身卡
Hex
Hex
当前离线
积分
50108
IP卡
狗仔卡
发表于 2008-10-15 17:10:05
|
显示全部楼层
太好了!很多人都不会配置 FCKEditor,楼主是好人!加分
回复
支持
反对
使用道具
举报
显身卡
sam
sam
当前离线
积分
466
IP卡
狗仔卡
发表于 2008-10-15 17:37:12
|
显示全部楼层
http://blog.sina.com.cn/s/blog_4b93170a0100b1e4.html
回复
支持
反对
使用道具
举报
显身卡
pujing
pujing
当前离线
积分
3
IP卡
狗仔卡
发表于 2008-10-15 21:48:47
|
显示全部楼层
回复
支持
反对
使用道具
举报
显身卡
yygcom
yygcom
当前离线
积分
339
IP卡
狗仔卡
发表于 2008-10-17 17:05:50
|
显示全部楼层
FCK是个好东东,不过感觉还是用js调用来的实在,个人之见,仅供参考
回复
支持
反对
使用道具
举报
显身卡
沧蓝
沧蓝
当前离线
积分
757
IP卡
狗仔卡
发表于 2008-11-9 15:01:50
|
显示全部楼层
我想怎么看着那么眼熟,原来那篇blog是抄的我的帖子:
http://codeigniter.org.cn/forums/viewthread.php?tid=259
回复
支持
反对
使用道具
举报
显身卡
Hex
Hex
当前离线
积分
50108
IP卡
狗仔卡
发表于 2008-11-9 21:08:13
|
显示全部楼层
严厉打击抄袭帖子的行为!
回复
支持
反对
使用道具
举报
显身卡
daofeng125
daofeng125
当前离线
积分
86
IP卡
狗仔卡
发表于 2008-11-16 10:25:46
|
显示全部楼层
hex
就事论事啊!
回复
支持
反对
使用道具
举报
显身卡
johnwei01
johnwei01
当前离线
积分
31
IP卡
狗仔卡
发表于 2009-1-28 04:39:03
|
显示全部楼层
不负责任的抄袭行为,论坛的都试过,除了js的外其他都是不行的,楼主有心的就把配置好FCK的CI打包让我们下载。
回复
支持
反对
使用道具
举报
显身卡
gumoon
gumoon
当前离线
积分
9
IP卡
狗仔卡
发表于 2009-2-1 18:04:45
|
显示全部楼层
挺好
学习了
很强大
呵呵
谢谢
回复
支持
反对
使用道具
举报
显身卡
下一页 »
1
2
/ 2 页
下一页
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
入住 CI 中国社区
本版积分规则
发表回复
回帖后跳转到最后一页