学校信息1[1].2完美版GBK(纯净版)
学校信息1.2完美版GBK(纯净版)鉴于许多同学问学校信息的有关问题,现将完美版放出,并附上安装方法,只要按照安装方法进行安装,必不会出现任何问题,否则请发帖询问,不要加我Q每个询问,谢谢。
本版本解决BUG:
1,创建空群组的bug;
2,css错乱的bug;
3,IE6.0下学校信息浮动框不能覆盖select的入学年份的巨大bug;
本版本增加自动安装升级数据库程序school_install.php,不会升级数据库的直接安装即可。
本版本包括两个版本:自动创建学校群组版和不自动创建群组纯净版,大家根据需要安装即可。
升级方法:
下载本插件后直接覆盖后更新缓存即可。
全新安装方法:
如是1.5正式版未改动过任何文件,直接下载本插件上传覆盖然后执行school_install.php即可;
如已改动本插件需要改动的文件,需按照一下手动修改方法进行修改。
手动修改安装方法:
下载本插件,删除cp.php,source/space_index.php,source/network_space.php,api/class /MyBase.php,template/default/space_index.htm,template/default/cp_header.htm,template/default/cp_privacy.htm 然后安装修改说明修改即可。
1,修改cp.php
查找:
1. 'userapp', 'task', 'credit', 'password', 'domain'
复制代码
在其后加入:
1. ,'school'
复制代码
2,修改api/class/MyBase.php
查找:
1. 'resideCity' => $space['residecity'],
复制代码
下方增加:
1. //Add by chengfei
2. 'univs_name' => $space['univs_name'],
3. 'univs_degree' => $space['univs_degree'],
4. 'univs_year' => $space['univs_year'],
5. 'univs_department' => $space['univs_department'],
6. 'highschool' => $space['highschool'],
7. 'highschool_year' => sprintf('%04d-%02d-%02d', $space['highschool_year']),
8. 'juniorhighSchool' => $space['juniorhighSchool'],
9. 'juniorhighSchool_year' => sprintf('%04d-%02d-%02d', $space['juniorhighSchool_year']),
10. 'elementarySchool' => $space['elementarySchool'],
11. 'elementarySchool_year' => sprintf('%04d-%02d-%02d', $space['elementarySchool_year']),
12. //Add by chengfei
复制代码
3,修改source/space_index.php
查找:
1. $space['reside'] = trim(($space['resideprovince']?"<a href=\"network.php?ac=space&resideprovince=".rawurlencode($space['resideprovince'])."&searchmode=1\">$space</a>":'').($space['residecity']?" <a href=\"network.php?ac=space&residecity=".rawurlencode($space['residecity'])."&searchmode=1\">$space</a>":''));
复制代码
下方增加:
1. //学校信息搜索开始 add by chengfei
2. $space['univs'] = trim(($space['univs_name']?"<a href=\"network.php?ac=space&univs_name=".rawurlencode($space['univs_name'])."&searchmode=1\">$space</a>":'').($space['univs_year']?" <a href=\"network.php?ac=space&univs_year=".rawurlencode($space['univs_year'])."&searchmode=1\">$space</a>":''));
3. $space['high'] = trim(($space['highschool']?"<a href=\"network.php?ac=space&highschool=".rawurlencode($space['highschool'])."&searchmode=1\">$space</a>":'').($space['highschool_year']?" <a href=\"network.php?ac=space&highschool_year=".rawurlencode($space['highschool_year'])."&searchmode=1\">$space</a>":''));
4. $space['juniorhigh'] = trim(($space['juniorhighSchool']?"<a href=\"network.php?ac=space&juniorhighSchool=".rawurlencode($space['juniorhighSchool'])."&searchmode=1\">$space</a>":'').($space['juniorhighSchool_year']?" <a href=\"network.php?ac=space&juniorhighSchool_year=".rawurlencode($space['juniorhighSchool_year'])."&searchmode=1\">$space</a>":''));
5. $space['elementary'] = trim(($space['elementarySchool']?"<a href=\"network.php?ac=space&elementarySchool=".rawurlencode($space['elementarySchool'])."&searchmode=1\">$space</a>":'').($space['highschool_year']?" <a href=\"network.php?ac=space&elementarySchool_year=".rawurlencode($space['elementarySchool_year'])."&searchmode=1\">$space</a>":''));
6. //学校信息搜索结束
复制代码
4,修改source/network_space.php
查找:
1. $gets['residecity'] = empty($_GET['residecity'])?'':stripsearchkey($_GET['residecity']);
复制代码
下方增加:
1.
2.
3. //学校信息搜索开始 add by chengfei
4. $gets['univs_name'] = empty($_GET['univs_name'])?'':stripsearchkey($_GET['univs_name']);
5. $gets['univs_year'] = empty($_GET['univs_year'])?'':stripsearchkey($_GET['univs_year']);
6. $gets['univs_degree'] = empty($_GET['univs_degree'])?'':stripsearchkey($_GET['univs_degree']);
7. $gets['univs_department'] = empty($_GET['univs_department'])?'':stripsearchkey($_GET['univs_department']);
8. $gets['highschool'] = empty($_GET['highschool'])?'':stripsearchkey($_GET['highschool']);
9. $gets['highschool_year'] = empty($_GET['highschool_year'])?'':stripsearchkey($_GET['highschool_year']);
10. $gets['juniorhighSchool'] = empty($_GET['juniorhighSchool'])?'':stripsearchkey($_GET['juniorhighSchool']);
11. $gets['juniorhighSchool_year'] = empty($_GET['juniorhighSchool_year'])?'':stripsearchkey($_GET['juniorhighSchool_year']);
12. $gets['elementarySchool'] = empty($_GET['elementarySchool'])?'':stripsearchkey($_GET['elementarySchool']);
13. $gets['elementarySchool_year'] = empty($_GET['elementarySchool_year'])?'':stripsearchkey($_GET['elementarySchool_year']);
14. //学校信息搜索结束
复制代码
5,修改template/default/cp_header.htm
查找:
1. <li$actives><a href="cp.php?ac=profile"><span>个人资料</span></a></li>
复制代码
下方增加:
1. <li$actives><a href="cp.php?ac=school"><span>学校信息</span></a></li>
复制代码
6,修改template/default/space_index.htm
查找:
1.
2.
3. <!--{loop $fields $fieldid $value}-->
4. <!--{if $space["field_$fieldid"] && empty($value['invisible'])}-->
5. <!--{eval $fieldvalue = $space["field_$fieldid"]; $urlvalue = rawurlencode($fieldvalue);}-->
6. <li>$value:<!--{if $value}-->
7. <a href="network.php?ac=space&field_$fieldid=$urlvalue&searchmode=1">$fieldvalue</a>
8. <!--{else}-->$fieldvalue<!--{/if}--></li>
9. <!--{/if}-->
10. <!--{/loop}-->
11. </ul>
12. <!--{/if}-->
13.
14. </div>
复制代码
下方增加:
1.
2.
3. <!--{if $space}-->
4. <!--{if ckprivacy('school')}-->
5. <div id="space_feed" class="feed">
6. <h3 class="feed_header">
7. <span class="r_option">
8. <!--{if $space}--><a href="cp.php?ac=school" class="action">编辑学校信息</a><!--{/if}-->
9. </span>
10. <span class="entry-title">学校信息</span>
11. </h3>
12. <div class="box_content">
13. <table cellspacing="2" cellpadding="2" class="infotable">
14.
15. <!--{if $space}-->
16.
17. <tr>
18.
19. <th width="54"><div align="right">大学:</div></th>
20.
21. <td width="509"><a href="network.php?ac=space&searchmode=1&univs_name=$space" title="寻找来自 $space 的校友" target="_blank">$space</a><!--{if $space}--> - $space级<!--{/if}--><!--{if $space}--> - $space<!--{/if}--></td>
22. </tr>
23.
24. <!--{/if}-->
25.
26. <!--{if $space}-->
27.
28. <tr>
29.
30. <th><div align="right">高中:</div></th>
31.
32. <td><a href="network.php?ac=space&searchmode=1&highschool=$space" title="寻找来自 $space 的校友" target="_blank">$space</a><!--{if $space}--> - $space级<!--{/if}--></td>
33. </tr>
34.
35. <!--{/if}-->
36.
37. <!--{if $space}-->
38.
39. <tr>
40.
41. <th><div align="right">初中:</div></th>
42.
43. <td><a href="network.php?ac=space&searchmode=1&juniorhighSchool=$space" title="寻找来自 $space 的校友" target="_blank">$space</a><!--{if $space}--> - $space级 <!--{/if}--></td>
44. </tr>
45.
46. <!--{/if}-->
47.
48. <!--{if $space}-->
49.
50. <tr>
51.
52. <th><div align="right">小学:</div></th>
53.
54. <td><a href="network.php?ac=space&searchmode=1&elementarySchool=$space" title="寻找来自 $space 的校友" target="_blank">$space</a><!--{if $space}--> - $space级 <!--{/if}--></td>
55. </tr>
56.
57. <!--{/if}-->
58. </table>
59.
60. <!--{else}-->
61. <div id="space_feed" class="feed">
62. <h3 class="feed_header">
63. <span class="r_option">
64. <a href="cp.php?ac=friend&op=add&uid=$space" target="_blank" title="未公开!"><img src="image/lock01.gif" /></a>
65. </span>
66. <span class="entry-title">学校信息</span>
67. </h3>
68. <div class="box_content">
69. <ul>
70. </ul>
71.
72.
73. <!--{/if}-->
74. </div>
75. </div>
76.
77. <!--{/if}-->
复制代码
7,修改template/default/cp_privacy.htm
查找:
1. <tr>
2. <th width="100">个人基本资料</th>
3. <td><select name="privacy">
4. <option value="0"$sels>全站用户可见</option>
5. <option value="1"$sels>仅好友可见</option>
6. <option value="2"$sels>仅自己可见</option>
7. </select></td>
8. </tr>
复制代码
下方增加:
1. <tr>
2. <th width="100">学校信息资料</th>
3. <td><select name="privacy">
4. <option value="0"$sels>全站用户可见</option>
5. <option value="1"$sels>仅好友可见</option>
6. <option value="2"$sels>仅自己可见</option>
7. </select></td>
8. </tr>
复制代码
8,升级数据库
执行数据库升级文件:school_install.php。 好东东啊,呵呵 挣钱,挣钱~~! 钱怎么赚啊 Thanks again!!!
Pages:
[1]