Responsible editor: {$username}

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

].">
search
HomeCMS TutorialPHPCMSphpcms sets article page publisher

phpcms sets article page publisher

Feb 06, 2020 pm 05:23 PM
phpcmsannouncer

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft