今天一起来就有让自己的blog支持的大话表情的想法,于是就动手做起来:
首先修改 inc_function.php 文件,添加如下两个函数:
修改 index.php,找到这行:
1, $body, $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2
改为:
1, set_face($body), $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2
主页显示
修改 artical_edit.php 找到这行:
set_moreless(nl2brc(set_keyword(attach_image(1, $body, $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2), $is_sync)), $no)
改为:
set_moreless(nl2brc(set_keyword(attach_image(1, set_face($body), $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2), $is_sync)), $no)
编辑文章预览显示
在网站根目录下建立face文件夹,在下面放置大话的表情图像,命名规则为 1.gif 2.gif ... 分别对应 # 01 # 02 (#号和数字间没有空格,我只是为了过滤表情#25)。
还有回复表情暂时不做,反正也没有人回复#14
(注:# 39 因为和系统的字符有冲突,改为# 69)
!!!!!!! // 121.55.9.51