$comment=$this->getTree($arr,0);
hook('portal_before_assign_article', $article);
$post_tag=explode(',',$article['post_tag']);
$tag_id=array();
foreach ($post_tag as $k=>$v){
$tag_id[]=Db::name('portal_tag')->where(["name" => $v])->value('id');
}
$article['tagid']=implode(',',$tag_id);
$seocontent = msubstr_add(strip_tags($article['post_content']),0,60);
if(!$article['post_keywords']){
$article['post_keywords']=$article['post_title'];
}
if(!$article['post_excerpt']){
$article['post_excerpt']=$seocontent;
}
$this->assign('comment', $comment);
$this->assign('article', $article);
$this->assign('prev_article', $prevArticle);
portalCategoryModel | [] |
postService | {} |
articleId | 619 |
categoryId | 29 |
sql | SELECT category_id FROM bz_portal_category_post WHERE post_id = 619 |
caid | [ { "category_id": 29 } ] |
article | { "tagid": "" } |
prevArticle | Resource |
nextArticle | Resource |
tplName | xzzxpage |
category | { "id": 29, "parent_id": 28, "post_count": 0, "status": 1, "delete_time": 0, "list_order": 10000, "name": "\u9a71\u52a8\u7a0b\u5e8f", "description": "", "path": "0-28-29", "seo_title": "", "seo_keywords": "", "seo_description": "", "list_tpl": "xzzx", "one_tpl": "xzzxpage", "more": { "thumbnail": "" }, "type": "xzzx", "keyword": "", "alias": "qdcx", "home_show_web": 0, "home_show_mobile": 0, "d_id": 0 } |
arr | [] |
comment | |
post_tag | [ "" ] |
tag_id | [ null ] |
v | |
k | 0 |