step 1、在require/postfunc.php找到
function check_tag($tags) { $tags = array_unique(explode(" ",preg_replace('/\s+/is',' ',trim($tags)))); count($tags)>5 && Showmsg("tags_num_limit"); foreach ($tags as $key => $value) { (strlen($value)>15 || strlen($value)<3) && Showmsg('tag_length_limit'); } $tags = implode(" ",$tags); return Char_cv($tags); }
上面加红的15和3自行修改
step 2、在require/postfunc.php找到
function setTags($tags) { if (!$tags) { return ''; } $this->tags = array_unique(explode(" ",preg_replace('/\s+/is',' ',trim($tags)))); if (count($this->tags) > 5) { return $this->post->showmsg("tags_num_limit"); } foreach ($this->tags as $key => $value) { if (strlen($value)>15 || strlen($value)<3) { return $this->post->showmsg('tag_length_limit'); } } return implode(" ",$this->tags); }
上面加红的15和3自行修改
step 3、修改提示信息:template/wind/lang_msg.php
'tag_length_limit' => '标签的长度请控制在3-15个字节之间',