Detailed discuz!7.0 data invocation function

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

discuz!7.0 is Sing (Comsenz) company released in December 2008, a forum BBS construction station products. discuz! 7.0 enhanced the Forum's data invocation function, not only retained the previous call to the basic forum data, but also increased the script module calls, can be created by the various calls aggregated in a new module or sidebar for aggregation of calls to display.

The settings are located in the Forum background => tool => data call, as shown in the following figure:

  

First, create the forum basic data call

Click on the navigation above "add", will appear drop-down menu, which includes all the call items can be created: Topic list, Forum list, member ranking, BBS statistics, subject attachment, sidebar scheme, customization, as shown in the following figure:

  

Now, for example, call the member ranking, detailing how to create a call.

Click "Add", select "member ranking", the Setup interface appears. The Settings page is divided into two parts, the data call template and the preview display area, the data invokes the basic information and the calling rule's settings area.

1, the data call template and preview of the display area, which mainly shows the data call display template, and the call Structure preview display, as shown in the following figure:

  

In the data Call Template display area, you can click the item listed on the input box directly by clicking on the current cursor added to the input box. In the input box you need to write the template for display based on the information above, as shown in the following illustration:

  

After entering, click "Preview", the data call template display is refreshed, the preview area appears above, including the internal calling code, the external calling code, and the call Data preview, as shown in the following illustration:

  

Internal Call Code: Copies the code to the appropriate location in the Forum template file to display the called data.

External calling code: Copies the code to the appropriate location in your Web site file to display the called data.

2, the data calls the basic information and the invocation rule's setting area, this area mainly sets up the data invocation basic information and the invocation filter rule, as shown in the following illustration:

  

Module Name: Enter a memorable name that can be used to invoke the module for this data, "_" as a separator for categories such as topic List _*, module script _*.

Description: A brief description of the current data invocation.

Data Cache Time (sec): Because some sort retrieval operations are more resource-intensive, the data caller uses caching technology to implement periodic updates of the data, and the default value 1800,0 is not cached (extremely consuming system resources). If left blank, use the value of the base setting.

Start data rows: If you want to set the starting number of rows, enter a specific number, 0 to start from the first line, and so on.

Show number of data bars: Set the number of user entries to display at once, set to an integer greater than 0.

Link Open Location: Sets the location where the link opens, open in the current window, open in a new window, and open in the right column.

User Sort by: sets which field or method to sort the user.

Force character conversion: casts the text for the output of the data call into the coded code.

Fill in the above information, you can click "Preview" to see if the call information is correct, and then click "Submit", then create a complete call. You can click on the "Manage" view on the navigation, as shown in the following illustration:

  

The "member ranking" in the "Member ranking _LGT" Call just added here already exists as a taxonomy, and if you add a "member ranking" call, the two calls are grouped into one class at the same time.

Other calls, such as List of topics, List of forums, forum statistics, subject attachments, custom invocation methods, are similar to the call methods for member rankings, and are no longer repeat. Specifically, the custom call allows you to write HTML code freely, or you can insert an added call into a custom call to form a flexible invocation, so that calls that require adding custom code are added.

Ii. calls to add module scripts

Click on the "module script" above to navigate to the list of currently available module scripts, as shown in the system default module script:

  

Each module script has its own characteristics, add settings are different, now take my assistant as an example, detailing how to create a module script call.

Click Add after "My assistant" and the Add Settings page appears as shown in the following illustration:

  

Module Name: Enter a memorable name that can be used to invoke the module for this data, "_" as a separator for categories such as topic List _*, module script _*.

Description: A brief description of the current data invocation.

Data Cache Time (sec): Because some sort retrieval operations are more resource-intensive, the data caller uses caching technology to implement periodic updates of the data, and the default value 1800,0 is not cached (extremely consuming system resources). If left blank, use the value of the base setting.

Force character conversion: casts the text for the output of the data call into the coded code.

Fill in the above information, you can click "Preview" to see if the information is correct, as shown in the following figure:

  

Internal Call Code: Copies the code to the appropriate location in the Forum template file to display the called data.

External calling code: Copies the code to the appropriate location in your Web site file to display the called data.

Then click Submit to create a call to complete a module script. You can click "Manage" on the navigation to view the call you just added.

Other module scripts are called with the same method, and they are no longer repeat. Specifically, the free Code script is free to write HTML, discuz! Code, so calls to add custom code add the call to this module script.

Third, add sidebar scheme

Sidebar is displayed in the first page or the Information bar on the right side of the topic list, sidebar display information provided by sidebar, sidebar scheme is to create a good forum call to add in, in accordance with the order of each call to arrange the display of the collection.

Add Sidebar scheme, click "Add" in the navigation bar, select "Sidebar Scheme", the Add Settings page appears, as shown in the following image:

  

Select one or more of the calling modules in the list box on the right "current data invocation module" and click "Select" To add the selected module to the left of the "Selected data Call module" list box. You can then select one of the items in the list box of the selected data invocation module on the left, and adjust the order of the modules by clicking the Move up or Move Down button. When you are ready you can click "Preview" to see the effect, as shown in the following figure:

  

Then continue to fill out the following items:

Module Name: Enter a memorable name that can be used to invoke the module for this data, "_" as a separator for categories such as topic List _*, module script _*.

Description: A brief description of the current data invocation.

Data Cache Time (sec): Because some sort retrieval operations are more resource-intensive, the data caller uses caching technology to implement periodic updates of the data, and the default value 1800,0 is not cached (extremely consuming system resources). If left blank, use the value of the base setting.

Then click Submit to create a call to complete a sidebar scheme. You can click "Manage" on the navigation to view the call you just added.

Four, set sidebar display

Click on the "sidebar" in the navigation bar, select the "Global", the Settings page appears, as shown in the following image:

  

Here to set the forum global whether the sidebar, select "Yes" to enable the sidebar, "No" to close the sidebar.

Then set the sidebar for the home page and theme list page to display what data.

Click the "sidebar" in the Navigation bar, select Ze "Home", the Settings page appears, as shown in the following image:

  

Sidebar settings: Select the sidebar scheme for the current page, and the sidebar scheme can be managed in a data invocation.

Sidebar Data Cache Time (sec): Because some sort retrieval operations are more resource-intensive, the data caller adopts caching technology to realize the regular updating of the data, and the default value 1800,0 is not cached (extremely consuming system resources). If left blank, use the value of the base setting.

You can select an existing forum scheme from the sidebar setup scheme, you can also directly check the template list below the call module needs to be displayed, set up, click "Submit" to successfully set the sidebar of the first page. As shown in the following illustration:

  

The sidebar settings for the subject List page are similar.

V. Enable external calls

In the above module invocation settings, each module call generates an "external calling code", which is a section of JavaScript code for external invocation. The open settings for external calls are set in the navigation bar, as shown in the following illustration:

  

VI. Import Export Module calls

1. Export

Click "Manage" in the navigation bar, check the box in front of the module, click "Export" below, will prompt to download, then save. As shown in the following illustration:

  

  

2, Import

Click "Import" in the navigation bar to enter the Import page, as shown in the following illustration:

  

Click Browse, select the files you want to import, and then select the way to import:

1 prompt when an existing is found: prompts to stop importing when the calls to be imported are the same as the existing call identities.

2 ignores a unique identity that already exists: when the call to be imported and the existing call identity are not imported, the invocation with the same name will not import, and the import must be successful.

3 Overwrite a unique identity that already exists: when the call to be imported and the existing call identity are identical, the call with the duplicate name will be overwritten, and the import must be successful.

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.