Organization of folders and files
upgraded to 0.4.3.1
X3CMS has a simple structure derived from Kohana (2.x).
[cms] the application folder
[apis] contains RESTful API
example_api.php
[config]
config.php
[controllers]
[admin] contains all admin controllers
[public]
ajax_controller.php
api_controller.php
error_controller.php
msg_controller.php
search_controller.php
x3admin_controller.php
[private]
login_controller.php (for users in users table, if you don't need delete it)
logout_controller.php
msg_controller.php
search_controller.php
x3admin_controller.php
...
you can create new folders for personalized areas
this folders can contain your controllers or a copy&paste of public or private folder contents
[files] application files
[api_cache] here X3 stores cache of API calls
[files] here X3 stores all files which not have another place
[img] here X3 stores all images
[js] contains javascript files needed
[media] here X3 stores all Media files
[template] here X3 stores all .html and .htm files
[tmp] here X3 stores cache files
...
you can create other folder you need where you can store particular files
...
sitemap.xml here X3CMS store informations for Search Engine
[helpers]
AdmUtils_helper.php some useful function for administration
[models] contains all X3 admin models
[views]
[admin] contains all admin views
[public] contains all public views
[private] contains all private views
...
empty_view.php
[files]
[files] contains all global files like: flags, fonts, loaders
[js]
[jquery] all jQuery libraries and plugins
[mootools] all Mootools libraries and plugins
[tinymce] TinyMCE WYSIWYG editor
...
all global javascript files
[INSTALL] this folder contains installation files
[plugins]
[x3flags]
[x3get_by_key]
[x3search]
[x4site_map]
...
other plugins
[generic]
[controllers]
generic_controller.php
Yes, must have the same name.
This controller is needed only if your plugin have an administration
[models]
Generic_model.php
Yes, must have the same name and the first character uppercase
This model can be needed by the administration controller and/or by the public controller
[views] here we have all the needed views by the administration controller
...
area_uninstall.php To remove the plugin only from one area
global_unistall.php To remove the plugin from all areas
install.php To install the plugin
instruction_en.txt English instructions
instruction_it.txt Italian instructions
generic_plugin.php Public controller for the plugin
[system]
[controllers]
X4Cms_controller.php
X4Msg_controller.php
X4Page_controller.php
[core]
X4Bench_core.php
X4Cache_core.php
X4Controller_core.php
X4Core_core.php
X4Db_core.php
X4Model_core.php
X4Plugin_core.php
X4Route_core.php
X4View_core.php
[helpers]
X4Auth_helper.php
X4Checker_helper.php
X4Files_helper.php
X4Form_helper.php
X4Inviter_helper.php
X4Mailer_helper.php
X4Pagination_helper.php
X4Text_helper.php
X4Time_helper.php
X4Utils_helper.php
X4Validation_helper.php
[libraries]
[phpmailerv502]
[openinviter]
[restler] this is the RESTful framework
[simplehtmldom]
[tcpdf] this is a very heavy folder (17.3 MB), if you don't need to handle PDF files can remove it
...
here you can put libraries you need
for some libraries you must write a new file (e.g. phpmailer or tcppdf)
...
gapi_library.php
google_translate_api_library.php
inviter_library.php
phpmailer_library.php
restler_library.php
simple_html_dom_library.php
tcpdf_library.php
xls_reader_library.php
[models]
X4Auth_model.php
X4Dict_model.php
X4Matches_model.php
X4Plugin_model.php
X4Site_model.php
[views]
X4Default_view.php
X4Message_view.php
[themes]
[admin] the admin theme
[default] the default theme
...
[generic_theme]
[css]
base.css
mail.css
offline.css
rtl.css for right-to-left languages
tinymce.css
...
other style sheet for special needs
[img] contains all images required by templates and style sheets
[js]
domready.js here you write the rules for the client side behaviour if you use Mootools
jready.js here you write the rules for client side behaviour if you use jQuery
[templates]
base.php
mail.php
offline.php
...
there are at least one template named base.php
then you can have all templates you want
...
favicon.ico
install.php
uninstall.php
.htaccess htaccess rules
agpl-3.0.htm Affero General Public License (html format)
CHANGELOG.txt changelog
humans.txt here you can put your message
index.php if you want after install you can remove this file or, if you need a splash page, change the htaccess rule to redirect empty calls to index.php
LICENSE.txt Affero General Public License (txt format)
page.php the bootstrap script
README.txt some info about X3CMS, requirements, features, last changes
robots.txt for search engines
Comments
There are no comments
Add a comment