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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

同城-同学 1.5免费发布

[复制链接]
aspk 发表于 2009-1-24 10:09:46 | 显示全部楼层 |阅读模式
UCHome插件
语言编码: GBK简体 
插件名称: 同城-同学 1.5
插件作者:
适用版本:
版权不是我的,我只是提供下载
大家安装插件时注意一定要备份好文件。


先覆盖文件 再进行修改!

--------------------------



1,升级数据库  uchome_ 按照你的数据库名称改!
ALTER TABLE `uchome_spacefield` ADD `univs_name` varchar(80) NOT NULL AFTER `birthcity` ;
ALTER TABLE `uchome_spacefield` ADD `univs_year` varchar(80) NOT NULL AFTER `univs_name` ;
ALTER TABLE `uchome_spacefield` ADD `univs_degree` varchar(80) NOT NULL AFTER `univs_name` ;
ALTER TABLE `uchome_spacefield` ADD `univs_department` varchar(80) NOT NULL AFTER `univs_degree` ;
ALTER TABLE `uchome_spacefield` ADD `highschool` varchar(80) NOT NULL AFTER `univs_department` ;
ALTER TABLE `uchome_spacefield` ADD `highschool_year` varchar(80) NOT NULL AFTER `highschool` ;
ALTER TABLE `uchome_spacefield` ADD `juniorhighSchool` varchar(80) NOT NULL AFTER `highschool_year` ;
ALTER TABLE `uchome_spacefield` ADD `juniorhighSchool_year` varchar(80) NOT NULL AFTER `juniorhighSchool` ;
ALTER TABLE `uchome_spacefield` ADD `elementarySchool` varchar(80) NOT NULL AFTER `juniorhighSchool_year` ;
ALTER TABLE `uchome_spacefield` ADD `elementarySchool_year` varchar(80) NOT NULL AFTER `elementarySchool` ;

2,修改文件cp.php('userapp', 'task', 'credit','city','school');-----发现没有增加了,'school')
查找
$acs = array('space', 'doing', 'upload', 'comment', 'blog', 'album', 'relatekw', 'common', 'class',
'swfupload', 'thread', 'mtag', 'poke', 'friend',
'avatar', 'profile', 'theme', 'import', 'feed', 'privacy', 'pm', 'share', 'advance', 'invite','sendmail',
'userapp', 'task', 'credit','city');

修改为:$acs = array('space', 'doing', 'upload', 'comment', 'blog', 'album', 'relatekw', 'common', 'class',
'swfupload', 'thread', 'mtag', 'poke', 'friend',
'avatar', 'profile', 'theme', 'import', 'feed', 'privacy', 'pm', 'share', 'advance', 'invite','sendmail',
'userapp', 'task', 'credit','city','school');

3,修改文件api\class\MyBase.php
查找:
'resideCity' => $space['residecity'],

下面增加:

'univs_name' => $space['univs_name'],
'univs_degree' => $space['univs_degree'],
'univs_year' => $space['univs_year'],
'univs_department' => $space['univs_department'],
'highschool' => $space['highschool'],
'highschool_year' => sprintf('%04d-%02d-%02d', $space['highschool_year']),
'juniorhighSchool' => $space['juniorhighSchool'],
'juniorhighSchool_year' => sprintf('%04d-%02d-%02d', $space['juniorhighSchool_year']),
'elementarySchool' => $space['elementarySchool'],
'elementarySchool_year' => sprintf('%04d-%02d-%02d', $space['elementarySchool_year']),

4,修改文件template/default/cp_header.htm(注:修改你网站所用模板下的cp_header.htm)

查找:
<li$actives[profile]><a href="cp.php?ac=profile">个人资料</a></li>

下方增加:

<li$actives[school]><a href="cp.php?ac=school">学校信息</a></li>

5,修改template/default/cp_privacy.htm
查找:
<tr>
<th width="100">个人基本资料</th>
<td><select name="privacy[view][profile]">
<option value="0"$sels[view][profile][0]>全站用户可见</option>
<option value="1"$sels[view][profile][1]>仅好友可见</option>
<option value="2"$sels[view][profile][2]>仅自己可见</option>
</select></td>
</tr>

下方增加:

<tr>
<th width="100">学校信息资料</th>
<td><select name="privacy[view][school]">
<option value="0"$sels[view][school][0]>全站用户可见</option>
<option value="1"$sels[view][school][1]>仅好友可见</option>
<option value="2"$sels[view][school][2]>仅自己可见</option>
</select></td>
</tr>

6,修改template/default/network_space.htm
查找:
<!--{if $value[resideprovince]}-->

