博主资料

留言短消息 加为好友 收藏

用户ID:  132
昵称:  东升
来自:  广西 南宁

日历

2005 - 9
    123
45678910
11121314151617
18192021222324
252627282930 
«» 2005 - 9 «»

日志分类

最新评论

日志文章列表

2005年09月22日 11:01:13

PW3.X的控制面板首页[10.5修正]

演示网址:http://bbs.laxjyj.com/profile.php?u=18



适合版本:PW3.X
需要修改的文件:profile.php、showuserdb.htm、favor.htm、profile.htm,请根据需要决定是否安装。
修正:上传的代码因为没有关闭“自动分析url”造成源代码一些地方自动加上url标签,现已修正。

修改步骤:

1、论坛根目录:profile.php,找

Copy code
if (empty($action)) $action='modify';

替换为:
Copy code
if (empty($action)){//仿PW4.3的控制面板首页 for pw3.0 by http://bbs.laxjyj.com
    require_once('./header.php');
    require_once(R_P.'data/bbscache/bk_config.php');
    $sql="m.uid='$winddb[uid]'";

    $userdb = $db->get_one("SELECT m.*,md.postnum,md.digests,md.rvrc,md.money,md.credit,md.lastvisit,md.thisvisit,md.onlinetime,md.lastpost,md.todaypost,md.onlineip FROM pw_members m LEFT JOIN pw_memberdata md ON md.uid=m.uid WHERE $sql");

    $bankdb=$db->get_one("SELECT deposit,startdate,ddeposit,dstartdate FROM pw_memberinfo WHERE uid='$winduid'");

    if(!$bankdb){
        $bankdb['deposit']=$bankdb['ddeposit']=$bankdb['startdate']=0;
    }
    if($bankdb['startdate'] && $timestamp>$bankdb['startdate']){
        $accrual=round((floor(($timestamp-$bankdb['startdate'])/86400))*$bankdb['deposit']*$bk_rate/100);//银行利息
    } else{
        $accrual=0;
    }
    $credit=$db->query("SELECT m.value,c.name,c.description FROM pw_membercredit m LEFT JOIN pw_credits c ON c.cid=m.cid WHERE uid='$userdb[uid]'");
    if(!$userdb) {
        $errorname='';
        Showmsg('user_not_exists');
    } else{
        $userdb['rvrc']=floor($userdb['rvrc']/10);
    }
    if ($userdb['site'] && strpos($userdb['site'],"://")==false){
        $userdb['site']="http://$userdb[site]";
    }
    if($userdb['groupid']=='-1'){
        $systitle='';
    } else{
        $systitle=$ltitle[$userdb['groupid']];
    }
    isset($ltitle[$userdb['memberid']]) && $memtitle=$ltitle[$userdb['memberid']];

    $usericon=showfacedesign($userdb['icon']);
    $lasttime=get_date($userdb['lastvisit'],"Y-m-d");
    $show_regdate=get_date($userdb['regdate'],"Y-m-d");
    $tempintroduce=$userdb['introduce'];
    if($userdb['onlinetime']){
        $userdb['onlinetime']=floor($userdb['onlinetime']/3600);
    } else{
        $userdb['onlinetime']=0;
    }
    /////////收件箱
   
    $msgdb=array();

    $num=0;$readtype='read';
    $query = $db->query("SELECT mid,fromuid,touid,username,ifnew,title,mdate FROM pw_msg WHERE type='rebox' AND touid='$winduid' ORDER BY mdate DESC LIMIT 5");//$winddb[uid]
    while($msginfo=$db->fetch_array($query)){
        $num++;
        $msginfo['title']=substrs($msginfo['title'],35);
        $msginfo['mdate']=get_date($msginfo['mdate']);
        $msginfo['from']=$msginfo['username'];
        $msginfo['to']=$windid;
        $msgdb[]=$msginfo;        
    }
//收藏主题
include_once(R_P.'data/bbscache/forum_cache.php');
require R_P.'require/forum.php';
$favordb=array();
        $favor=$db->get_one("SELECT tids FROM pw_favors WHERE uid='$winddb[uid]'");
        if($favor['tids']){
              $query=$db->query("SELECT t.fid,t.tid,t.subject,t.postdate,t.author,t.replies,t.hits FROM pw_threads t WHERE t.tid IN($favor[tids]) ORDER BY t.postdate DESC LIMIT 5");
              while($favor=$db->fetch_array($query)){
                  $favor['postdate']=get_date($favor['postdate']);
                  $favor['forum']=$forum[$favor['fid']]['name'];
                  $favor['subject']=substrs($favor['subject'],35);
                  $favordb[]=$favor;
              }
        }
    require_once(PrintEot('profile'));footer();
}


