|
注意:自己修改程序时候,小心复制的空格,一般有空格程序是不会显示的
一、功能演示如下 适合8.5版本如下网址 之后到对应群组里核实下帖子是否已经存在群组里了; 二、功能实现前提后台设置为: 首先选择好想让群组关联的版块 版块选择好后我们开始设置想使用的群组,进行编辑,如下图 三、修改代码如下: (一) template/wind/thread.htm 找到(一共有2处同时修改) - <a href="javascript:;" onclick="submitAction(document.mawhole,'del');return false;" class="bta fl">删除</a>
下面加 - <a href="javascript:;" onclick="submitAction(document.mawhole,'colony');return false;" class="bta fl">群组话题</a>
2,论坛根目录下找见 mawhole.php 找见 修改为 3,找见 - case 'del' :
- $admincheck = pwRights($isBM, 'delatc');
- break;
下面添加 - case 'colony' ://add bu yth
- $admincheck = pwRights($isBM, 'delatc');
- break;
4,找见 - require_once PrintEot('ajax_mawholebatch');
- ajax_footer();
下面添加 - } elseif ($action == 'colony'){
- if (empty($_POST['step'])) {
- $forumcache = '';
- $query = $db->query("SELECT * FROM pw_colonys WHERE classid!=0");
- while ($rt = $db->fetch_array($query)) {
- $forumcache .= "<option value='$rt[id]'> |- $rt[cname]</option>";
- }
- require_once PrintEot($template);
- footer();
- } else {
- PostCheck();
- InitGP(array('to_id', 'ifmsg', 'to_threadcate', 'to_subtype'));
- count($tidarray) > 500 && Showmsg('mawhole_count');
- $mids = $ttable_a = $ptable_a = $msgdb = array();
- if (is_array($tidarray)) {
- foreach ($tidarray as $key => $value) {
- if (is_numeric($value)) {
- $mids[] = $value;
- $ttable_a[GetTtable($value)][] = $value;
- }
- }
- }
- !$mids && Showmsg('mawhole_nodata');
- $mids = pwImplode($mids);
- $newfid = $db->get_value("SELECT classid FROM pw_colonys WHERE id=$to_id");
- $db->update("UPDATE pw_threads SET fid=$newfid,tpcstatus=1 WHERE tid IN($mids)");
- $query = $db->query("SELECT tid,fid,postdate,lastpost FROM pw_threads WHERE tid IN($mids)");
- while ($rt = $db->fetch_array($query)) {
- $db->update("REPLACE INTO pw_argument(tid,cyid,topped,postdate,lastpost) VALUES(".$rt['tid'].",".$to_id.",0,'".$rt['postdate']."','".$rt['lastpost']."')");
- }
- if (!defined('AJAX')) {
- refreshto("thread.php?fid=$fid{$viewbbs}", 'operate_success');
- } else {
- Showmsg($succ_msg);
- }
- }
(二)template\wind\mawhole.htm里修改 - 压帖操作
- <!--
- EOT;
- }elseif($action == 'push'){print <<<EOT
- -->
- 推送操作
- <!--
- EOT;
- }elseif($action == 'banuser'){print <<<EOT
- -->
- 禁言
修改为: - 推送操作
- <!--
- EOT;
- }elseif($action == 'colony'){print <<<EOT
- -->
- 群组话题移动
- <!--
- EOT;
- }elseif($action == 'banuser'){print <<<EOT
- -->
- 禁言
2,找见(程序里面共有三处,修改最下面这里) - <!--
- EOT;
- }elseif($action=='edit'){print <<<EOT
- -->
- <!--
- EOT;
- }elseif($action=='colony'){print <<<EOT
- -->
- <tr class="tr3">
- <th width="20%" style="text-align:right;">选择目的版块:</th>
- <th><select name="to_id" id="to_id">$forumcache
- </select></th>
- </tr>
- <tr class="tr3" style="display:none">
- <th width="20%" style="text-align:right;">主题分类:</th>
- <th><div id="innerselect" class="fl"><select name="to_threadcate" id="to_threadcate" onchange="getSubType(this.value)">
- <option value="">无主题分类</option>
- </select></div><div id="subtypeselect" ></div></th>
- </tr>
- <script language="JavaScript">
- function getThreadCates(fid){
- var selobj = getObj('to_threadcate');
- selobj.options.length=0;
- selobj.options.add(new Option("不分类","0"));
- var t_typedb = JSONParse('$t_typedb');
- for (var temp in t_typedb) {
- if (temp == fid) {
- for (var temp2 in t_typedb[temp]) {
- selobj.options.add(new Option(t_typedb[temp][temp2],temp2));
- }
- }
- }
- getObj('to_threadcate').appendChild(selobj);
- getObj('subtypeselect').innerHTML = '';
- }
- function getSubType(id){
- var ishave = 0;
- var fid = getObj('to_id').value;
- var selobj = elementBind('select');
- selobj.setAttribute('name','to_subtype');
- selobj.options.add(new Option("不分类","0"));
- var t_subtypedb = JSONParse('$t_subtypedb');
- for (var temp in t_subtypedb) {
- if (temp == fid) {
- for (var temp2 in t_subtypedb[temp]) {
- if (temp2 == id) {
- for (var temp3 in t_subtypedb[temp][temp2]) {
- ishave++;
- selobj.options.add(new Option(t_subtypedb[temp][temp2][temp3],temp3));
- }
- }
- }
- }
- }
- if (ishave > 0) {
- getObj('subtypeselect').innerHTML = '';
- getObj('subtypeselect').appendChild(selobj);
- } else {
- getObj('subtypeselect').innerHTML = '';
- }
- }
- </script>
懒人包下载 8.7gbk_qunzu.rar (30 K) 下载次数:87
|