Responsible editor: {$username}
]."/> Responsible editor: {$username}].">Home >CMS Tutorial >PHPCMS >phpcms sets article page publisher
Step 1: Modify the content_model.class.php file
1. Add the article part in the add_content function
On line 222, add
$username=$systeminfo['username'];
in front of the generated static page and change it to
$username=$systeminfo['username']; //dhs //生成静态 if(!$isimport && $data['status']==99) { //在添加和修改内容处定义了 INDEX_HTML if(defined('INDEX_HTML')) $html->index(); if(defined('RELATION_HTML')) $html->create_relation_html($catid); }
. In addition, if you want to update this information when modifying, you can add
//生成静态 $html = pc_base::load_app_class('html', 'content'); if($urls['content_ishtml']) {
near line 320. Add
$username=$systeminfo['username'];
in front of it. Step 2: In the template of the generated page, add the publisher information
<p class="eidtor" >责任编辑:{$username}</p>
here, which will be displayed at the bottom left of the article. , not in line with custom. Right float can be written in CSS files. If you don't want to change the CSS file. It can be written like this
<p class="eidtor" style="float:right" >责任编辑:{$username}</p>
Related article tutorial sharing: phpcms tutorial
The above is the detailed content of phpcms sets article page publisher. For more information, please follow other related articles on the PHP Chinese website!