The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
UserSpice 5 Folder Structure - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: General (https://userspice.com/forums/forumdisplay.php?fid=20) +--- Forum: UserSpice 5 - Roadmapping the Future (https://userspice.com/forums/forumdisplay.php?fid=31) +--- Thread: UserSpice 5 Folder Structure (/showthread.php?tid=1289) |
UserSpice 5 Folder Structure - Bogdan - 01-05-2019 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: PHP Code: <?php theme_include('header'); ?> 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. RE: UserSpice 5 Folder Structure - mudmin - 01-06-2019 I think you may have missed the point of UserSpice. UserSpice, at its core, (from the perspective of the person using it to develop an application) is essentially 2 lines of code. 1. It's a call to an init file that sets everything up. 2. It's a call to a securePage function that enforces permissions and security. UserSpice takes a "take it or leave it approach beyond that. Don't like our DB class? Use meekro...write your own...do whatever you want. UserSpice doesn't care? Want to make a login form with zero security? Write an input that literally just matches the input with the username in the db...no password, and say the person enters "admin" and you set $_SESSION['user']=1; and as far as UserSpice is concerned, you're logged in. I can definitely appreciate MVC and all the other user management systems out there, but the reason that UserSpice has over 1.5 million downloads by people in every nation on earth is because it is so flexible. If your page has the 2 lines mentioned above...nothing else matters. You're welcome to use as much or as little of the UserSpice code as you want. |