Home / Blog
2019-01-10 00:00
64992
0
2
Filesystem: copy these 5 files anywhere on your web eg /blog/ :
/blog/.htaccess -- catch all url to index.php
/blog/index.php -- start of the blog
/blog/blog.css -- customer css if needed
/blog/blog.js -- customer js if needed
/blog/file/ -- folder for attachment files
Config the blog via eg /blog/index.php:
$cms_run = 0; // do not run Topnew CMS by default
include '../boot.php'; // call Topnew MVC (eg need session etc)
$init = [
// optional customerized page controller
'page' => [
'home' => '.App.Controller.News.Home',
'cat' => '.App.Controller.News.Cat',
'topic' => '.App.Controller.News.Topic',
],
// optional default url root if not /blog/
'url_root' => '/blog/',
// optional default SQL to get a user profile in your database
'sql_user' => "SELECT * FROM user WHERE id = :id",
// current session user id eg $uid (generated by Topnew MVC)
'sess_uid' => $uid,
// have to have next line, no change
'file_root' => __DIR__,
// access: 1. owner, staff+fans only | 2. read only | 3. reply need auth | 4. read post free
'blog_acs' => 3,
// blog category base eg 1801 upto 1899 so that you can have max 99 blogs in one database
'blog_cat_base' => 1811,
// how you call your blog category, eg cat, category, department, group etc
'blog_list_catName' => 'Category',
// how you call your blog home page, eg Blog Home etc
'lang_home' => 'Home',
// max articles per page on home page or category page etc
'pgsize' => 5,
// how you call a topic, eg topic, story, article etc as in /blog/story/story-title-id
'url_tid' => 'story',
// how you call a category in url eg category, cat etc as in /blog/category/category-name
'url_cat' => 'cat',
// if you want to use random shared img for some category if no images specified for a topic
'shared_img' => [
]
];
// Start the blog:
make('Topnew.Blog.Blog', $init)->main();
Back «
Topnew Blog, Forum, Support v 2018 Released
Next »
Blog Docs 2 - Database Setup
Comments
Leave a commentEdit comment