九王爷

九王爷的府邸


  • 首页

  • 分类

  • 归档

  • 标签

将阅读权限限制修改为威望(积分)限制

发表于 2009-01-23 | 分类于 SoftWare
将阅读权限限制修改为威望(积分)限制

1、修改数据库(可以不修改)

登录数据库,表 x__threads (x表示表前缀)中 readperm 字段 结构修改

A.将 类型  tinyint  修改为 smallint
B.将 长度 3 修改为6
C.属性  UNSIGNED (不修改)
D.NULL 选择 not null (不修改)
E. 默认值选择 0 (不修改)

2\. 打开 include/common.inc.php

到第 157 行
if($thread['readperm'] && $thread['readperm'] > $readaccess && !$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {
    showmessage('thread_nopermission', NULL, 'NOPERM');
}
修改为
if($thread['readperm'] && $thread['readperm'] > $extcredits1  && !$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {
    showmessage('thread_nopermission', NULL, 'NOPERM');
}
//其中$extcredits1 可以更改为$extcredits 积分; 如extcredits1 积分1(威望); extcredits2 积分2(金钱); extcredits3; extcredits4;extcredits5 ;extcredits6 ;extcredits7; extcredits8,可以自行选择一个,或者自行设置加减。
3\. 修改模板文件,将 “阅读权限”替换为 “威望”或“积分”

3.1 找到 templates\default\templates.lang.php (一共有3行,修改前两行)

第 416 行
'readperm' => '阅读权限',
修改为
'readperm' => '威望',

417行
'readperm_thread' => '所需阅读权限',
修改为
'readperm_thread' => '所需威望',

3.2 找到templates\default\messages.lang.php (一共有2行,全部替换)

第 47 行
'thread_nopermission' => '对不起,本帖要求阅读权限高于 $thread[readperm] 才可浏览,请返回。',
修改为
'thread_nopermission' => '对不起,本帖要求威望高于 $thread[readperm] 才可浏览,请返回。',

第90行
'attachment_nopermission' => '对不起,本附件要求阅读权限高于 $attach[readperm] 才可下载,请返回。',
修改为
'attachment_nopermission' => '对不起,本附件要求威望高于 $attach[readperm] 才可下载,请返回。',

3.3找到templates\default\messages.lang.php
第51行
'attach_readperm' => '阅读权限',
修改为
'attach_readperm' => '威望',

3.3找到\forumdata\cache\目录下 (可替换,也可不替换)
cache_viewpro.php 和 cache_viewthread.php

将 阅读权限 替换为 威望

轻松搞定pidgin里少量MSN消息为方块的BUG

发表于 2009-01-21 | 分类于 SoftWare

一直以来发现有少数MSN好友发过来的消息显示为方块,而且方块中有4个小点.有人说象麻将的4筒.这种消息复制到其他地方是能正常显示的.所以应该是字体问题,对方法过来的字体在GTK里没有对应的字体.因此只要在GTK里面吧字体设置正确就能够正常显示了.但是这里有个不大不小的问题.就是你不能确定对方发过来的是什么字体.或者说你知道一个或几个的字体.难道每一个你都要去设置一次字体?太麻烦了.其实pidgin已经给了我们一个非常简单的解决方法:在pidgin里的首选项–对话里面将受到的消息显示格式的勾给去掉就ok了.

人类和人的发展变化史

发表于 2009-01-17 | 分类于 Other

今天在网上看到的一个视频,演示了人从精宝宝到人的过程,以及人类的发展演变史,非常的不错.好像是俄罗斯还是哪个国家制作的.反正后面显示了几种文字我都不认识.不过音乐确实跟它说明的一样,很激昂.推荐,值得一看

spotify 将从中国绝迹

发表于 2009-01-16 | 分类于 SoftWare

前些天给大家介绍了spotify这款非常棒的BT音乐软件.我也在这些天里好好的过了一把瘾.体会了在线即点即听正版歌曲的乐趣.不过再过几天就不能听了.因为现在spotify开始清理非英国账户了.
只要你在英国以外的地区使用就会弹出提示:
main_with_warn
14day_warn
说你使用spotify的地方跟你在注册时的个人资料里的地址不同.默认为旅游模式,但旅游模式也只能使用14天.14天后就不能使用了.
只能等待spotify官方开放中国地区的使用权限.真是太可惜了.
不知道有没有同类的替代软件?如果找到我会再跟大家分享

DISCUZ 6.0 发新贴后标题前自动加入当天日期

发表于 2009-01-15 | 分类于 Other
发新贴后标题前自动加入当天日期
1、找到include/newthread.inc.php
2、查找

if($post_invalid = checkpost()) {
        showmessage($post_invalid);
}
3、替换为

$date_fid = "2,4,6,8"; //需要加日期的版块,用逗号分隔
$date_fid = ",".$date_fid.",";
if(strstr($date_fid, ",".$fid.",")){
    $date = gmdate("y/m/d", $timestamp + $timeoffset * 3600);
  $subject = "[".$date."] ".$subject;}

===如果需要所有版块都自动加日期,则替换为===

$date = gmdate("y/m/d", $timestamp + $timeoffset * 3600);
        $subject = "[".$date."] ".$subject;
4、更新缓存

PIDGIN更新,解决MSN登录问题

发表于 2009-01-14 | 分类于 Other

这两天用PIDGIN都不能登录MSN,还以为我的RP有问题,恰好家里的电脑又给
坏掉了(好可怜啊).今天上班还是不能登陆,实在忍受不了了,上pidgin的官
方看了一下,果然发布新版了,主要就是解决MSN不能登陆的问题,据说原因
是微软不在对第三方的 IM 软件进行支持,所有 P15 协议的 IM 都受到了
牵连:

著名苹果版IM通用软件Adium官方Blog刚刚宣布,微软MSN服务器从1月11日起
停止了对第三方IM软件的登录请求支持,包括Adium、Pidgin在内的多款流行
非Windows平台IM软件受到牵连。 据称,此次受到微软“屏蔽”的第三方IM软件
均为支持P15 MSN传输协议的版本。

EXCEL和OOO技巧--简单快速删除表格中的公式

发表于 2009-01-14 | 分类于 Other

今天报表格的时候又遇到了老问题,如何才能删除所有表格中的公式(公式
一起上交上去的麻烦太大,经常性的跑来问为什么要用这个公式,遇到过更郁闷
的—上司在看表时不小心改了个数字,造成全部数据都出错,回过头来找我麻烦).
如果表格比较少的时候很简单,复制然后选择性粘贴就可以了.以前有在网上找到过
一个VBS,可以直接删除表格中的数据.
但这里还有个更简单的方法,且不用下载任何宏哦—-还是复制粘贴,注意,这里的
复制粘贴不是前面说的一个一个的复制粘贴,而是将整个工作薄都复制粘贴,哪怕
你里面有几百个工作薄.
操作步骤:1. 打开excel 2. 点选横竖交叉处 3. 按住SHIFT键 4. 选择最后一个工
作表名称 5. 点击复制按钮(当然你用鼠标右键选择复制或者用Ctrl+c也是可以
的) 6.选择性粘贴–这里只粘贴数值和格式.
OK,看看你的成果吧,是不是全部的公式都没了?

XP下简单编译pidgin的fetion插件(2009-11-16版)

发表于 2009-01-08 | 分类于 Other

1月5日,移动升级了,结果pidgin里的fetion插件不能用了,赶紧到gradetwo 老大的专贴看看,果然是更新了,gradetwo 老大速度一流

因为没有编译好的包,只好自己抓了源代码下来自己编译,按照pidgin官方在windows编译指南里面的吧一些依赖包安装好,开始编译……但好像有问题:

我在mingw下 gcc.exe (GCC) 3.4.5 (mingw-vista special r3) 编译通不过,不知道什么原因

gcc.exe -shared fetion.o sipmsg.o -L../../../../win32-dev/gtk_2_0/lib -L../../../libpurple -lglib-2.0 -lws2_32 -lintl -lpurple -Wl,–enable-auto-image-base -o libfetion.dll

fetion.o: In function `send_sip_request’:

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:462: undefined reference to `gencallid’

fetion.o: In function `fetion_im_send’:

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:540: undefined reference to `fetion_send_message’

fetion.o: In function `process_register_response’:

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:591: undefined reference to `fill_auth’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:608: undefined reference to `do_register’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:559: undefined reference to `GetPersonalInfo’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:562: undefined reference to `GetContactList’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:563: undefined reference to `GetContactList’

fetion.o: In function `fetion_input_cb’:

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:772: undefined reference to `process_incoming_message’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:776: undefined reference to `process_incoming_BN’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:781: undefined reference to `process_incoming_invite’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:657: undefined reference to `parse_from’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:825: undefined reference to `fill_auth’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:826: undefined reference to `auth_header’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:872: undefined reference to `fill_auth’

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:873: undefined reference to `auth_header’

fetion.o: In function `fetion_close’:

h:/Learn/Pidgin/pidgin-2.5.3/pidgin/plugins/fetion/fetion.c:1139: undefined reference to `do_register_exp’

fetion.o: In function `fetion_actions’:………………………….

联系了gradetwo 老大,说没在windows下编译过,看来还得自己动手.看上面的字面意思就知道是文件有没有编译的,查看makefile.mingw 瀑布汗一个,里面只编译了两个文件,不知道是什么原因?自己动手把所有的文件添加到编译里面,发现好像又出错了,信息如下

f_smiley.c:27: warning: no previous prototype for ‘fetion_got_custom_smiley’

f_smiley.c: In function ‘fetion_got_custom_smiley’:

f_smiley.c:33: error: ‘slpcall’ undeclared (first use in this function)

f_smiley.c:33: error: (Each undeclared identifier is reported only once

f_smiley.c:33: error: for each function it appears in.)

f_smiley.c:38: error: ‘data’ undeclared (first use in this function)

f_smiley.c:38: error: ‘size’ undeclared (first use in this function)

f_smiley.c: At top level:

f_smiley.c:44: warning: no previous prototype for ‘fetion_got__chat’

f_smiley.c: In function ‘fetion_got__chat’:

f_smiley.c:46: error: ‘conv’ undeclared (first use in this function)

f_smiley.c:46: error: ‘who’ undeclared (first use in this function)

f_smiley.c:47: error: ‘session’ undeclared (first use in this function)

f_smiley.c:53: error: ‘smile’ undeclared (first use in this function)

f_smiley.c:53: error: ‘sha1’ undeclared (first use in this function)

f_smiley.c:54: error: implicit declaration of function ‘fetion_request_custom_smiley’

f_smiley.c:54: warning: nested extern declaration of ‘fetion_request_custom_smil

…………………………………..

很显然是f_smailey出错了,查看文件说明,这东西居然没出现在说明文件中,再瀑布汗一个,明显是一个新功能,估计是测试用的.直接删掉

现在看makefile.mingw 里编译的东东有:

SOURCES, OBJECTS

##

C_SRC = f_buddy.c \

f_chat.c \

f_gchat.c \

f_group.c \

f_login.c \

f_portrait.c \

f_sysmsg.c \

f_user.c \

f_util.c \

f_zone.c \

fetion.c

sipmsg.c

拷贝过去,确实不错,又可以开心的开始pidgin之旅了

再次感谢gradetwo 提供的好软件

顺便把编译好的插件(libfetion.dll. libfetion,只能用在XP下哦)放这里,以便不想自己编译的同志们使用libfetion插件

更新了下,这两天使用不顺手,就用最新的版本编译了下,放在这里,有需要的下

简单两招绕过电信屏蔽访问Google cache(快照)

发表于 2009-01-07 | 分类于 Other

在祖国大陆的大部分地方都是不能访问Google cache的,而我经常需要查看一些cache,所以上网找到了这个处理办法

1 下载Firefox插件Greasemonkey

2 添加 Js

// This is a greasemonkey script, for use with the Firefox extension Greasemonkey.

// More info: http://greasemonkey.mozdev.org/

//

// ==UserScript==

// @name         Google Cache

// @version      1.0.1

// @author       sunwan

// @e-mail       [email protected]

// @description  Fix google cache to work in china

// @namespace    http://www.cnnj.8866.org/download/greasemonkey/

// @include      http://www.google.com/*

// @include      http://www.google.cn/*

// ==/UserScript==

var fixed = false;

document.addEventListener('click', catchEvent, true);

function catchEvent(e) {

   if ( /\/search\?q=cache:/.test(e.target.href) )   {

      e.preventDefault();               // disable click before fixed

   }

   if ( fixed ) {

      document.removeEventListener('click', catchEvent, true);

   }

}

function checkPage()   {

   if (/^http:\/\/www\.google\..+\/search\?/i.test(location.href))   {

      var els = document.getElementsByTagName("a");

      for (var i = 0; i < els.length; i++)   {

         try {

            if ( /^[^\/]+\/\/[^\/]+\/search\?q=cache:/.test(els[i].href) )   {      //is cache

               els[i].href = els[i].href.replace(/\/search\?q=cache:/,'/search?&wc=zf&q=cache:');// replace the href

            }

         } catch (e) {}

      }

      fixed = true;

   }

}

checkPage();

史上最牛钉子户IncrediMail的卸载

发表于 2009-01-06 | 分类于 SoftWare

算起来接触电脑也有近20年了,期间安装卸载软件无数,但遇到像IncrediMail,这样
牛的钉子户,我还是第一次遇到.理由有二:1 这个软件只能安装不能卸载,就算使用的
是软件爱你自带的卸载程序卸载也会出错,提示你没有权限.其二 这个问题在国外的网
站上从2002年开始就有无数的人提出这个问题http://forums.techguy.org/windows-95-98-me/97335-resolved-install-log-file-not.html,但官方一直视而不见.

难道真的是没有权限?

No,绝对的是管理员权限,他弹出的提示信息的目的是将你往错误的方向上面引.但
不管是用工具卸载还是用自身的卸载都会给出这个错误的信息.难道真的没办法卸
载他了吗?

我们找到它的安装目录,在我这里是c:\program files\incredimail\

视你安装时的选择.进去后我们会看见一个文件夹,一个执行文件,两个文本文件.点
击执行文件,会提示说install.log找不到.找遍整个硬盘都没有它的install.log,
打开文本文档common.log查看内容,HOHO,这里不就是完整的安装记录吗?把这个
common.log文件改名成INSTALL.LOG,再运行前面说的卸载文件.卸载成功~~~~,

1…101112…27
九王爷

九王爷

这里是外宅,备份用的

269 日志
19 分类
41 标签
© 2017 九王爷
由 Hexo 强力驱动
主题 - NexT.Pisces