At the beginning

At the beginning god created superadmin.

 

Nothing can be edited in DRG CMS without being logged in. And for the security reasons DRG CMS has no default built in user. Therefor in order to use DRG CMS, first user must be created. The user will also get superadmin role, which means it will be able to perform any data entry operation.

 

In order to simplify creation of first user rake task drg_cms:at_the_beginning is available. Go to application root directory and type:

 

rake drg_cms:at_the_beginning
# or maybe in production
env RAILS_ENV=production bundle exec rake drg_cms:at_the_beginning

 

You will be presented with simple data entry dialog which will require to enter your superadmin username and define it's password twice.

 

DRG CMS is now ready for data entry. If everything went OK, start your Rails application server, open Internet browser and type in address http://localhost:3000/cms/login (or whatever your web server url is). Now enter username and password which you have defined in previous step. Again if everything went OK, you should be presented with CMS link at the top of the page. Click on it and main CMS menu bar will appear.

 

Congratulations. You have successfully passed first step creating your web site with DRG CMS.

 

Experienced users may start creating site document, menu, design and page data. Non experienced users run drg_cms:seed rake task and create initial site documents.

 

To create initial site documents execute:

rake drg_cms:seed 

 

Start Rails server and point browser url to server root address. You should be presented with simple web site and would be able to update top menu, edit main data document and footer document with CK editor. 

 

There is little piece of code which is still missing. Although CK editor already works as HTML editor, it is very complex piece of program and needs to be configured properly to gain 100% usability. If you look at site document, you will see this settings.

 

ckeditor:
 config_file: /files/ck_config.js
 css_file: /files/ck_css.css

 

Describing everything in this two files would take another book and it can be found on this web site. First file configures default values for CK editor, second file defines CSS elements used inside CK editor edit area. For starter, you can download them from this site. ck_config.js and ck_css.css. In order to save documents to /files directory you should first create /public/files directory and define default folder permission document for /files directory.

 

One of the Murphys laws says: For 90 percent of program you need 10 percent of time. For the remaining 10 percent of program, remaining 90 percent of the time will be spent. Congratulations. You have just spent your first percent of time needed to create functional web site.


Last update: 08.05.2018