象外行一样思考,象专家一样实践。
coolbean | 20 五月, 2008 18:21
coolbean | 20 五月, 2008 18:06
在网站设计的时候,应该注意css样式兼容不同浏览器问题,特别是对完全使用DIV CSS设计的网站,就应该更注意IE6 IE7 FF对CSS样式的兼容,不然,你的网站可能出现一些不可预知的效果!
所有浏览器 通用
height: 100px;
IE6 专用
_height: 100px;
IE6 专用
*height: 100px;
IE7 专用
*+height: 100px;
IE7、FF 共用
height: 100px !important;
coolbean | 07 四月, 2008 17:01
Insert the following code to /components/com_content/content.html.php file:
<script src="http://xxx.xxx.xxx/mambots/editors/fckeditor/fckeditor.js" type="text/javascript"></script>
Then it's working on joomla frontend page. Good luck!
coolbean | 07 四月, 2008 16:00
我用是FCKeditot的版本是2.1,不过现在已经有FCKeditor 2.3.2 released版本了,
你可以到他的官方网站上去下载 http://www.FCKeditor.net/。
本文介绍的是关于php的配置方法,其他语言的配置方法是和它一样的。
假设网站的目录为:
www
index.php
inc
FCKeditor
一、调用FCKeditor的两种方法
1、通过创建实例
在这里只写调用它的代码了,网站的其他代码当然由你自己写了,把下面的代码加在需要编辑器的地方:
<?php
include_once("FCKeditor/fckeditor.php"); //引用FCKeditor.php这个文件
$FCKeditor=new FCKeditor('welefen'); //创建FCKeditor对象的实例
$FCKeditor->BasePath='FCKeditor/'; //FCKeditor所在的位置,这里它的位置就是'FCKeditor/';
$FCkeditor->ToolbarSet='Default'; //工具按钮设置
$FCKeditor->Width='100%'; //设置它的宽度
$FCKeditor->Height='300px'; //设置它的高度
$FCkeditor->Create();
?>
2:通过iframe调用创建
在你认为该加的地方加上
<INPUT id=content style="DISPLAY: none" type=hidden name="welefen">
<INPUT id=content___Config style="DISPLAY: none" type=hidden>
<IFRAME
id=content___Frame src="FCKeditor/editor/fckeditor.html?InstanceName=welefen&Toolbar=Default"
frameBorder=0 width=100% scrolling=no height=300>
</IFRAME>
对上述两种方法的说明:
在上述两种方法中,你都看到了字符串'welefen',你可能不知道是什么意思,现在我给你解释一下
如果你要将文本编辑器中的内容在另外一个页面显示或者要将在它保存在数据库,你可以用
$_POST['welefen']或者用$_GET['welefen']来获取文本编辑器中的内容,具体是用post还是用get那要看你用的是什么传递方法了
当然你也可以把welefen改成你想要用的,如'content'.
如果你还不知道什么是ajax,那么这一段话你就不用看了。
当你用ajax的来获得内容的时候是不是发现得不到内容,如:
<script>alert(document.form.content.value)</script>你会发现谈出的窗口没内容
那么我们可以通过下面的代码来获得它的内容:
function getContentValue()
{
var oEditor = FCKeditorAPI.GetInstance('content') ;
var acontent=oEditor.GetXHTML();
return acontent;
}
二:配置一些文件
1:fckconfig.js的配置
(1).工具按钮设置
查找FCKConfig.ToolbarSets["Default"],这里有很多按钮,下面我们将对他们详细介绍
EditSource 显示HTML源代码 StrikeThrough 删除线
Save 保存 Subscript 下标
NewPage 新建空白页面 Superscript 上标
Preview 预览 JustifyLeft 左对齐
Cut 剪切 JustifyCenter 居中对齐
Copy 复制 JustifyRight 右对齐
Paste 粘贴 JustifyFull 两端对齐
PasteText 纯文本粘贴 InsertOrderedList 自动编号
PasteWord 来自Word的粘贴 InsertUnorderedList 项目符号
Print 打印 Outdent 减少缩进
SpellCheck 拼写检查 Indent 增加缩进
Find 查找 ShowTableBorders 显示表格线
Replace 替换 ShowDetails 显示明细
Undo 撤销 Form 添加Form动作
Redo 还原 Checkbox 复选框
SelectAll 全选 Radio 单选按钮
RemoveFormat 去除格式 Input 单行文本框
Link 插入/编辑 链接 Textarea 滚动文本框
RemoveLink 去除连接 Select 下拉菜单
Anchor 锚点 Button 按钮
Image 插入/编辑 图片 ImageButton 图片按钮
Table 插入/编辑 表格 Hidden 隐藏
Rule 插入水平线 Zoom 显示比例
SpecialChar 插入特殊字符 FontStyleAdv 系统字体
UniversalKey 软键盘 FontStyle 字体样式
Smiley 插入表情符号 FontFormat 字体格式
About 关于 Font 字体
Bold 粗体 FontSize 字体大小
Italic 斜体 TextColor 文字颜色
Underline 下划线 BGColor 背景色
这个默认的是包含了所有的工具按钮,不过到我们具体要用的时候,有的按钮并不需要,而且还影响速度。那么我们可以将我们不需要的按钮给删了。下面是我的配置,给大家一个参考,当然你可以根据你的喜好。
FCKconfig.ToolbarSets["Default"] = [
['EditSource','Save','NewPage','Preview','-','Cut','Copy','Paste','PasteText','-','Find','Replace','-','Undo','Redo','-','SelectAll','-','Link','RemoveLink','-','Image','Table','Rule','SpecialChar','Smiley']
,
['Bold','Italic','Underline','-','JustifyLeft','JustifyCenter','JustifyRight','-','InsertOrderedList','InsertUnorderedList','-','Form','Checkbox','Radio','Input','Textarea','Select','Button','-','FontStyleAdv','TextColor']
] ;
如果在前台给用户回复一写帖子的话,还是没必要要上面的,这时你可以在加一个:
FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
] ;
这样的话,你在前台调用的时候就要用$FCKeditor->ToolbarSet='Basic',不能再为"Default"了。
(2):语言的配置
查找FCKConfig.DefaultLanguage将它设置为'zh-cn'.
(3):脚本语言的设置
查找var _FileBrowserLanguage和var _QuickUploadLanguage将他们设置为'php', 默认是'asp',如果这里不设置的话,图片将不能上传,这点很重要。当时我在用FCKeditor由于没配置这个,不能上传图片,而我同寝室的用asp 能上传图片,让我烦恼了好多天,最后终于找到是这个原因。
2:图片上传的配置
打开文件FCKeditor/editor/filemanager/browser/default/connectors/php/config.php
查找$Config['Enabled'],将它设置为'true'
查找$Config['UserFilesPath'],将它设置图片的目录,这个目录是相对于主目录的。
例如:我写了一个blog,就可以设置为/blog/upload/
打开文件FCKeditor/editor/filemanager/upload/php/config.php
查找$Config['Enabled'],将它设置为'true'
查找$Config['UseFileType'],将它设置上传文件的目录,最好与上面的图片目录相同。
好了,现在所有的配置都已经完成了,现在你要做的只是删除一些不必要的文件了。
只要包含'_'的目录名和文件名都可以删除,当然你用的是php,其他语言的一些目录也都可以删除,这样就减小了文件的大小。
coolbean | 21 三月, 2008 22:56
1.Mambo页面布局说明
这里我们使用mambo自带的模板来举例说明,参考上图。
作为架设网站的工具mambo页面基本分为以下几个区域:
<1> 顶部:<pathway>, <user3> and <user4> 模块
<2> 左侧栏:<left>模块
<3> 中间: <banner>,<user1>, <user2> 和 <mainbody>模块
<4> 右侧栏:<right>模块
<5> 底部:<footer>模块
这些只是默认的mambo模块布局,所有模块的位置都可以通过修改模板文件index.php来定义和调整到任意位置。载入模块的php语句是:
mosLoadModules($position_name [, $style] )例如: mosLoadModules( “left”, -1 )
在Mambo4.5.2以前的版本中,对于$style的定义有0(默认),-1,1,-2, Mambo4.5.2.1版本新增了”-3”的定义。(见图1 (c))使用他们会有什么不同的效果呢。我们一起来看看吧!
I. $style=0 (默认)时,模块纵向单独显示,实例如下:
<!-- Individual module -->
<table cellpadding="0" cellspacing="0" class="moduletable[suffix]">
<tr>
<th valign="top">Module Title</th>
</tr>
<tr>
<td>
Module output
</td>
</tr>
</table>
<!-- Individual module end -->
II. $style=1时,模块横向显示。每个模块显示在一个表格栏cell内。实例如下:
<!-- Module wrapper -->
<table cellspacing="1" cellpadding="0" border="0" width="100%">
<tr>
<td align="top">
<!-- Individual module -->
<table cellpadding="0" cellspacing="0" class="moduletable[suffix]">
<tr>
<th valign="top">Module Title</th>
</tr>
<tr>
<td>
Module output
</td>
</tr>
</table>
<!-- Individual module end -->
</td>
<td align="top">
<!-- ...the next module... -->
</td>
</tr>
</table>
III. $style=-1时,模块外部没有任何边框修饰而且也没有模块标题(名称)。效果如下(本来面目):
模块1 模块2 模块3
IV. $style=-2时,模块显示格式如下:
<!-- Individual module -->
<div class="moduletable[suffix]">
<h3>Module Title</h3>
Module output
</div>
<!-- Individual module end -->
V. $style=-3时,模块全部用div来修饰,有利于给网页减肥,另外还可以实现圆角边框。
<!-- Individual module -->
<div class="module[suffix]">
<div>
<div>
<div>
<h3>Module Title</h3>
Module output
</div>
</div>
</div>
</div>
<!-- Individual module end --> (查看全文)
coolbean | 18 三月, 2008 17:03
Limited Syndication in Joomla
The basic Joomla RSS feed possibility is Limited to the Frontpage items.
It is standard set to on, and You can Find the Configuration one Components - Syndicate.
Most people overlook this or are looking at the Feeds section.
In short RSS Stands for Real Simple Syndication , although there are other abbreviations.
The better Joomla RSS Feed Manager
As said, the basic Joomla Syndication is limited to the Frontpage, or One other Category.
To overcome this problem I suggest You install Run-Digital RSS Feed Manager
This lets You choose from a number of categories to put into the feed, Like Blogging, News, Newsflashes and Your basic best Categorie That Your users are most likely to subscribe to.
Configuration of the Joomla Syndication Component.
Once You installed the component and chosen the Categories to Syndicate, there are a few other things to Change.
Setting For the standard Joomla RSS feed is done through the Main Control Panel, Choose Components and from there "Sycndicaton".
These settings also apply to the standard Joomla Syndication Component.
coolbean | 12 三月, 2008 14:33
No.1 自然非伟大的 RMS 莫属了。Richard Stallman,GNU 的创始人,GCC 和Emacs 的作者。GPL 的发明人。
No.2 Linux Fan 的教父,Linus Torvalds,Linux 的创始人和领导者。
No.3 Apache 的作者 Brian Behlendorf。
No.4 Perl 的发明人 Larry Wall。
No.5 Miguel de Icaza,GNOME 和 Ximian 的创始人。

