我来补充一下安装说明文件吧!
找到cp_blog.htm模板,在- <!--{if checkperm('seccode')}-->
- <!--{if $_SCONFIG['questionmode']}-->
- <tr>
- <th style="vertical-align: top;">请回答验证问题</th>
- <td>
- <p><!--{eval question();}--></p>
- <input type="text" id="seccode" name="seccode" value="" size="15" class="t_input" />
- </td>
- </tr>
- <!--{else}-->
- <tr>
- <th style="vertical-align: top;">请填写验证码</th>
- <td>
- <script>seccode();</script>
- <p>请输入上面的4位字母或数字,看不清可<a href="javascript:updateseccode()">更换一张</a></p>
- <input type="text" id="seccode" name="seccode" value="" size="15" class="t_input" />
- </td>
- </tr>
- <!--{/if}-->
- <!--{/if}-->
复制代码 后面添加:- <!--{if $mtags}-->
- <tr>
- <th>投稿到圈子</th>
- <td>
- <select name="tagid">
- <option value="">选择圈子</option>
- <!--{loop $mtags $value}-->
- <option value="$value[tagid]" <!--{if $value[tagid]==$event[tagid]}-->selected<!--{/if}--> >$value[tagname]</option>
- <!--{/loop}-->
- </select>
- </td>
- </tr>
- <!--{/if}-->
复制代码 source/function_blog.php文件中
找到代码:- //标题
- $POST['subject'] = getstr(trim($POST['subject']), 80, 1, 1, 1);
- if(strlen($POST['subject'])<1) $POST['subject'] = sgmdate('Y-m-d');
- $POST['friend'] = intval($POST['friend']);
复制代码 在下面添加- $tagid = $POST['tagid'] = intval($POST['tagid']);
复制代码 再找到- if($olds) {
- //更新
- updatetable('blogfield', $fieldarr, array('blogid'=>$blogid));
- } else {
- $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'");
- }
复制代码 在source/cp_blog.php文件中找到最底部- 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;
- }
- }
复制代码 |