上方增加: <!--{if $value[univs_name]}--> <p><span class="gray">大学:</span><a href="network.php?ac=space&searchmode=1&univs_name=$value[univs_name]" title="寻找来自 $value[univs_name] 的校友" target="_blank">$value[univs_name]</a><!--{if $value[univs_department]}--> - $value[univs_department]<!--{/if}--><!--{if $value[univs_year]}-->($value[univs_year]年入学)<!--{/if}--></p>
<!--{/if}-->

7,修改template/default/space_index.htm
查找:
<tr>
<th width="80">主页:</th>
<td><a href="$space[domainurl]" onclick="javascript:setCopy('$space[domainurl]');return false;" class="spacelink domainurl">$space[domainurl]</a></td>
</tr>
</table>
</div>
<!--{/if}-->
</div>
<!--{/if}-->

下方增加:

<!--{if ckprivacy('school')}-->
<div class="box">
<h3><!--{if $space[self]}--><a href="cp.php?ac=school" class="r_option">编辑学校信息</a><!--{/if}-->学校信息</h3>
<table cellspacing="2" cellpadding="2" class="infotable">
<!--{if $space[univs_name]}-->
<tr>
<th style="width:60px;">大学:</th>
<td><a href="network.php?ac=space&searchmode=1&univs_name=$space[univs_name]" title="寻找来自 $space[univs_name] 的校友" target="_blank">$space[univs_name]</a><!--{if $space[univs_year]}--> - $space[univs_year]级<!--{/if}--><!--{if $space[univs_department]}--> - $space[univs_department]<!--{/if}--></td>
</tr>
<!--{/if}-->
<!--{if $space[highschool]}-->
<tr>
<th>高中:</th>
<td><a href="network.php?ac=space&searchmode=1&highschool=$space[highschool]" title="寻找来自 $space[highschool] 的校友" target="_blank">$space[highschool]</a><!--{if $space[highschool_year]}--> - $space[highschool_year]级<!--{/if}--></td>
</tr>
<!--{/if}-->
<!--{if $space[juniorhighSchool]}-->
<tr>
<th>初中:</th>
<td><a href="network.php?ac=space&searchmode=1&juniorhighSchool=$space[juniorhighSchool]" title="寻找来自 $space[juniorhighSchool] 的校友" target="_blank">$space[juniorhighSchool]</a><!--{if $space[juniorhighSchool_year]}--> - $space[juniorhighSchool_year]级 <!--{/if}--></td>
</tr>
<!--{/if}-->
<!--{if $space[elementarySchool]}-->
<tr>
<th>小学:</th>
<td><a href="network.php?ac=space&searchmode=1&elementarySchool=$space[elementarySchool]" title="寻找来自 $space[elementarySchool] 的校友" target="_blank">$space[elementarySchool]</a><!--{if $space[elementarySchool_year]}--> - $space[elementarySchool_year]级 <!--{/if}--></td>
</tr>
<!--{/if}-->
</table>
</div>
<!--{else}-->
<div class="box">
<h3><a href="cp.php?ac=friend&op=add&uid=$space[uid]" target="_blank" title="未公开!" style="float:right;padding-top:6px;"><img  src="image/lock01.gif" /></a>学校信息</h3>
</div>
<!--{/if}-->



8,修改source/space_index.php
查找:
        $space['reside'] = trim(($space['resideprovince']?"<a href=\"network.php?ac=space&resideprovince=".rawurlencode($space['resideprovince'])."&searchmode=1\">$space[resideprovince]</a>":'').($space['residecity']?" <a href=\"network.php?ac=space&residecity=".rawurlencode($space['residecity'])."&searchmode=1\">$space[residecity]</a>":''));

下方增加:
//学校信息搜索开始
    $space['univs'] = trim(($space['univs_name']?"<a href=\"network.php?ac=space&univs_name=".rawurlencode($space['univs_name'])."&searchmode=1\">$space[univs_name]</a>":'').($space['univs_year']?" <a href=\"network.php?ac=space&univs_year=".rawurlencode($space['univs_year'])."&searchmode=1\">$space[univs_year]</a>":''));
    $space['high'] = trim(($space['highschool']?"<a href=\"network.php?ac=space&highschool=".rawurlencode($space['highschool'])."&searchmode=1\">$space[highschool]</a>":'').($space['highschool_year']?" <a href=\"network.php?ac=space&highschool_year=".rawurlencode($space['highschool_year'])."&searchmode=1\">$space[highschool_year]</a>":''));
    $space['juniorhigh'] = trim(($space['juniorhighSchool']?"<a href=\"network.php?ac=space&juniorhighSchool=".rawurlencode($space['juniorhighSchool'])."&searchmode=1\">$space[juniorhighSchool]</a>":'').($space['juniorhighSchool_year']?" <a href=\"network.php?ac=space&juniorhighSchool_year=".rawurlencode($space['juniorhighSchool_year'])."&searchmode=1\">$space[juniorhighSchool_year]</a>":''));
    $space['elementary'] = trim(($space['elementarySchool']?"<a href=\"network.php?ac=space&elementarySchool=".rawurlencode($space['elementarySchool'])."&searchmode=1\">$space[elementarySchool]</a>":'').($space['highschool_year']?" <a href=\"network.php?ac=space&elementarySchool_year=".rawurlencode($space['elementarySchool_year'])."&searchmode=1\">$space[elementarySchool_year]</a>":''));
