Do It Yourself CMS » Blog »


Learning the structure of DiY-CMS folders and file - Part 2

  By: admin   tags Date Added: Sunday 31-10-2010 02:25 pm

In last post I explained the task that each file in the root directory handles. In this post, I will keep on explaining the rest of folders in the root directory.

[attachment:1]



Admin folder: This folder contains the folders and files that are responsible for the administration part of DiY-CMS. It contains four folders and a number of files.

admin_classes folder: contains files essential PHP classes to run the administration area.

admin_lang folder: contains the language file for the UI of the administration panel.

admin_sections folder: contains the folders responsible for the different administration sections (the menus to the left of the administration panel) , such as managing modules, themes .. etc.

admin_skin folder: contains the skin or themes for the administration panel.

conf.php: contains the values required for database connection, folders location, site administration contact details and some other values.

index.php: runs the main view of the DiY-CMS admin panel.

global.php: Global file for DiY-CMS panel area, it must be included in all files in the admin area.
sections.php: Manages sections view and management in the admin panel.


Blocks folder: This folder includes all the blocks (or menus) designed for DiY-CMS.

Html folder: Contains files required the included WYSIWYG editor in DiY-CMS.

Images folder: Includes images that used are used globally across DiY-CMS.

Includes folder: contains the necessary PHP classes to run DiY-CMS such as database connection, themes management, module control and other functionality. (I will explain the tasks that each files handle in a future tutorial).

Install folder: This folder is responsible for running the installation wizard when using DiY-CMS for the first time at your server. If installation is complete the folder name will be changed for security reasons.

Lang folder: Contains the languages files for DiY-CMS interface.

Modules folder: Contains modules folders.

Plugins folder: Contains DiY-CMS plug-ins folders and files.

Themes folder: Contains DiY-CMS themes.

Upload folder: This folder is used for file upload. It should be the only place for file upload. This will make data transfer or upgrade easier for the end-user.

Please let me know if there are any part of this tutorial needs to be further explained.


Tags: DiY-CMS-structure More details

Learning the structure of DiY-CMS folders and file - Part 1

  By: admin   tags Date Added: Wednesday 20-10-2010 06:13 am

When I created DiY-CMS I made number of tutorials explaining how to manage and use DiY-CMS. Those tutorials were tailored the general user of CMS, a user who has no or little programming knowledge. Since that series of tutorials is complete, I will be starting another series; a one that is made specifically for developers who whish to develop DiY-CMS to create modules or plug-ins for DiY-CMS, or modify in any way they wish. In basic, this tutorials series is mainly for developers with sound programming language knowledge.

I will start explaining the general structure of folders and files of DiY-CMS. Then I will write number of tutorials detailing the best way to program a plug-in. I will then explain how to program a module and the best practices that one should use for programming.

In this tutorial I will start with the first part of explain the folders and files structure of DiY-CMS. I will explore the folders one by one and explain the files they contain and their main functions.

Once you download DiY-CMS and extract the zipped file, your will find a structure similar to this:

[attachment:1]



In the first part I will explain what each file in the root folder does then I will explain the function of the rest of the folders and files in the second part.

.htaccess: contains information about url re-write.

control.php: provides a user interface to manage modules from one place.

filemanager.php: renders image files, particularly avatar, thumb images and can be used to render any kind of image.

global.php: This file is a global file, meaning that it must be included in all files of DiY-CMS. It manages the inclusion of the necessary files to run DiY-CMS, such as files responsible for database connection, theme selection or user authorisation. By default all modules have this file included, so you do not have to include it in any module file you would like to program.

index.php: this the index file of DiY-CMS. It displays the first page of DiY-CMS to the user.
licence.txt : the licence of DiY-CMS. Since DiY-CMS is an open-source program, (GNU GENERAL PUBLIC LICENSE) GPL licence is used.

mod.php: this file manage DiY-CMS modules display. It is responsible for reading the general layout of any opened module.

online.php: retrieve the number of people online and their location in the DiY-CMS.

robots.txt: communicates with search engine crawlers and tells them which part of DiY-CMS to access and not to access.

In the second part of this tutorial I will explore the contents of admin folder.


Tags: file-structure, diy-cms More details

How to install DiY-CMS manually

  By: admin   tags Date Added: Thursday 14-10-2010 03:13 am

If you ever ran into an issue during the installation process of diy-cms this blog will solve your problems using the good old manual way. In this blog I will explain how to install DiY-CMS on the local server on your website manually and without the built-in installation wizard.


First of all we need to create a database using phpMyAdmin. Open phpmyadmin and then create a database as shown in image 1 below. Make sure that you select the utf-8 encoding to both database encoding and connection collation. This is to ensure that DiY-CMS will function correctly when displaying non-English characters or using a different language such as Arabic, Hebrew, Chinese or other languages.

[attachment:1]
Image 1



Second step: click on import at the top of the page. Then import this file “install/install.sql” to the database as shown in image 2.


[attachment:2]
Image 2




Third step: Remove install folder from the DiY-CMS folder.

Forth Step: open file “admin/conf.php” and replace the values between the curly brackets {} (along with the {} themselves} with the appropriate values:

$CONF['dbname'] = "{server_db}"; // Database name
$CONF['dbuser'] = "{server_un}"; // Database user
$CONF['dbpword'] = "{server_pass}"; // Database password

$CONF['site_path'] = "{path}"; // Path to your site
$CONF['upload_path'] = "{uppath}"; // Path to the upload folder
$CONF['site_url'] = '{sitelink}'; // website URL
$CONF['site_mail'] = "{sitemail}"; // Website Email
$CONF['site_title'] = "{sitetitle}"; // Website Title
$CONF['cookie_domain'] = '{domain}'; // Website URL


Final Step: At this stage you would be able to login to your website using these credentials:
Username: admin
Password: admin

Change your password to whatever you want then customize the CMS to your needs.

I hope this tutorial was useful.


Tags: install, manual More details

Pages
 1 
2 3 > »