2、修改模板文件:
在showuserdb.htm、favor.htm、profile.htm中,将
Copy code
<td width=25% class='f_one'>控制面板首页</td>
<td width=25% class='f_one'><a href='profile.php'>编辑个人资料</a></td>

改为:
Copy code
<td width=25% class='f_one'><a href='profile.php'>控制面板首页</a></td>
<td width=25% class='f_one'><a href='profile.php?action=modify'>编辑个人资料</a></td>



3、在profile.htm中找到(9.23修正)
Copy code
<form action='profile.php?' method=post onSubmit='return procheck(this)' name=creator enctype='multipart/form-data'>


替换为:
Copy code
<!--
EOT;
if(!$action){
//仿PW4.3的控制面板首页 for pw3.0 by http://bbs.laxjyj.com
print <<<EOT
-->

<table width='$tablewidth' cellspacing=1 cellpadding=4 align=center>
<tr><td width='23%' valign="top">
<table width='100%' cellspacing=1 cellpadding=4 align=center $i_table>
<tr><td class="head" align="center"><b>用户头像</b></td></tr>
<tr><td class="f_one" align="center">$usericon<br><br>
<a href='search.php?authorid=$userdb[uid]'>[我的主题]</a>
<a href='search.php?authorid=$userdb[uid]&digest=1'>[我的精华帖]</a>
</td></tr>
<tr><td class="head" align="center"><b>基本信息</b></td></tr>
<tr><td class="f_one">
用户名: $windid
<!--
EOT;
if($userdb[honor]){print <<<EOT
-->
($userdb[honor])
<!--
EOT;
}print <<<EOT
-->
<br>
<!--
EOT;
if($systitle){print <<<EOT
-->
系统头衔: $systitle<br>
<!--
EOT;
}print <<<EOT
-->
会员头衔: $memtitle<br>
精华: $userdb[digests]<br>
发帖: $userdb[postnum]<br>
$db_rvrcname: $userrvrc $db_rvrcunit<br>
$db_creditname: $userdb[credit] $db_creditunit<br>
在线时间: $userdb[onlinetime] 小时<br>
注册时间: $show_regdate<br>
最后登录: $lasttime<br>
</td></tr>

<tr><td class="head" align="center"><b>个人财产</b></td></tr>
<tr><td class="f_one">
$db_moneyname: $winddb[money] $db_moneyunit<br>
活期存款: $bankdb[deposit] $db_moneyunit<br>
活期利息:$accrual $db_moneyunit<br>
定期存款: $bankdb[ddeposit] $db_moneyunit
</td></tr>
</table>
</td><td valign="top">
<table width='100%' cellspacing=1 cellpadding=4 align=center $i_table>
<tr><td class="head" colspan="6"><b>最新五条短消息</b></td></tr>
<tr class="cbg" align="center">
<td width="5%">ID</td>
<td width="35%">标题</td>
<td width="15%">发件人</td>
<td width="15%">收件人</td>
<td width="20%">时间</td>
<td width="5%">已读</td></tr>
<!--
EOT;
$id=0;
foreach($msgdb as $key => $value){
$id++;
print <<<EOT
-->
<tr class="f_one" align="center">
<td>$id</td>
<td><a href="message.php?action=read&mid=$value[mid]" target="_blank">$value[title]</a></td>
<td><a href="profile.php?action=show&uid=$value[fromuid]">$value[username]</a></td>
<td><a href="profile.php?action=show&uid=$value[touid]">$value[to]</a></td>
<td>$value[mdate]</td>
<td>
<!--
EOT;
if($value['ifnew']){print <<<EOT
-->
<font color=red>否</font>
<!--
EOT;
}else{print <<<EOT
-->

<!--
EOT;
}print <<<EOT
-->
</td></tr>
<!--
EOT;
}print <<<EOT
-->
</table><br>
<table width='100%' cellspacing=1 cellpadding=4 align=center $i_table>
<tr><td class="head" colspan="5"><b>最新五个收藏主题</b></td></tr>
<tr class="cbg" align="center">
<td width="5%">ID</td>
<td width="35%">标题</td>
<td width="15%">论坛</td>
<td width="15%">作者</td>
<td width="25%">发表时间</td>
</tr>
<!--
EOT;
$id=0;
foreach($favordb as $key => $value){
$id++;
print <<<EOT
-->
<tr class="f_one" align="center">
<td>$id</td>
<td><a href="read.php?tid=$value[tid]" target="_blank">$value[subject]</a></td>
<td><a href="thread.php?fid=$value[fid]">$value[forum]</a></td>
<td><a href="profile.php?action=show&uid=$value[authorid]">$value[author]</a></td>
<td>$value[postdate]</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--以下Google广告代码,主要为了给表格底部平整-->
<br>
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-4046253115544722";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
<!--上面为Google代码-->
</td></tr></table>
<!--
EOT;
//以上为仿PW4.3的控制面板首页 for pw3.0 by http://bbs.laxjyj.com
}elseif($action=='modify'){print <<<EOT
-->
<form action='profile.php?' method=post onSubmit='return procheck(this)' name=creator enctype='multipart/form-data'>
<input type="hidden" name="action" value="modify"><!--9.23增加,否则编辑个人资料不能保存-->


4、在profile.htm中找到
Copy code
?>-->


改为:
Copy code
}
?>-->


完成!

类别: 无分类 |  评论(0) |  浏览(1940) |  收藏
2005年09月20日 06:42:50

仿PW4登录论坛显示认证码功能 for PW3.X(与后台设置关联)

一、演示:http://www.sms55.cn/reg.htmhttp://bbs.laxjyj.com/login.php?skinco=msn&u=18[/url]



二、说明:

1、修改方法非常简单;

2、后台“启用论坛基本设置”->“认证码功能(需要服务器支持GD库)”必须开启!



三、修改步骤:





1、论坛根目录login.php

Copy code

if($ifyz>2){

        Showmsg('login_jihuo');

    }



后面加上

Copy code

//登录认证码 by http://www.sms55.cn/reg.htmhttp://bbs.laxjyj.com[/url]

    if(function_exists('imagecreate') && $db_lgck && (!$loginnum || md5($loginnum) != $ck_num)){

        Showmsg('check_error');

    }

//登录认证码 by http://www.sms55.cn/reg.htmhttp://bbs.laxjyj.com[/url]





2、论坛的默认模板login.htm

Copy code

<tr><td>密码     <input type='password' maxLength=20 name=loginpwd size=40></td></tr>



后面加上

Copy code

<!--

EOT;

if(function_exists('imagecreate') && $db_lgck){print <<<EOT

-->

<tr><td>认证码 <input type='text' maxLength=4 name='loginnum' size=27> <img src="ck.php">   请将图片中的数字或英文字母填入左框中</td></tr>

<!--

EOT;

}print <<<EOT

-->





3、补充:修改首页登陆框



将首页模板index.htm

Copy code

<input type=text size=8 name='loginuser'>

<input type='password' size=8 name='loginpwd'>

<input type='hidden' name='jumpurl' value='$db_bfn'>

<input type='hidden' name='step' value=2>

<input type='hidden' name='cktime' value='31536000'>



替换为

Copy code

用户名:<input type=text size=8 name='loginuser'>

密码:<input type='password' size=8 name='loginpwd'>

<input type='hidden' name='jumpurl' value='$db_bfn'>

<input type='hidden' name='step' value=2>

<input type='hidden' name='cktime' value='31536000'>

<!--

EOT;

if(function_exists('imagecreate') && $db_lgck){print <<<EOT

-->

认证码:<input type='text' maxLength=4 name='loginnum' size=8> <img src="ck.php">

<!--

EOT;

}print <<<EOT

-->



类别: 无分类 |  评论(341) |  浏览(39687) |  收藏
2005年09月19日 07:44:40

节日礼物赠送功能(增加按在线会员+性别赠送)

适合版本:PW3.X
模板文件为仿PW4

将压缩包中的文件解压缩到相应文件并覆盖原文件即可。

到我的论坛中注册可免费下载!希望大家能多提出建议或意见!

注册网址:http://bbs.laxjyj.com/register.php?skinco=msn&u=17

下载地址:http://bbs.laxjyj.com/read.php?tid=5110

后台设置图样


10补充节日礼物赠送功能.rar

类别: 无分类 |  评论(46) |  浏览(2516) |  收藏
2005年09月18日 22:07:32

节日礼物赠送功能(增加按在线会员+性别赠送)

哈哈,仿PW4的在线会员赠送礼物功能终于完成。

到我的论坛中注册可免费下载!希望大家能多提出建议或意见!

已购买过的会员请重新下载!

注册网址:http://bbs.laxjyj.com

下载地址:http://bbs.laxjyj.com/read.php?tid=5110

后台设置图样



10

类别: 无分类 |  评论(0) |  浏览(1884) |  收藏
2005年09月02日 11:24:21

上传附件添加文字描述功能 for pw3.0[补充卸载方法]

功能说明:给上传的图片添加描述文字。(目前只能添加不能发表后再修改)
PW商业版中就有比这样好的功能。
还有这个帖子的插件也很好。http://www.phpwind.net/read.php?tid=63934
所以说这个我这个插件是多余的!
喜欢就试试,不喜欢也不要吐口水给我。

演示:http://bbs.laxjyj.com/read.php?tid=4678



需要升级数据库,使用前请考虑清楚!

升级步骤:
1、将fjsj.php复制到论坛根目录,运行后删除原文件;(从本贴附件中下载)

2、修改post.htm
将:

Copy code
<input type="file" class="subject" name="atc_attachment1">

改为:
Copy code
描述:<input type='text' size='27' name='atc_attachtext1'>
<input type="file" class="subject" size='27' name="atc_attachment1">

将:
Copy code
<input type=file class=subject name='atc_attachment$i'>

改为:
Copy code
描述:<input type='text' size='27' name='atc_attachtext$i'>
<input type=file class=subject size='27' name='atc_attachment$i'>

--------------下面是编辑时显示附件的描述内容,暂不支持修改-----------------
将:
Copy code
<!--
EOT;
if($attach){print <<<EOT
-->
<tr><td align=left valign="top" class='t_one'><b>该帖包含附件:<br>(不想保留的附件去掉√)</b></td>
<td align=left valign="top" class='t_one'>
<table width="100%" cellspacing=0 cellpadding=0>
<tr>
<!--
EOT;
$num=0;
foreach($attach as $key => $value){
$num++;
print <<<EOT
-->
<td>
<input type='checkbox' name='keep[]' value='$value[aid]' checked>
<font color='red'><b>$value[name]</b></font> ($value[size]K)  
<!--
EOT;
if($value[type]=='img' && file_exists('admin/c_htm.php')){print <<<EOT
-->
<a href="javascript:" onclick="addattach('$value[aid]')"><b>将图片添加到帖子中</b></a>
<!--
EOT;
}print <<<EOT
-->
</td>

替换为:
Copy code
<!--
EOT;
if($attach){print <<<EOT
-->
<tr><td align=left valign="top" class='t_one'><b>该帖包含附件:<br>(不想保留的附件去掉√)</b></td>
<td align=left valign="top" class='t_one'>
<table width="100%" cellspacing=0 cellpadding=0>
<tr>
<td>
<!--
EOT;
$num=0;
foreach($attach as $key => $value){
$num++;
print <<<EOT
-->
所需$db_rvrcname:
<input type='text' value='$value[needrvrc]' size='1' disabled>
描述:<input type='text' size='27' value='$value[attachtext]' disabled>
<input type='checkbox' name='keep[]' value='$value[aid]' checked>
<font color='red'><b>$value[name]</b></font> ($value[size]K)  
<br>
<!--
EOT;
if($value[type]=='img' && file_exists('admin/c_htm.php')){print <<<EOT
-->
<a href="javascript:" onclick="addattach('$value[aid]')"><b>将图片添加到帖子中</b></a>
<!--
EOT;
}print <<<EOT
-->
</td>


3、修改postupload.php
在:
Copy code
$needrvrc=${'atc_downrvrc'.$i};

后面加上:
Copy code
$attachtext=${'atc_attachtext'.$i};

将:
Copy code
$attachs[$aid]=array('aid'=>$aid,'name'=>stripslashes($atc_attachment_name),'type'=>$type,'attachurl'=>$fileuplodeurl,'needrvrc'=>$needrvrc,'size'=>$size,'hits'=>0);

改为:
Copy code
$attachs[$aid]=array('aid'=>$aid,'name'=>stripslashes($atc_attachment_name),'type'=>$type,'attachurl'=>$fileuplodeurl,'needrvrc'=>$needrvrc,'size'=>$size,'hits'=>0,'attachtext'=>$attachtext);

将:
Copy code
$db->update("UPDATE pw_attachs SET name='$atc_attachment_name',type='$type',size='$size',attachurl='$fileuplodeurl',needrvrc='$needrvrc' WHERE aid='$aid'");

改为:
Copy code
$db->update("UPDATE pw_attachs SET name='$atc_attachment_name',type='$type',size='$size',attachurl='$fileuplodeurl',needrvrc='$needrvrc',attachtext='$attachtext' WHERE aid='$aid'");

4、修改read.php
将:
Copy code
$read['pic'][$rt['aid']]=array($rt['aid'],$dfurl,$dfadmin);

改成:
Copy code
$read['pic'][$rt['aid']]=array($rt['aid'],$dfurl,$dfadmin,$rt['attachtext']);

5、修改模板read.htm
查:
Copy code
<br>$pic[1]

改成:
Copy code
<br>$pic[1]
<!--
EOT;
if($pic[3]){print <<<EOT
-->
<br>$pic[3]
<!--
EOT;
}print <<<EOT
-->

----------------------------------完成-----------------------------------

再次声明:
因商业版中就有比这个好的功能,加上本人能力有限只能添加附件的描述不能发表后再修改,还请各高手来加以改进。

谢谢!

=========================

卸载时请还原修改的相关程序,并根据需要对数据表进行更新。

安装PW4后数据表转换方法:

请使用phpmyadmin登录到数据库,在SQL中输入下列代码。
1、转换原来的描述
Copy code
UPDATE pw_attachs SET descrip=attachtext


2、删除增加的字段
Copy code
alter table pw_attachs drop attachtext
fjsj.rar

类别: 无分类 |  评论(144) |  浏览(2750) |  收藏
2005年09月01日 18:03:35

上传附件添加文字描述功能演示。

昨天搜索论坛一直找不到能在Wind Code 编辑器中可以实现上传附件添加文字描述功能。
参照DZ2.5中的插件创意,于无聊中做了一个插件,目前尚未全部功能尚未完成,欢迎大家提出改进建议或意见。

原DZ2.5的帖子图片添加描述文字功能演示:
http://www.laxjyj.com/bbs/viewthread.php?tid=4165

在PW3.0的帖子图片添加描述文字功能演示:
http://bbs.laxjyj.com/read.php?tid=4678

尚未完成的功能:

1、编辑帖子尚未能修改附件描述。

2、read面页显示需要进行美化。

现在才知道商业版本身就是有这个功能了5555555555555

不好玩,买商业版算了。
此插件到此结束,没什么激情玩下去了。

类别: 无分类 |  评论(0) |  浏览(2367) |  收藏