Folders Structure
Now we have only two root folders - users and usersc. The first is core, and the second is users customized. If we want to change something we need to copy files from core to custom folder and change it. I think, such solution looks rough. We need to implement MVC pattern.
In well-coded systems developer doesn't need to change core files. He using existing functions on front-end to generate static content and hooks to change something in admin panel. That's why I think, that WordPress folders structure is perfect (wp-admin and wp-includes is a core folders that never edit because it always updates, and wp-content - for a user's themes, plugins and content).
How I see UserSpice folders structure:
▣ core - CMS core files (api, cron, helpers ...).
▣ admin - back-end files needed for displaying admin panel.
▣ plugins - folder for plugins (dbman, demo, fileman ...).
▣ themes - main site templates (bs4, default, light ...).
▣ uploads - folder for user's content (avatars, images and others).
This structure is approximate, but it best description of separation core files from user edit content. If new update exist, it rewrite core folder, but don't touch for example user's template or plugin.
With such folders structure we able to create own folders, for example pages and get links like mysite.com/pages/myfile.php. The file content may look like this:
We just include header and footer from theme, and main code is between this includes (code in example taken from Anchor CMS page.php file).
If someone has ideas about how folders structure must look, please comment.
Now we have only two root folders - users and usersc. The first is core, and the second is users customized. If we want to change something we need to copy files from core to custom folder and change it. I think, such solution looks rough. We need to implement MVC pattern.
In well-coded systems developer doesn't need to change core files. He using existing functions on front-end to generate static content and hooks to change something in admin panel. That's why I think, that WordPress folders structure is perfect (wp-admin and wp-includes is a core folders that never edit because it always updates, and wp-content - for a user's themes, plugins and content).
How I see UserSpice folders structure:
▣ core - CMS core files (api, cron, helpers ...).
▣ admin - back-end files needed for displaying admin panel.
▣ plugins - folder for plugins (dbman, demo, fileman ...).
▣ themes - main site templates (bs4, default, light ...).
▣ uploads - folder for user's content (avatars, images and others).
This structure is approximate, but it best description of separation core files from user edit content. If new update exist, it rewrite core folder, but don't touch for example user's template or plugin.
With such folders structure we able to create own folders, for example pages and get links like mysite.com/pages/myfile.php. The file content may look like this:
PHP Code:
<?php theme_include('header'); ?>
<section class="content wrap">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1><?php echo page_title(); ?></h1>
<?php echo page_content(); ?>
</div>
</div>
</div>
</section>
<?php theme_include('footer'); ?>
We just include header and footer from theme, and main code is between this includes (code in example taken from Anchor CMS page.php file).
If someone has ideas about how folders structure must look, please comment.