2010年4月19日星期一

Integrate FCKeditor/CKeditor with IMCE module.

Purpose:
Carry out the images management function

Modules:
1, FCKeditor/CKeditor
2, IMCE

Step 1: Active the two modules
Go to Administer->Site building->Modules
Active the two modules


Step 2: Configure the FCKeditor/CKeditor
Go to Administer->Site configuration->FCKeditor/CKeditor


Click the edit button in the Default row

Click the file browser settings and change the change the file browser type to IMCE


And change the path of upload file so that each user can have their own folder

2010年3月25日星期四

[Record] Profiles list (SizzleLab)

Module: /modules/profile

Modified file:
1, profile-listing.tpl.php
2, profile.pages.inc

Configure: Administer->User management ->Profile
Step 1: Add fields
CategoryThe categroy will be show in user edit page as a tab.
Title
$field->title
Form name$profile's key word
VisibilityIt should be selection 4: " Public field, content shown on profile page and on member list pages."

This two fields are required
Title
Form name
Group
profile_group
Role in project
profile_role_description

Step 2: Change the display
in profile-listing.tpl.php
Title: $field->title
Value: $field->value

Step 3: Group the list
in profile.pages.inc

The code:
============================================
$profiles = array();
$content = '';
while ($account = db_fetch_object($result)) {
$account = user_load(array('uid' => $account->uid));
$profile = _profile_update_user_fields($fields, $account);
foreach($profile as $p)
{
if($p->name =='profile_group')
{
$group = $p->value;
break;
}
}
if(!isset($group)||$group =='')
{
$group = 'Unknow';
}
if(!array_key_exists($group,$profiles))
{
$profiles[$group] = array();
}
$pro = array();
$pro['account'] = $account;
$pro['profile'] = $profile;
$profiles[$group][] = $pro;
//$content .= theme('profile_listing', $pro['account'], $pro['profile']);
//$content .= theme('profile_listing', $account, $profile);
}

$keys = array_keys($profiles);
foreach($keys as $k){
$content .= $k;
foreach($profiles[$k] as $pro)
{

$content .= theme('profile_listing', $pro['account'], _profile_update_user_fields($fields, $pro['account']));
}
}
================================================

See the codes files : http://code.google.com/p/eberea/source/browse/#svn/trunk/sizzle/profile

2010年1月28日星期四

【转】Javascript事件列表

