TA的每日心情 | 擦汗 2016-12-6 16:04 |
---|
签到天数: 10 天 [LV.3]偶尔看看II
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?注册
x
本插件原作者 cfking 先前发布于论坛, 为了方便yoho风格用户使用, 特将些插件转过来,稍作了调整发布给论坛朋友, 当然不是yoho风格的朋友也可以使用...还是那些话,要感谢就感谢原作者,我只是借花献佛......
演示地址: http://www.ad119.cn/home/cp.php?ac=school
工作信息插件: http://www.discuz.net/thread-1300380-1-1.html
内附安装说明.txt文件,请根据说明进行调整
本版本解决BUG:
1,创建空群组的bug;
2,css错乱的bug;
3,IE6.0下学校信息浮动框不能覆盖select的入学年份的巨大bug;
本版本增加自动安装升级数据库程序school_install.php,不会升级数据库的直接安装即可。
安装方法:
手动修改安装方法:
上传文件夹所有文件到home根目录下,修改下列文件:
1,修改cp.php
查找:- 'userapp', 'task', 'credit', 'password', 'domain'
复制代码 在其后加入:2,修改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']),
复制代码 3,修改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>":''));
- //学校信息搜索结束
复制代码 4,修改source/network_space.php
查找:- $gets['residecity'] = empty($_GET['residecity'])?'':stripsearchkey($_GET['residecity']);
复制代码 下方增加- //学校信息搜索开始
- $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']);
- //学校信息搜索结束
复制代码 5,修改template/你的风格/cp_header.htm(装了yoho风格的朋友可以不必要改这项)
查找:- <li$actives[profile]><a href="cp.php?ac=profile"><span>个人资料</span></a></li>
复制代码 下方增加:- <li$actives[school]><a href="cp.php?ac=school"><span>学校信息</span></a></li>
复制代码 6,修改template/你的风格/space_index.htm (装了yoho风格的朋友可以不必要改这项)
查找:- <!--{loop $fields $fieldid $value}-->
- <!--{if $space["field_$fieldid"] && empty($value['invisible'])}-->
- <!--{eval $fieldvalue = $space["field_$fieldid"]; $urlvalue = rawurlencode
- ($fieldvalue);}-->
- <li>$value[title]:<!--{if $value[allowsearch]}-->
- <a href="network.php?ac=space&field_$fieldid=$urlvalue&searchmode=1">$fieldvalue</a>
- <!--{else}-->$fieldvalue<!--{/if}--></li>
- <!--{/if}-->
- <!--{/loop}-->
- </ul>
- <!--{/if}-->
-
- </div>
复制代码 下方增加:7,修改template/你的风格/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>
复制代码 8,上传修改过的文件,覆盖原文件
9,升级数据库
执行数据库升级文件:school_install.php。 更新缓存!!!! |
|