Posted by: adamwang, in Joomla
Joomla 1.5.x中使用UTF-8编码,在对某些关键字(如:卡尔加里)进行所有字搜索时会产生如下错误:
Warning: preg_replace() function.preg-replace: Compilation failed: invalid UTF-8 string at offset 9 in
root\components\com_search\views\search\view.html.php on line 146
这是由于在低版本PHP中preg_split函数对UTF-8编码支持的缺陷所导致的,据此情况,用explode函数代替preg_split函数可解决这一问题,在进行中文测试、英文测试和中英文混合测试,目前证明是有效的。
root\components\com_search\views\search\view.html.php line129
$searchwords = preg_split(”/\s+/”, $searchword);
改为:
$searchwords = explode(” “, $searchword);
No Comments »
Posted by: adamwang, in 随笔
来到加拿大已经六年多了,生活算是稳定了下来。车子、房子都有了,期待许久的女儿终于健康降生了,家里增添了更多的欢声笑语和忙忙碌碌。当一切都日复一日地运行在轨道之中,思绪就总会忙里偷闲地跑回到旧日的时光。近日来,一种沉重似乎在慢慢的沉积,难以挥去。
初来加拿大的头两年的记忆似乎都是轻松和快乐。虽然没有一份专业工作,还在快餐店和工厂打工,可是身上也没有这许多贷款的负担。记得有一个周六,在加班忙碌了近七十个小时之后,还是在下午赶去球场与朋友们一起踢球。那时是结交朋友、举杯换盏、纵情欢乐的日子,虽然我们清贫,但我们快乐。
过了两年,朋友们都找到了专业工作,生活条件好了,有心情玩一点高雅的活动,组织了参加华人联赛足球队、IT小组、摄影俱乐部,文学爱好者们还办了份《新生活周刊》,各种文艺演出精彩纷呈,精神生活丰富了起来。
又过了两年,阿尔伯塔的经济火热。许多朋友都在不停的加班,钱多了,房子换大了,忙着再多生两个孩子。我从事IT,也喝点稀的般受益其中,也就自然顺了这个潮流。朋友聚会少了,踢球的人也总会凑不齐了,《新生活周刊》也停刊了。
当从忙碌中抬起头的时候,我突然有了一种找不到自已身在何处的感觉。恍惚间,有一种似曾相识的感觉,是在大学吗?纵情狂欢、兴趣小组、重色轻友,这是又一循环吗?周围是什么?我参与其中了吗?这里是加拿大还是中国有区别吗?突然间,发现自已失去了家的感觉,找不到了归属。
日前,和同事老谢谈起这种感受,颇有同感,并讲给我他家里发生的一件事。他家里买了一个鱼缸,里面有一些石头和几条鱼,过了些日子,这些鱼可能由于不适应这个新环境而相继死掉了,只剩下一条大鱼和不知从哪来的一条小鱼。大鱼整天躲藏在石头的缝隙中,而小鱼则自由地到处游着。
也许我们就象大鱼一样,躲在一个自已熟悉的圈子里,以一种熟悉的方式日复一日的生活着。而我们的孩子将会是那条小鱼,把这里当成他们的家,他们会有更为广阔的天地,更多彩的生活。
初为人父,自知担子很重,在女儿最初的十几年岁月里,还要承担着领航的任务。自已尽量游得远一些,女儿就会看到更广阔的天地,因为她身上有在家的自信。
No Comments »
Posted by: adamwang, in Joomla
1. Migrate users
Related tables: mos_core_acl_aro, mos_core_acl_groups_aro_map, mos_users
mos_core_acl_aro field aro_id should be rename as id.
These tables should be truncated before import to the joomla database.
2. Migrate Zoom
This part can be transfer smoothly, the directory structure is same. Just copy the image file with directory to new site.
3. Migrate Categories, Sections, contents
These tables can be migrated smoothly.
No Comments »
Posted by: adamwang, in Joomla
First, enable Gmail Authentication Plugin in Joomla administrator interface. Log in with you Gmail mailbox full address and password, you will be automatically registered with Joomla.
If you want to authorize this user permission to publish, just do it as a normal user. After the user get the permission, user is able to publish new article for Windows Live Writer.
No Comments »
Posted by: adamwang, in IT
I have successfully post article with category information to Joomla 1.5.5 site. The instruction is from following URL:
http://carolinaregion.com/2008/07/23/how-to-post-to-joomla-153-using-windows-live-writer/
The main plug-ins are:
MetaWebblogAPI and RSD
Adding Read More bar
Normally Joomla article has two part, brief and detail, they are seperated by a html horizon line tag <hr>. In Windows Live Writer, you may change the article to HTML format by clicking "View"->"HTML Code", insert <hr> to the proper position, then when you publish the article to joomla front page, a "Read more" bar will be added.
Another plugin is MovableType XML-RPC Plugin. It is natively for J1.5. If you are using Jfusion, you need to replace replace movabletype.php file with another one in http://www.joomler.net/component/option,com_fireboard/Itemid,17/func,view/id,127/catid,31/
When you configure your live writer, the second url should be http://yousite/xmlrpc/index.php
Then everything will be easy.
No Comments »
Posted by: adamwang, in IT
The helpful post regarding this issue is at: http://www.fedoraforum.org/forum/showthread.php?t=194172&page=1&pp=15
The solution is quoted as following:
With that card then you should only need to download the firmware, cut it and configure the card with NetworkManager.
Download this file and put it into a directory somewhere:
http://mirror2.openwrt.org/sources/…50.10.5.tar.bz2
Acquire full root rights over your machine with this command in a terminal window:
Code:
su -
That’s a space and a minus sign after the su. It gives you full root rights over your machine rather than just root rights over your ordinary users environment without it.
Use the cd command to navigate into the directory where you downloaded the above file. Issue the command:
Code:
tar xjf broadcom-wl-4.150.10.5.tar.bz2
That unpacks the file archive you downloaded and will create you a new directory where you are working called ‘broadcom-wl-4.150.10.5′.
cd into that and then the ‘driver’ directory within that and use the command:
Code:
b43-fwcutter -w /lib/firmware wl_apsta_mimo.o
That cuts the required firmware for your card from the downloaded file and places it in the correct place for the b43 driver to find it.
After above work is done. Go to network manager icon which is just before the clock. Set up the wireless connection to your local wireless network.
No Comments »
Posted by: adamwang, in Duo Duo
Duo duo is my first daughter, she was born at 11:53 AM August 9, 2008. She is very cute and chubby.
She is sleeping
No Comments »
Posted by: adamwang, in Duo Duo
2008年8月11日,是个阳光明媚的日子,多多顺利通过医院的各项健康检查,终于可以回家了。出院前,护士阿姨又给量了一次体重是4700克。今天多多第一次坐进carseat,也是第一次坐汽车,希望多多能够喜欢。
No Comments »
Posted by: adamwang, in IT
No Comments »
Posted by: adamwang, in IT
This is a working solution with somw drawbacks.
1. Download Advanced Textual Confirmation.
2. Unpack the files “bbantispam.php” and “bbas_config.php”.
3. Upload the files on the server, into the WordPress installation directory.
4. Open the file “wp-config.php” (located in the WordPress installation directory) in a text editor.
5. After the first string, “<?php”, add the string
| Code: |
if (FALSE === strpos($_SERVER['SCRIPT_NAME'], ‘wp-admin’)) {
require_once(dirname(__FILE__) . ‘/bbantispam.php’);
} |
6. Save the changes.
Unfortunately, due to ATC protection, you’ll never get trackbacks anymore. But for many blogs it’s not a big loss.
Or maybe the better resolution is here: http://wordpress.org/extend/plugins/sabre/
No Comments »