Official website: diy.seowhy.com Document :www.kancloud.cn/lyc_echo/di…
Step 1: Define constants
DB_PATH Database directory 2. PROVIDER nameCopy the code
Step 2: Implementation method
1, main. PHP
AppClient class
ConnectProvider method (reading database fields)
Example:
- Dedecms paradigm
- WordPress paradigm
2, the provider. PHP
Methods must be implemented:
The field name | instructions |
---|---|
getPosts | Get a list of data |
getCategories | Get a list of categories |
getCategory | Get classification details |
getArticles | Get a list of articles |
getArticle | Get article details |
getProducts | Get a list of products |
getProduct | Get product details |
getPages | Get a single page list |
getPage | Get single page details |
getComments | Get a list of comments |
saveComment | Add/modify comments |
commentAttitude | Thumbs up or thumbs down comments |
getMapping | To obtain a sitemap |
getSiteMapIndex | Get sitemapIndex |
_getRelations | Access to relevant products |
_getSubCatIds | Get all of the sub-categories |
getThumb | Formatting thumbnails |
convertArticle | Formatting the article returns parameters |
convertProduct | Format the product returns parameters |
convertCategory | Formatted classification |
convertPage | Formatting single page |
convertComment | Formatting messages |
parseContent | Formatting content |
getParams | Get extended fields |
Visual drag component production:
Support various CMS systems (available)
Maintain a web site data can be published on a variety of different ends