每月彙整: 2007 年 2 月

整合WPG2 TO WordPress

1.先安裝WPG2 把wp-gallery2.php放到wordpress的根目錄 把wp-content/plugins/wpg2 的wpg2 放到 wordpress的根目錄/wp-content/plugins/ 把wp-includes/js/tinymce/plugins/g2image 的g2image 放到 wordpress的根目錄wp-includes/js/tinymce/plugins/ 然後去wp後台啟動就好了 指定你的gallery2的首頁 然後再去Embedded Page Options 調整gallery2 和wordpress 的版型,才不會”破版”

2.因為我個人覺得wpg2上的gallery2的字太小了 所以我就去改了一下他的font-size 在WPG2 的 FAQ 有提到

#gallery {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 62.5%; <--- Increase / Adjust This..
   color: #333;
   background-color: #fff;

}

基本上這樣就差不多了~~
PS:
剛剛發現我有加gallery2裡面的圖片區塊的功能
原本給的連結是
< ?php @readfile('http://gallery.johnpupu.tw/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none'); ?>
不過這樣會連到gallery.johnpupu.tw去
我想讓他整直在WPG2上看
所以就把他改成
< ?php @readfile('http://blog.johnpupu.tw/wp-gallery2.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=none'); ?>
挺白痴的~~::-p:

Counter-Strike 1.6 Server ON Freebsd(English Version)

1. Install Linux emulator
2. Install hlds (by ports or not )
3. Play your CS !!! good luck ~

OK, first you need to do is to install Linux emulator .
Because the hlds is compiled on linux suse environment.
According to the freebsd manual for installation of Linux emulator
—–—–Linux emulator Installation By freebsd handbook ——–—

Linux binary compatibility is not turned on by default. The easiest way to enable this functionality is to load the linux KLD object (“Kernel LoaDable object”). You can load this module by typing the following as root:

# kldload linux

If you would like Linux compatibility to always be enabled, then you should add the following line to /etc/rc.conf:

linux_enable="YES"

The kldstat(8) command can be used to verify that the KLD is loaded:

% kldstat Id Refs Address    Size     Name 1    2 0xc0100000 16bdb8   kernel 7    1 0xc24db000 d000     linux.ko

 

10.2.1.1 Installing Using the linux_base Port
This is by far the easiest method to use when installing the runtime libraries. It is just like installing any other port from the Ports Collection. Simply do the following:

# cd /usr/ports/emulators/linux_base-fc4 # make install distclean

You should now have working Linux binary compatibility. Some programs may complain about incorrect minor versions of the system libraries. In general, however, this does not seem to be a problem.

 

Note: There may be multiple versions of the emulators/linux_base port available, corresponding to different versions of various Linux distributions. You should install the port most closely resembling the requirements of the Linux applications you would like to install.

————————– end —————————-

OK, When you installed the linux emulator,
you can use two way to install hlds.
one way is ports , the another is hlds_l.tar.gz.
But the hlserver-cs has been marked broken, So you only can use that hlds_l.tar.gz to install hlds.

1.
You need to get the hlds_l.tar.gz and nosteam 的engine(engine.v15.tgz)
2.
decompress the hlds_l.tar.gz and put into directory you wanna put
3.
decompress the nosteam 的engine(engine.v15.tgz) to replace engine_i686.so(choose your cpu type ) in the hlds directory

4.
editor your cstrike/server.cfg for CS
if you want open on Lan , just add this ‘sv_lan 0’ , for internet add this ‘sv_lan 1’
5.
run your CS server
./hlds_run -game cstrike +exec server.cfg +ip(your ip address) +port 27015 +maxplayers 16 +map de_dust -nomaster

PS:
nomaster means you dont wanna your server be added on master server list .
:(h):

pecl-PDO Removed

剛剛portupgrade 完php5.2.1
然後就發現blog 不能動了
感覺是php的問題
看了一下apache 的error log
PHP Warning: Cannot load module ‘PDO’ because required module ‘spl’ is not loaded in Unknown on line 0
PHP Warning: Cannot load module ‘PDO’ because required module ‘spl’ is not loaded in Unknown on line 0
似乎是某個php的extension 有問題
我是猜sqllite 啦
然後pkgdb -F
發現databases/pecl-PDO 已經被removed 了
看了一下freshports,找到這個

Remove pecl-PDO ports, since php5 bundled ones are newer.
Update MOVED accordingly.

所以果真是php extension 的問題
就把php 那個extension重build 就好了。

WordPress Plugins

列一下我目前Wordpress主要用的Plugins
BH Calendar Archive Widget
del.icio.us widget
Feedburner Feed Replacement
Google Analytics
Google Search widget
Identify External Links
Pagebar(今天剛裝好~哈)
Peter’s Custom Anti-Spam
Pierre’s Wordspew
Sidebar Widgets
Site Statistics
Snap Preview AnywhereTM Plugin
Spam Karma 2
Ultimate Tag Warrior(也是今天剛裝好)
WordPress Database Backup
WordPress Mobile Edition

其實這篇也是要測試一下我裝的
Ultimate Tag Warrior
這個plugin 成不成功
哈~~

三寶!!!

東北有三寶,人蔘、貂皮、烏拉草;
好人有三寶,司機、宵夜、修電腦;
周董有三寶,唉呦、不錯、這個屌;
好員工有三寶,早來、加班、不會吵 。

還滿有趣的~~