卓越飞翔博客卓越飞翔博客

卓越飞翔 - 您值得收藏的技术分享站
技术文章11201本站已运行3223

PHPCMS V9 会员投稿可编辑删除

1、修正会员中心投稿列表模板 phpcmstemplatesdefaultmember/content_published.html

将操作列于改为 如下:

编辑 | 删掉

2、修改 phpcms/modules/member/content.php 的会员编辑删除函数。

2.1、注释 public function edit() 中的 if($r['status']==99) showmessage(L('has_been_verified'));

2.2、修改 public function delete() 的 $where = " checkid='$checkid' and username='$username' and status!=99 "; 改为 $where = " checkid='$checkid' and username='$username'";

完整代码如下:

/**
* 编辑内容
*/
public function edit() {
$_username = $this->memberinfo['username'];
if(isset($_POST['dosubmit'])) {
$catid = $_POST['info']['catid'] = intval($_POST['info']['catid']);
$siteids = getcache('category_content', 'commons');
$siteid = $siteids[$catid];
$CATEGORYS = getcache('category_content_'.$siteid, 'commons');
$category = $CATEGORYS[$catid];
if($category['type']==0) {
$id = intval($_POST['id']);
$catid = $_POST['info']['catid'] = intval($_POST['info']['catid']);
$this->content_db = pc_base::load_model('content_model');
$modelid = $category['modelid'];
$this->content_db->set_model($modelid);
//判断会员组投稿是否须要审核
$memberinfo = $this->memberinfo;
$grouplist = getcache('grouplist');
$setting = string2array($category['setting']);
if(!$grouplist[$memberinfo['groupid']]['allowpostverify'] || $setting['workflowid']) {
$_POST['info']['status'] = 1;
}
$info = array();
foreach($_POST['info'] as $_k=>$_v) {
if($_k == 'content') {
$_POST['info'][$_k] = strip_tags($_v, '


卓越飞翔博客
上一篇: PearDownloader.js一款能下载加速的js组件
下一篇: PHPCMS V9去除只有VIP才能投稿的限制
留言与评论(共有 0 条评论)
   
验证码:
隐藏边栏