phpbb3的mod
分页: 1, 2  下一页    :| |:
移民生活北美论坛 -> IT人生

#1: 作者: davidyin时间: 2008-11-23 23:34

请教一下有关phpbb论坛的问题。
我想在phpbb3上也有类似本论坛的精华帖子,鲜花,砖头之类的功能,但没有找到。

不知是否有熟悉的朋友能介绍一下啊

#2: 作者: 网站管理员时间: 2008-11-23 23:38

献花,砖头这些功能是这个论坛独有的,别的地方找不到的

#3: 作者: davidyin时间: 2008-11-23 23:48

网站管理员 写道:
献花,砖头这些功能是这个论坛独有的,别的地方找不到的

您的意思是这里自己开发的。

那么能介绍一下这个北美盾系统吗?还有刚才我提到的有关精华帖子的设定?

#4: 作者: 网站管理员时间: 2008-11-23 23:53

北美盾系统是基于point mod修改出来的。

精华帖子是自己写的

#5: 作者: 网站管理员时间: 2008-11-23 23:55

你可以在网上找到的,在这个论坛里实现了的有:

quick reply mod
point mod
bank mod
lottery mod
virtual casino mod

但我可以坦白地告诉你下面四个mod都有很多bug

#6: 作者: davidyin时间: 2008-11-23 23:59

谢谢了,至少让我有了方向。

#7: 作者: 7thGuest时间: 2008-11-24 00:07

老大,借光问个问题

从xmlhttprequest里能否发出gb encoding的content?

by default, it's utf8, 所以发中文老是有问题

或者是不是应该在javascript里把utf8转成gb先?

big_happy.gif

#8: 作者: 白茫茫时间: 2008-11-24 23:55

陆压 写道:
老大,借光问个问题
从xmlhttprequest里能否发出gb encoding的content?
by default, it's utf8, 所以发中文老是有问题
或者是不是应该在javascript里把utf8转成gb先?
big_happy.gif


of cause it's dorable. If you are using some framework like jquery, prorotype etc, you don't need to worry it too much.

otherwise, you'd better to convert it at server side.

Some very old code i made around 8 years ago to the convert in php.

代码:

function uniDecode($str,$charcode){
    $text = preg_replace_callback("/%u[0-9A-Za-z]{4}/",'toUtf8',$str);
    return mb_convert_encoding($text, $charcode, 'utf-8');
}
function toUtf8($ar){
    foreach($ar as $val){
        $val = intval(substr($val,2),16);
        $c='';
        if($val < 0x7F){ // 0000-007F
            $c .= chr($val);
        }elseif($val < 0x800) { // 0080-0800
            $c .= chr(0xC0 | ($val / 64));
            $c .= chr(0x80 | ($val % 64));
        }else{ // 0800-FFFF
            $c .= chr(0xE0 | (($val / 64) / 64));
            $c .= chr(0x80 | (($val / 64) % 64));
            $c .= chr(0x80 | ($val % 64));
        }
    }
    return $c;
}

#9: 作者: 网站管理员时间: 2008-11-25 00:08

陆压 写道:
老大,借光问个问题
从xmlhttprequest里能否发出gb encoding的content?
by default, it's utf8, 所以发中文老是有问题
或者是不是应该在javascript里把utf8转成gb先?
big_happy.gif


一定要做转换,不过我也没试过。

#10: 作者: 7thGuest时间: 2008-11-29 10:25

白茫茫 写道:


代码:

function uniDecode($str,$charcode){
    $text = preg_replace_callback("/%u[0-9A-Za-z]{4}/",'toUtf8',$str);
    return mb_convert_encoding($text, $charcode, 'utf-8');
}
function toUtf8($ar){
    foreach($ar as $val){
        $val = intval(substr($val,2),16);
        $c='';
        if($val < 0x7F){ // 0000-007F
            $c .= chr($val);
        }elseif($val < 0x800) { // 0080-0800
            $c .= chr(0xC0 | ($val / 64));
            $c .= chr(0x80 | ($val % 64));
        }else{ // 0800-FFFF
            $c .= chr(0xE0 | (($val / 64) / 64));
            $c .= chr(0x80 | (($val / 64) % 64));
            $c .= chr(0x80 | ($val % 64));
        }
    }
    return $c;
}


this looks like a utf8 to utf16 conversion. not converting to gb2313 which westca is using




移民生活北美论坛 -> IT人生


output generated using printer-friendly topic mod, 所有的时间均为 美国太平洋时间

分页: 1, 2  下一页    :| |:
1页,共2

Powered by phpBB 2.0.8
Content received from: 加西网 (温哥华门户), http://www.vancouverren.com