Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[插件] [HACK]自动判断星座,生肖整合For D4

[复制链接]
freddy 发表于 2005-10-22 22:04:07 | 显示全部楼层 |阅读模式
################################
##HACK名称:[增强]自动判断星座,生肖整合(身份表格 & 个人资料)
##作者:小优格格
##整理+修改FOR D4:Freddy
##适用版本:D4
##数据库升级:无
##修改内容:viewpro.php, viewpro.htm , viewthread.php, viewthread.htm
##增加文件:include/functionlist.php
##技术支援:无
##演示:http://www.51happy365.com/bbs
################################


关于VIEWPRO的解决请看#35楼!


1.Upload files and folders to your root directory of forum.

2.Modify Viewthread.php


Find:

  1. require_once DISCUZ_ROOT.'./include/discuzcode.func.php';
复制代码


Add below:

  1. require_once DISCUZ_ROOT.'./include/functionlist.php';//生肖星座显示
复制代码


Find:

  1. m.groupid, m.regdate
复制代码


Add behind:

  1. , m.bday
复制代码


Find:

  1. if($post['attachment'] && $allowgetattach) {
  2.                         $attachpids .= ",$post[pid]";
  3.                         $post['attachment'] = 0;
  4.                         if(preg_match("/\[attach\](\d+)\[\/attach\]/i", $post['message'])) {
  5.                                 $attachtags[] = $post['pid'];
  6.                         }
  7.                 }
复制代码


Add below:


  1. //------------------------------------------------------自动判断星座,生肖整合Start
  2. if($post['bday']!== '0000-00-00') {
  3. $birthday = explode('-', $post['bday']);
  4. $birthdate = "$birthday[1]$birthday[2]"; //诞生月份日期
  5. $post['horoimg'] = horoimg($birthdate,1);//使用小图
  6. $post['horoname'] = horoname($birthdate);
  7. $post['yearimg'] = yearimg($birthday[0],1); //使用小图
  8. $post['yearname'] = yearname($birthday[0]);
  9. $post['checkbday'] ='1';
  10. }
  11. //------------------------------------------------------自动判断星座,生肖整合End
复制代码



3.Modify viewthread.htm

Find:

  1. <!--{if $vtonlinestatus && $post['authorid']}-->
  2.                 <!--{if $timestamp - $post['lastactivity'] <= 10800 && !$post['invisible']}-->
  3.                         {lang online_status} <b>{lang online}</b>
  4.                 <!--{else}-->
  5.                         {lang online_status} {lang offline}
  6.                 <!--{/if}-->
  7.         <!--{/if}-->
复制代码


Add below:


  1. <!--{if $post[checkbday]}-->
  2. <br><img src="$post['horoimg']" align=absmiddle alt="$post[horoname]"> &nbsp;<img src="$post[yearimg]" alt="$post[yearname]" align=absmiddle>
  3. <!--{/if}-->
复制代码



============================
以下的修改即在个人资料中显示。。不过暂时出了点问题。。可以先不装!反正主要是在贴子显示的:)

4.Modify viewpro.php

Find:

  1. require_once DISCUZ_ROOT.'./include/discuzcode.func.php';
复制代码


Add below:

  1. require_once DISCUZ_ROOT.'./include/functionlist.php';
复制代码


Find:

  1. $member['bday'] = str_replace('y', substr($year, 2, 4), $member['bday']);
复制代码


Add below:


  1. //------------------------------------------------------自动判断星座,生肖整合Start
  2. $birthdate = "$birthday[1]$birthday[2]"; //诞生月份日期
  3. $member['horoimg'] = horoimg($birthdate);
  4. $member['horoname'] = horoname($birthdate);
  5. $member['yearimg'] = yearimg($birthday[0]);
  6. $member['yearname'] = yearname($birthday[0]);
  7. //------------------------------------------------------自动判断星座,生肖整合End
复制代码


5.Modify viewpro.htm

Find:

  1. <tr><td width="45%" class="bold">{lang birthday}:</td><td width="55%">$member[bday]</td></tr>
复制代码


Replace:


  1. <tr><td width="45%" class="bold">{lang birthday}:</td><td width="55%">$member[bday] <img src=$member[yearimg] alt=$member[yearname] align=absmiddle></td></tr>
  2. <tr><td width="45%" class="bold">星座:</td><td width="55%">$member[horoname] <img src=$member[horoimg] align=absmiddle></td></tr>
复制代码



6.Update all caches!

[ 本帖最后由 freddy 于 2006-1-16 09:52 编辑 ]
 楼主| freddy 发表于 2005-10-22 22:04:15 | 显示全部楼层

自动判断星座,生肖整合(身份表格&个人资料)For D3F [All Version]

Room for update...

[ 本帖最后由 freddy 于 2005-12-13 15:34 编辑 ]
回复

使用道具 举报

1223 发表于 2005-10-22 22:05:00 | 显示全部楼层
占到了。。呵呵
回复

使用道具 举报

xjbl 发表于 2005-10-22 22:05:14 | 显示全部楼层
汗..
回复

使用道具 举报

1223 发表于 2005-10-22 22:06:42 | 显示全部楼层
原帖由 xjbl 于 2005-10-22 22:05 发表
汗..

哈哈,,前2楼都asdasd这个占位。。
回复

使用道具 举报

lu5266 发表于 2005-10-22 22:10:47 | 显示全部楼层
哈哈
支持
回复

使用道具 举报

beecheung 发表于 2005-10-22 22:12:04 | 显示全部楼层
顶死你
回复

使用道具 举报

 楼主| freddy 发表于 2005-10-22 22:14:46 | 显示全部楼层
刚搞定!呵呵~睡不着!看到我的电脑的TMP目录有这个~正好整理一下~自己试着去弄D3F,没想到成功了~
:)
回复

使用道具 举报

beecheung 发表于 2005-10-22 22:18:11 | 显示全部楼层
原帖由 freddy 于 2005-10-22 22:14 发表
刚搞定!呵呵~睡不着!看到我的电脑的TMP目录有这个~正好整理一下~自己试着去弄D3F,没想到成功了~
:)


回复

使用道具 举报

5025488.net 发表于 2005-10-22 22:28:46 | 显示全部楼层
小F就是厉害
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-3 05:12 , Processed in 0.115679 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表