//学校信息搜索结束

9,继续修改source/network_space.php
查找:
$gets['birthcity'] = empty($_GET['birthcity'])?'':stripsearchkey($_GET['birthcity']);

下方增加:
//学校信息搜索开始
        $gets['univs_name'] = empty($_GET['univs_name'])?'':stripsearchkey($_GET['univs_name']);
        $gets['univs_year'] = empty($_GET['univs_year'])?'':stripsearchkey($_GET['univs_year']);
        $gets['univs_degree'] = empty($_GET['univs_degree'])?'':stripsearchkey($_GET['univs_degree']);
        $gets['univs_department'] = empty($_GET['univs_department'])?'':stripsearchkey($_GET['univs_department']);
        $gets['highschool'] = empty($_GET['highschool'])?'':stripsearchkey($_GET['highschool']);
        $gets['highschool_year'] = empty($_GET['highschool_year'])?'':stripsearchkey($_GET['highschool_year']);
        $gets['juniorhighSchool'] = empty($_GET['juniorhighSchool'])?'':stripsearchkey($_GET['juniorhighSchool']);
        $gets['juniorhighSchool_year'] = empty($_GET['juniorhighSchool_year'])?'':stripsearchkey($_GET['juniorhighSchool_year']);
        $gets['elementarySchool'] = empty($_GET['elementarySchool'])?'':stripsearchkey($_GET['elementarySchool']);
        $gets['elementarySchool_year'] = empty($_GET['elementarySchool_year'])?'':stripsearchkey($_GET['elementarySchool_year']);
        //学校信息搜索结束


查找:

        $wherearr = array();
        foreach (array('sex', 'birthyear', 'birthmonth', 'birthday', 'marry', 'blood', 'birthprovince', 'birthcity', 'resideprovince', 'residecity', 'qq', 'msn') as $value) {
                if($gets[$value]) {
                        $wherearr[] = "spacefield.$value='$gets[$value]'";
                }
        }

用以下代码替换:
$wherearr = array();
        foreach (array('sex', 'birthyear', 'birthmonth', 'birthday', 'marry', 'blood', 'birthprovince', 'birthcity', 'resideprovince', 'residecity', 'qq', 'msn','univs_name','univs_year','highschool','highschool_year','juniorhighSchool','juniorhighSchool_year','elementarySchool','elementarySchool_year') as $value) {
                if($gets[$value]) {
                        $wherearr[] = "spacefield.$value='$gets[$value]'";
                }
        }//增加搜索字段

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
 楼主| aspk 发表于 2009-1-29 11:47:05 | 显示全部楼层
我自己坐沙发!
回复

使用道具 举报

madfishy 发表于 2009-1-29 17:42:14 | 显示全部楼层
顶你了 过年人少
谢谢lz的分享精神
回复

使用道具 举报

xdhomes 发表于 2009-2-9 00:47:27 | 显示全部楼层
谢谢楼主!
www.kuyou5.com 酷悠网准备装!
回复

使用道具 举报

popingdhao 发表于 2009-2-9 01:47:17 | 显示全部楼层
收藏了再说~~关注!
回复

使用道具 举报

easer 发表于 2009-2-9 02:00:40 | 显示全部楼层
正想用这个插件,感谢楼主雪中送炭!

AD:情满滨城 - 威海社交门户

欢迎威海的朋友来坐
回复

使用道具 举报

海南大学城 发表于 2009-2-10 11:36:44 | 显示全部楼层
有没有全新的安装方法呢? 这样不利于版本对接。也许有些插件也安装了,但覆盖楼主的页面,对自己本身的SNS还是有点问题的。


请问是否是最新的风格修改而成的呢。
UCenter Home 1.5 正式版发布【最后更新:2009年1月14号】
我们现在使用的是这个版本。
回复

使用道具 举报

evansea 发表于 2009-2-10 11:44:59 | 显示全部楼层
楼主的分享精神值得学习~~~
www.80red.com
回复

使用道具 举报

wyclyx 发表于 2009-2-10 11:55:19 | 显示全部楼层
好东西啊.~~~~~~~~~~~~~~
回复

使用道具 举报

luring 发表于 2009-2-10 12:08:27 | 显示全部楼层
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-16 12:31 , Processed in 0.041905 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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