方法可广泛用于商城、供应、求购、行情、公司、展会、文章、信息、品牌、团购、图库、专题、视频、下载、人才、知道等模型……
禁止同一个会员发布重复信息:
已供应为例子:打开文件module/sell/sell.class.php
1、在代码function pass($post)前面增加一个title_exists函数:
//20200623 S
	function title_exists($title) {
		$condition = "title='$title'";
		if($this->itemid) $condition .= " AND itemid!=$this->itemid";
		return DB::get_one("SELECt itemid FROM {$this->table} WHERe {$condition}");
	}
	//20200623 E
2、再搜索 if($post['totime']) { 上面加上
if($this->title_exists($post['title'])) return $this->_(lang('message->pass_chongfu')); //20200623
总效果图
	 
	
3、最后在找到lang\zh-cn\message.inc.php添加一行
$L['pass_chongfu'] = '标题重复请修改'; //20200623
效果图:
	 
	
	
总结:其他模块一样的方式,找到对应的 module/**/**.class.php 修改即可


 
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 
            
