<
Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /www/wwwroot/admei.ganji.au/help.php on line 17

Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /www/wwwroot/admei.ganji.au/help.php on line 17
Help Documentation - ADMEI CMS

Help Documentation

ADMEI CMS Features & Theme Development Guide

Backend Features

Article Management

Bilingual (CN/EN) article publishing and category management

Product Management

Product display, pricing, and inventory management

Slide Management

Homepage banner slide management

Message Management

Customer message collection and notifications

Module Management

Blog, Shop, Form modules toggle

API Interface

RESTful API for Mini Program/App

Company Info

Company contact, working hours, etc.

Theme Management

Upload/switch WordPress format themes

User Management

Multi-role permission management

WordPress Theme Format

ADMEI CMS is fully compatible with WordPress theme format, you can upload any WordPress theme:

Required Files

FileDescriptionExample
style.cssTheme header infoTheme Name: My Theme
index.phpMain template fileWebsite main page

Optional Files

FileDescription
functions.phpTheme functions file
screenshot.pngTheme screenshot
header.phpHeader template
footer.phpFooter template
sidebar.phpSidebar template

Theme Development Guide

1. Create Theme Folder

Create theme folder in themes directory:

/themes/my-theme/
├── style.css
├── index.php
├── functions.php
└── screenshot.png

2. style.css Header Format

/*
Theme Name: My Custom Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A custom theme for ADMEI CMS
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: responsive, bilingual, custom
Text Domain: my-theme
*/

3. Basic Theme Template

<?php
// 引入配置
require_once dirname(__FILE__) . '/../../../config.php';

$pdo = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME, DB_USER, DB_PASS);
$pdo->exec("SET NAMES utf8mb4");

// 获取数据
$slides = $pdo->query("SELECT * FROM admei_slides WHERE status=1")->fetchAll();
$products = $pdo->query("SELECT * FROM admei_products WHERE status='published'")->fetchAll();
?>

<!DOCTYPE html>
<html>
<head>
    <title><?php bloginfo('name'); ?></title>
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.css">
</head>
<body>
    <header>
        <h1><?php bloginfo('name'); ?></h1>
    </header>
    
    <main>
        <?php foreach($slides as $slide): ?>
        <div class="slide">
            <img src="<?php echo $slide['image']; ?>">
        </div>
        <?php endforeach; ?>
    </main>
</body>
</html>

4. Available Functions

FunctionDescription
bloginfo('name')Site name
bloginfo('description')Site description
bloginfo('template_url')Theme directory URL
bloginfo('url')Site URL

5. Database Tables

TableDescription
admei_articlesArticles
admei_productsProducts
admei_categoriesCategories
admei_slidesSlides
admei_companyCompany info
admei_messagesMessages

API Documentation

Get API Key

Login to Admin → API → Create API Key

API Endpoints

EndpointDescription
/api.php?request=articlesArticle list
/api.php?request=productsProduct list
/api.php?request=categoriesCategory list
/api.php?request=slidesSlide list
/api.php?request=companyCompany info
/api.php?request=settingsSite settings

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://admei.ganji.au/api.php?request=company

Response Example

{
  "success": true,
  "data": {
    "name": "ADMEI 公司",
    "name_en": "ADMEI Company", 
    "phone": "0434 488 888",
    "email": "info@admei.net",
    "address": "墨尔本澳大利亚",
    "address_en": "Melbourne, Australia"
  }
}

Quick Start

Step 1: Install Theme
  1. Download WordPress theme (.zip)
  2. Go to Admin → Themes
  3. Click Upload Theme
  4. Select zip file and install
Step 2: Add Content
  1. Add articles/products in Admin
  2. Set company info
  3. Upload slide images
  4. Configure API (optional)