Javascript事件列表
事件 浏览器支持 解说
一般事件 onclick IE3、N2 鼠标点击时触发此事件
ondblclick IE4、N4 鼠标双击时触发此事件
onmousedown IE4、N4 按下鼠标时触发此事件
onmouseup IE4、N4 鼠标按下后松开鼠标时触发此事件
onmouseover IE3、N2 当鼠标移动到某对象范围的上方时触发此事件
onmousemove IE4、N4 鼠标移动时触发此事件
onmouseout IE4、N3 当鼠标离开某对象范围时触发此事件
onkeypress IE4、N4 当键盘上的某个键被按下并且释放时触发此事件.
onkeydown IE4、N4 当键盘上某个按键被按下时触发此事件
onkeyup IE4、N4 当键盘上某个按键被按放开时触发此事件
页面相关事件 onabort IE4、N3 图片在下载时被用户中断
onbeforeunload IE4、N 当前页面的内容将要被改变时触发此事件
onerror IE4、N3 出现错误时触发此事件
onload IE3、N2 页面内容完成时触发此事件
onmove IE、N4 浏览器的窗口被移动时触发此事件
onresize IE4、N4 当浏览器的窗口大小被改变时触发此事件
onscroll IE4、N 浏览器的滚动条位置发生变化时触发此事件
onstop IE5、N 浏览器的停止按钮被按下时触发此事件或者正在下载的文件被中断
onunload IE3、N2 当前页面将被改变时触发此事件
表单相关事件 onblur IE3、N2 当前元素失去焦点时触发此事件
onchange IE3、N2 当前元素失去焦点并且元素的内容发生改变而触发此事件
onfocus IE3 、N2 当某个元素获得焦点时触发此事件
onreset IE4 、N3 当表单中RESET的属性被激发时触发此事件
onsubmit IE3 、N2 一个表单被递交时触发此事件
滚动字幕事件 onbounce IE4、N 在Marquee内的内容移动至Marquee显示范围之外时触发此事件
onfinish IE4、N 当Marquee元素完成需要显示的内容后触发此事件
onstart IE4、 N 当Marquee元素开始显示内容时触发此事件
编辑事件 onbeforecopy IE5、N 当页面当前的被选择内容将要复制到浏览者系统的剪贴板前触发此事件
onbeforecut IE5、 N 当页面中的一部分或者全部的内容将被移离当前页面[剪贴]并移动到浏览者的系统剪贴板时触发此事件
onbeforeeditfocus IE5、N 当前元素将要进入编辑状态
onbeforepaste IE5、 N 内容将要从浏览者的系统剪贴板传送[粘贴]到页面中时触发此事件
onbeforeupdate IE5、 N 当浏览者粘贴系统剪贴板中的内容时通知目标对象
oncontextmenu IE5、N 当浏览者按下鼠标右键出现菜单时或者通过键盘的按键触发页面菜单时触发的事件
oncopy IE5、N 当页面当前的被选择内容被复制后触发此事件
oncut IE5、N 当页面当前的被选择内容被剪切时触发此事件
ondrag IE5、N 当某个对象被拖动时触发此事件 [活动事件]
ondragdrop IE、N4 一个外部对象被鼠标拖进当前窗口或者帧
ondragend IE5、N 当鼠标拖动结束时触发此事件,即鼠标的按钮被释放了
ondragenter IE5、N 当对象被鼠标拖动的对象进入其容器范围内时触发此事件
ondragleave IE5、N 当对象被鼠标拖动的对象离开其容器范围内时触发此事件
ondragover IE5、N 当某被拖动的对象在另一对象容器范围内拖动时触发此事件
ondragstart IE4、N 当某对象将被拖动时触发此事件
ondrop IE5、N 在一个拖动过程中,释放鼠标键时触发此事件
onlosecapture IE5、N 当元素失去鼠标移动所形成的选择焦点时触发此事件
onpaste IE5、N 当内容被粘贴时触发此事件
onselect IE4、N 当文本内容被选择时的事件
onselectstart IE4、N 当文本内容选择将开始发生时触发的事件
数据绑定 onafterupdate IE4、N 当数据完成由数据源到对象的传送时触发此事件
oncellchange IE5、N 当数据来源发生变化时
ondataavailable IE4、N 当数据接收完成时触发事件
ondatasetchanged IE4、N 数据在数据源发生变化时触发的事件
ondatasetcomplete IE4、N 当来子数据源的全部有效数据读取完毕时触发此事件
onerrorupdate IE4、N 当使用onBeforeUpdate事件触发取消了数据传送时,代替onAfterUpdate事件
onrowenter IE5、N 当前数据源的数据发生变化并且有新的有效数据时触发的事件
onrowexit IE5、N 当前数据源的数据将要发生变化时触发的事件
onrowsdelete IE5、N 当前数据记录将被删除时触发此事件
onrowsinserted IE5、N 当前数据源将要插入新数据记录时触发此事件
外部事件 onafterprint IE5、N 当文档被打印后触发此事件
onbeforeprint IE5、N 当文档即将打印时触发此事件
onfilterchange IE4、N 当某个对象的滤镜效果发生变化时触发的事件
onhelp IE4、N 当浏览者按下F1或者浏览器的帮助选择时触发此事件
onpropertychange IE5、N 当对象的属性之一发生变化时触发此事件
onreadystatechange IE4、N 当对象的初始化属性值发生变化时触发此事件

2010年1月17日星期日

(For XP)An Error when first install Eclipse(Eclipse安装/无法打开Eclipse)

When you first unzip the Eclipse package and clicked Eclipse.exe, the following error may happen:

Resolvent:
Method One: Open file eclipse.ini, replace -Xmx512m by -Xmx256m.
Method Two: If method one doesn't work, remove or rename eclipse.ini

2010年1月15日星期五

Different types of groups with different nodes(tabs)

A orgainc group may have serveral nodes as following:

The View, Oveview, News are group eBEREA Management board's nodes.

These nodes are managed by Views, you can check them in admin/site building/views

Use lectures view as an Example:
All nodes here is a menu item likes 'node/%/news' in fact, and the type is MENU_LOCAL_TASK

Click Edit link, we can see the following panel:
The Arguments is set to select which kinds of node this Lectue tab could be seen.
If we want Lecture tab to be seen only in content type Course, a organic group content type, we set the arguments like following:
1, add new arguments, select Groups: Organic groups, Organic groups: Groups, click Add


2,the validator options, Validator: Node, Types: Course, click Update3, Don't forget to click Save Button

2010年1月13日星期三

How to use the printer in SoberIT(SoberIT打印机的使用方法)

The following steps are operated in Windows XP:

The nearest printer's name is merri.soberit.hut.fi, its model is HP Color LaserJet 4700 PCL 6. You need to download the driver and install it. Download me.

Install:
1, click the download file HP_CLJ_4700_PCL6_32Bit.exe , select a path and unzip the package.

2, Visit control panel(控制面板) -> Printer and other hardware(打印机和其他硬件) -> Printer and fax(打印机和传真机)

3, Right click -> Server properties -> Driver(驱动程序) -> Add new driver4, Next -> Install from disk -> select the HP unzip path

5, Server properties -> Port (端口)-> add new port ->Standar TCP/IP port
6, write merri.soberit.hut.fi in printer name or IP address as following: 7, click next until finish this action
8, Click add new printer on leftside bar -> select connect to local printer

9,select the port you have just add.
10, click until finish add ation.
11, open a document, and now you can try to print it out.