本帖最后由 ebottle 于 2009-8-11 16:11 编辑
本帖只对 https://discuz.dismall.com/viewth ... ;page=1#pid11465747 进行修正:
cp_blog.php 修正了不是管理员不能投稿的问题
1、在下面代码后- include_once template("cp_blog");
复制代码 加上- //关联群组
- $mtags = array();
- if(!$eventid || $event['uid']==$_SGLOBAL['supe_uid']) {
- $query = $_SGLOBAL['db']->query("SELECT mtag.* FROM ".tname("tagspace")." st LEFT JOIN ".tname("mtag")." mtag ON st.tagid=mtag.tagid WHERE st.uid='$_SGLOBAL[supe_uid]'");
- while($value=$_SGLOBAL['db']->fetch_array($query)) {
- $mtags[] = $value;
- }
- }
复制代码 function_blog.php 修正了圈子总帖子数不更新
2、在下面代码后- $fieldarr['blogid'] = $blogid;
- $fieldarr['uid'] = $blogarr['uid'];
- inserttable('blogfield', $fieldarr);
复制代码 后加上:- if($tagid){ //投稿到圈子
- $tsetarr = array(
- 'tagid' => $tagid,
- 'uid' => $_SGLOBAL['supe_uid'],
- 'username' => $_SGLOBAL['supe_username'],
- 'dateline' => $_SGLOBAL['timestamp'],
- 'subject' => $POST['subject'],
- 'lastpost' => $_SGLOBAL['timestamp'],
- 'lastauthor' => $_SGLOBAL['supe_username'],
- 'lastauthorid' => $_SGLOBAL['supe_uid'],
- 'topicid' => 0
- );
- $tid = inserttable('thread', $tsetarr, 1);
- $psetarr = array(
- 'tagid' => $tagid,
- 'tid' => $tid,
- 'uid' => $_SGLOBAL['supe_uid'],
- 'username' => $_SGLOBAL['supe_username'],
- 'ip' => getonlineip(),
- 'dateline' => $_SGLOBAL['timestamp'],
- 'message' => $message,
- 'isthread' => 1
- );
- //添加
- inserttable('post', $psetarr);
- //更新圈子统计
- $_SGLOBAL['db']->query("UPDATE ".tname("mtag")." SET threadnum=threadnum+1 WHERE tagid='$tagid'");
- }
复制代码 |