Thoughts on rainbow

Source: Internet
Author: User

I 've been watching rainbow these days. Now I 've basically read it again.CodeAnd changed many of my previous programming ideas. Maybe the efficiency of rainbow is not high, but its code is too elegant. Many of my friends' blogs have introduced some of its basic features. Below I will share some of my experiences and confusions.

1. Because rainbow uses a lot of classes that are extended from the Framework base class, you must pay attention to the inheritance relationship. For example, when developing a rainbow module, you must inherit portalmodulecontrol; otherwise, your control will not work properly.

2. when deleting a module, you must use this module on all pages. Otherwise, the trigger may conflict and the module cannot be deleted normally, however, in this case, it seems that the database-related stored procedures are generally deleted, and may be considered a bug of rainbow.

3. Rainbow uses a large number of custom data types, such as htmleditordatatype. Its class definition is located in the datatypes folder under the UI folder and generally inherited from basedatatype.

4. when multi-site configuration is used, the system creates an account with admin username and password by default, and gives management permissions. The home and Admin columns are also created, these are hard-coded in configuration/portaldb. CS, you can modify it here.

5. Do not change the name of the admins user group easily, because portalsecurity. isinroles ("Admins") is used in some of its source code to determine the Administrator permission. The changes may cause inconsistency.

6. The problem that workflow cannot work. I found the answer from a foreign Forum

You have to make to changes in 2 different files:
Admin/modulesetting. aspx. CS & UI/webcontrols/portalmodulecontrol. CS

In portalmodulecontrol. Cs +-line 56
From: Private bool _ supportsworkflow = false;
To: Public bool _ supportsworkflow = false;

In modulesetting. aspx. Cs +-line 365
From: If (PM. supportsworkflow)
To: If (PM. _ supportsworkflow)
In addition, you need to add such a supportsworkflow = true in the class constructor of each module;

Some confusions:

1. the default content page layout is three columns, which can be adapted to the simple page, but it is a little complicated. For example, the above is two columns, and below is the three columns, the above two columns are easy to handle. The width on the left is wider and the width on the right is narrower. It will automatically expand to the right in the left and middle pane, but the bottom will not work, because the left side is relatively wide, the three columns below will be squeezed to the right, which is very ugly. Besides changing the pane to five (the two above and the three below, but there is no way to deal with the simple pages behind it). I don't know if there is any other way? Http://bbs.xzfad.com/jsj)

2. if the page is fancy, the title and background styles in each tag on each page are different. In this case, it seems that it cannot be processed at all, it seems that this label-level user-defined style is not provided in rainbow. (Such as http://bbs.xzfad.com/demo)

3. there seems to be a problem with the access permission control of the module. When a new module is added to the page, there is no problem with the guest access. However, if you change the access permission once, you can select all user groups and unverified users for access, I still cannot display it when using guest for access. I haven't found any problems in the Code. Do you know anyone has encountered this situation?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.