No.6 Michael Tiemann,G++(GNU C++ 编译器)的作者,Cygnus 公司创始人,RedHat CTO。

No.7 Python 的发明人 Guido van Rossum。

No.8 Samba 的作者 Andrew Tridgell。
No.9 谈到 OpenSource 就不能不提到 ESR,Eric S. Raymond,
《The Art of UNIX Programming》、《大教堂与市集》的作者,老牌 Unix 黑客,黑客道行话的收集者,OSI 的创始人,OpenSource 的鼓手。
No.10 Marc Fleury,JBoss Group 的 CEO,JBoss 项目的领头人。JBoss 商标的所有人。
coolbean | 24 元月, 2008 02:16
PHP截取UTF-8编码的中英文字符串就会出现乱码,这确定是很麻烦的事,校验页面是否符合xhtml 1.0格式的时候也会报错。
字符串里如有包含英文的单字节,用substr($strChar,$len)处理会出错?的乱码,终于用正则表达式的函数得以解决(发在自己的blog和大家分享)。
function utf8_substr($str,$from,$len){
return
preg_replace(’#^(?:[x00-x7F]|[xC0-xFF][x80-xBF]+){0,’.$from.’}’.
‘((?:[x00-x7F]|[xC0-xFF][x80-xBF]+){0,’.$len.’}).*#s’, ‘$1′,$str);
}
coolbean | 26 十二月, 2007 16:50
coolbean | 13 十二月, 2007 18:34
coolbean | 11 十二月, 2007 15:57
coolbean | 11 十二月, 2007 15:33
你正在学习CSS布局吗?是不是还不能完全掌握纯CSS布局?通常有两种情况阻碍你的学习:
第一种可能是你还没有理解CSS处理页面的原理。在你考虑你的页面整体表现效果前,你应当先考虑内容的语义和结构,然后再针对语义、结构添加CSS。这篇文章将告诉你应该怎样把HTML结构化。
另一种原因是你对那些非常熟悉的表现层属性(例如:cellpadding,、hspace、align="left"等等)束手无策,不知道该转换成对应的什么CSS语句。当你解决了第一种问题,知道了如何结构化你的HTML,我再给出一个列表,详细列出原来的表现属性用什么CSS来代替。
coolbean | 11 十二月, 2007 15:04
coolbean | 21 十一月, 2007 22:16
coolbean | 08 十一月, 2007 17:46
| « | 十二月 2011 | » | ||||
|---|---|---|---|---|---|---|
| 一 | 二 | 三 | 四 | 五 | 六 | 日 |
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |