User
Table of Contents
Rich user data.
Something looks broken? We accept bounties to fix them faster.
File
All you have to do after installing this extension is to create a page file in the .\lot\user
folder. Name the page according to the user name you want. For example, here I will create user data with the name @ta-tau-taufik
:
.\
└── lot\
└── user\
└── ta-tau-taufik.page
And the following is the content of the file:
author: Taufik Nurrohman
type: Markdown
status: 1
...
I am the main author of [this site](https://mecha-cms.com).
Page
User profile page can be accessed via the https://mecha-cms.com/user/ta-tau-taufik
link. To go to the log in page, remove the user name from the link:
https://mecha-cms.com/user
Note: If
.\lot\user\ta-tau-taufik\pass.data
file does not exist, then the password field will function as a password generator. You can type any password in it andpass.data
file will be created automatically.
Result
Without User Extension
The page in .\lot\page\lorem-ipsum.page
:
title: Page Title
author: Taufik Nurrohman
...
Page content.
To get the author data:
$page->author;
With User Extension
The page in .\lot\page\lorem-ipsum.page
:
title: Page Title
author: '@ta-tau-taufik'
...
Page content.
The user file in .\lot\user\ta-tau-taufik.page
:
author: Taufik Nurrohman
link: 'http://example.com'
...
Page content.
To get the author data:
<a href="<?= $page->author->link; ?>">
$page->author; </a>
Or:
$page->author;
0 Comments
No comments yet.