改前记得备份文件。 source/include/spacecp/spacecp_favorite.php 行 118
//收藏的时候,将收藏内容作为回复发表。。。
// $favid = C::t('home_favorite')->insert($arr, true); 之前插入:
- if($arr['idtype']=='tid'){
- $data['message']=$arr['description'];
- $data['first']=0;
- $data['invisible']=0;
- $data['anonymous']=0;
- $data['htmlon']=0;
- $data['bbcodeoff']=1;
- $data['smileyoff']=0;
- $data['attachment']=0;
- $data['rate']=0;
- $data['parseurloff']=0;
- $data['authorid']=$_G['uid'];
- $data['author']=$_G['username'];
- $data['tid']=$arr['id'];
- $fidarr=DB::fetch_first('SELECT `fid`,`maxposition` FROM '.DB::table('forum_thread').' WHERE tid='.$data['tid']);
- $data['fid']=$fidarr['fid'];
- $data['useip']=$_G['clientip'];
- $data['usesig']=1;
- $data['dateline']=$_G['timestamp'];
- $data['position']=$fidarr['maxposition']?$fidarr['maxposition']+1:2;
- include libfile('function/forum');
- $flg=@insertpost($data);
- if($flg){
- @DB::query('UPDATE '.DB::table('forum_thread').' SET `maxposition`=`maxposition`+1 WHERE `tid`='.$data['tid'].' LIMIT 1');
- }
- }
- //END
source/module/forum/forum_misc.php 行 634
//评分理由作为回复发表。 by www.weixiaoduo.com 。
//C::t('forum_ratelog')->insert($insertarr); 之前插入:
- $score=$insertarr['score']>0?'+'.$insertarr['score']:$insertarr['score'];
- $data['message']='[quote]'.$score.$_G['setting']['extcredits'][1]['unit'].$_G['setting']['extcredits'][1]['title'].'[/quote]'.$insertarr['reason'];
- //$data['message']=$insertarr['reason'];
- $data['first']=0;
- $data['invisible']=0;
- $data['anonymous']=0;
- $data['htmlon']=0;
- $data['bbcodeoff']=0;
- $data['smileyoff']=0;
- $data['attachment']=0;
- $data['rate']=0;
- $data['parseurloff']=0;
- $data['authorid']=$_G['uid'];
- $data['author']=$_G['username'];
- $tidarr=DB::fetch_first('SELECT `tid` FROM '.DB::table('forum_post').' WHERE pid='.$insertarr['pid']);
- $fidarr=DB::fetch_first('SELECT `fid`,`maxposition` FROM '.DB::table('forum_thread').' WHERE tid='.$tidarr['tid']);
- $data['tid']=$tidarr['tid'];
- $data['fid']=$fidarr['fid'];
- $data['useip']=$_G['clientip'];
- $data['usesig']=1;
- $data['dateline']=$_G['timestamp'];
- $data['position']=$fidarr['maxposition']?$fidarr['maxposition']+1:2;
- $flg=@insertpost($data);
- if($flg){
- @DB::query('UPDATE '.DB::table('forum_thread').' SET `maxposition`=`maxposition`+1 WHERE `tid`='.$tidarr['tid'].' LIMIT 1');
- }
- //exit();
- //END