Responsible editor: {$username}

]."/> Responsible editor: {$username}

].">

Home >CMS Tutorial >PHPCMS >phpcms sets article page publisher

phpcms sets article page publisher

王林
王林Original
2020-02-06 17:23:481985browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn