xtpl类读入模版文件(用HTML写),然后给模版里的变量赋值,然后xtpl把内容写在文件里,通过HTTP显示在浏览器端。" />






类似这个公式:template + data = output


Writing a custom module is pretty straight forward. Most modules will contain a primary class representing the information contained in the module such as Account.php, Opportunity.php, etc. If your module will be displayed in a tab then you will want and index.php for your module and probably a ListView.php/html to display a list of objects. You will also need to add the module to the module.php.

If your module contains information that is related to other modules and you intend to display the information in the other module, you will need to define a SubPanelVIew for your module and add it to the other module’s DetailView.

If your module contains information you want to display, add or edit then you will need a DetailView to display the information on a given record and an EditView to edit the data.

You will also want to add a language file in your module to store UI text.

The very best way to build a module is to copy one that already exists and weed out what you don’t need. This has two effects – first it helps you learn what goes into a module and second it is a faster way to get a module structure together.

A couple of recommendations before starting:
1. Read through index.php and understand it.
2. Same for SugarBean since this is the parent of your data object
3. Understand the template system XTemplate
4. Read through includes/util.php

A Good Way to send sms.

I know a good way to send SMS via a web portal is first to make a simple sql query to find all customers / leads / contacts to send SMS, and then write a mesage to send. Then, the phonenumbers and the message is added to a textfile. The final next step is to upload the file to the service provider via ftp. The service provider hereby sends out the SMS automatic.

This is a fast and secure service which service providers often offers for a low cost. If this feature is added, people doesn`t have to read their mail all the time, and the person who sends messages also know it soon will be read.


转载请注明:易客CRM官方博客 » 研究SugarCRM(一)

喜欢 (0)or分享 (0)