要修改的文件有两个,一个是 你的模版里的 edit_post.html ,另一个是include/postedit.inc.php ,修改前,前先备份这两个文件。 第一步:打开 edit_post.html 在你喜欢的地方加上 <strong>重新发布</strong> <input type="checkbox" name="repost" value="1" class="checkbo... Read More
posted @ 2011-12-25 18:07 忧国忧铭 Views(225) Comments(0) Diggs(0) Edit
因为PB程序的“是否保存远程图片”这个设置是全局的,无法对某篇文章进行单独设置,可我有些文章的图片并不想远程保存。现在有了解决办法了。很简单。跟我一起来修改吧。 要修改的文件有两个,一个是 你的模版里的 post.html ,另一个是include/postnew.inc.php ,修改前,前先备份这两个文件。 第一步:打开 post.html 在你喜欢的地方加上 <strong>是否保存... Read More
posted @ 2011-12-25 18:04 忧国忧铭 Views(184) Comments(0) Diggs(0) Edit
打开search.php 在每一句 $rs['content'] = str_replace($content_replacement, '', preg_replace($content_preg_replacement, '', $rs['content'])); 的前面加上 $rs['content']=strip_tags($rs['content'], ''); 好了,保存文件... Read More
posted @ 2011-12-25 18:03 忧国忧铭 Views(179) Comments(0) Diggs(0) Edit
先备份好文件。show.php,attachment.inc.php这两个文件!! 第一步: 打开show.php 找到require_once(PBDIGG_ROOT.'include/attachment.inc.php'); 在下面加入 $rspl = $DB->db_fetch_one_array("SELECT COUNT(*) num FROM {$db_prefix}comm... Read More
posted @ 2011-12-25 18:01 忧国忧铭 Views(164) Comments(0) Diggs(0) Edit
把 include/postnew.inc.php里的 preg_match('#^(https?|ftp|gopher|news|telnet|mms|rtsp):\/\/([^\/]*)#i', $fsession['source'], $linkhost); $linkhost = addslashes(HConvert($linkhost[2])); 改成 //pre... Read More
posted @ 2011-12-25 17:54 忧国忧铭 Views(241) Comments(0) Diggs(0) Edit
有些人网站刚刚建立起来,流量少,发布的文章点击数总是那么几个,看着别扭。现在让我们一起来给发布文章的时候,初始化点击数吧,当然你也可以称为造假点击数,呵。添加后这个功能,权限限制还是必须的,只有是管理员才可以用,会员游客都无法使用。要修改的文件有两个,你模版下的post.html,和网站目录下include/postnew.inc.php修改前,请先备份好文件。第一步:打开post.html 找到合适的地方加入: {#if $customer.adminid == "1"#} 初始化点击数:<input type="text" id="v Read More
posted @ 2011-12-25 17:50 忧国忧铭 Views(218) Comments(0) Diggs(0) Edit
打开根目录下的checkcode.php 找到 var $_height = 60; var $_width = 150; 这里是说验证码显示图片的大小。大至是这个意思啦。改成你想改的数值。 找到 $size = $this->_height /4; 这里是说显示的字体大小,数值越大,字体越小,建议设置成2或3左右。 当然这个要根据你的字体文件来设置。 Read More
posted @ 2011-12-25 17:48 忧国忧铭 Views(136) Comments(0) Diggs(0) Edit
方法很简单:修改post.php 第31行将 header('Cache-control: private, must-revalidate');替换为:header("Cache-control: private"); Read More
posted @ 2011-12-25 17:46 忧国忧铭 Views(168) Comments(0) Diggs(0) Edit
PBDIGG 2.0周年版在程序上做了一些小的改动,而模板也因此也有一些改动。不知道是否由于时间紧迫的原因,导致bug出现了很多。下面我们要说的就是2.0周年版在使用ubb编辑器上的一个问题。本着技术分享的原则,下面将文件修改内容写出来。针对新手,提供了程序补丁直接下载。在整个分析中,花了不少时间,主要是对php程序不熟悉造成的。从模板分析到ubb编辑器,最后到程序文件。Finally , I found the anwser.(提醒:在修改程序以前,请备份相关文件。主要涉及3个文件show.php,include/postedit.inc.php,include/postnew.inc.ph Read More
posted @ 2011-12-25 17:40 忧国忧铭 Views(1736) Comments(0) Diggs(2) Edit
最近用开源DIGG软件PBDigg2.0做了一个资源DIGG网站(www.pyming.net),主要是想练练手,但是话说这款开源程序存在着不少问题,所以想写出来和大家分享一下,希望能为有需要的同学提供帮助!可以留言和我交流。首先是默认模版目录,即(/templates/green),在这里我选择的是green模板。announcement.html ---- 公告模版category.html ---- 分类默认模版edit_post.html ---- 编辑已经发表过的文章模板footer.html ------ 底部模版getpw.html ----- 找回密码模版header.html Read More
posted @ 2011-12-25 17:02 忧国忧铭 Views(1037) Comments(0) Diggs(0) Edit