Home > CMS Tutorial > PHPCMS > body text

phpcms sets article page publisher

王林
Release: 2020-02-06 17:23:48
Original
1951 people have browsed it

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'];
Copy after login
Copy after login

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);
        }
Copy after login

. 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']) {
Copy after login

near line 320. Add

$username=$systeminfo['username'];
Copy after login
Copy after login

in front of it. Step 2: In the template of the generated page, add the publisher information

<p class="eidtor" >责任编辑:{$username}</p>
Copy after login

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template