In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how DEDECMS banned tourists from commenting. I hope you will learn a lot after reading this article. Let's discuss it together.
How does DEDECMS ban visitors from commenting?
1. Click the background system Settings → system basic parameters → to add a new variable
Variable name: cfg_feedback_guest variable value is 1 type Boolean
two。 Modify feedback.php file under plus folder
The modified code is as follows: replace line 276-313 with:
The code is as follows:
/ / check whether visitors can comment on if ($cfg_feedback_guest=='N') {/ / check that users log in to if (empty ($notuser)) {$notuser=0;} / / comment anonymously if ($notuser==1) {$username = $cfg_ml- > M_ID > 0? 'Anonymous': 'tourist';} else if ($cfg_ml- > M_ID > 0) {$username = $cfg_ml- > cfg_ml- Username;} else {if ($usernameholder account account'& & $pwdfarmer account account') {$rs= $cfg_ml- > CheckUser ($username,$pwd); if ($rs==1) {$dsql- > ExecuteNoneQuery ("Update `UserName" .time (). ", loginip='" .GetIP (). "). Where mid=' {$cfg_ml- > M_ID}'; ");} else {ResetVdValue (); ShowMsg ('the administrator has set up that visitors are not allowed to comment, please login or register first!' ,'- 1'); exit ();}} else {ResetVdValue (); ShowMsg ('the administrator has set up that visitors are not allowed to comment, please login or register first!' ,'- 1'); exit ();} else {/ / check that users log in to if (empty ($notuser)) {$notuser=0;} / / comment anonymously if ($notuser==1) {$username = $cfg_ml- > M_ID > 0? 'Anonymous': 'tourist';} / logged-in user else if ($cfg_ml- > M_ID > 0) {$username = $cfg_ml- > MainUserName;} / / user authentication else {if ($usernameauthentication account) & & $pwduser authentication account') {$rs= $cfg_ml- > CheckUser ($username,$pwd); if ($rs==1) {$dsql- > ExecuteNoneQuery ("Update `UserName" .time (). ", loginip='" .GetIP (). " Where mid=' {$cfg_ml- > M_ID}'; ");} else {$username = 'tourist';}} else {$username = 'tourist';} after reading this article, I believe you have some understanding of how DEDECMS can achieve a ban on tourists' comments. You want to know more about it. Welcome to the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.