Liferay Portal 6 Enterprise Intranets phần 6 pptx

68 402 0
Liferay Portal 6 Enterprise Intranets phần 6 pptx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Blogs, WYSIWYG Editors, and RSS [ 320 ] As a normal user, if you have the proper permission, you would be able to congure other users' remote delivery of alerts and announcements. The following are simple steps to show you how it's done: 1. Go to Manage | Control Panel under the dock bar menu. 2. Select Users under the category Portal of Control Panel. 3. Locate a user, say "Lotti Stein", and click on the icon Edit of the Actions menu next to the user. 4. Go to Miscellaneous | Announcements, you would be able to congure the user's remote delivery of Alerts and Announcements. Why Announcements portlet? The following are the main features of the portlet Announcements. • Being congurable and supporting unlimited number of announcement types. • Delivery to scopes including general (that is, portal instance), communities, and roles. • Delivery mechanisms include Email, SMS, and Website. Note that Website delivery is achieved simply by adding the portlet to any page accessible to the user. • Scheduled delivery—each entry has a display date and an expiration date. • Readable tracking, website delivery tracks time-stamped read status per user, per entry on. • Subscription control per user and per announcement type. • Broadcast control of announcements. Chapter 6 [ 321 ] What's happening? The portal sets the following items for e-mail notication announcements by default in portal.properties. • announcements.email.from.name=Joe Bloggs • announcements.email.from.address=test@liferay.com • announcements.email.to.name= • announcements.email.to.address=noreply@liferay.com As shown in the preceding code, e-mail notication settings are congured. The e-mail FROM name is Joe Bloggs and the e-mail FROM Address is test@liferay. com . The e-mail TO name is empty and the e-mail TO Address is noreply@ liferay.com . You will denitely be able to override these settings in portal-ext. properties . In addition, the portal has some specied types of announcements as default settings, as shown in the following lines in portal.properties: announcements.entry.types=general,news,test announcements.entry.check.interval=15 As shown in the preceding code, the default types of announcement entries are general, news, and test. The property announcements.entry.types sets the list of announcement types, while the property announcements.entry.check.interval sets the interval on which the Check-Entry-Job will run. The value 15 is set in one minute increments. Note that the display text of each announcement type, especially custom announcement type, could be set in $PORTAL_WEB_INF_HOME/classes/content/ Language-ext.properties . How do we achieve it? The following is just an example. Let's say that you are required to set the announcement types as general, news and updates. You can rst override the property announcements.entry.types in portal-ext.properties as follows. announcements.entry.types=general,news,updates Then create a folder named content under the folder $PORTAL_WEB_INF_HOME/ classes , and create a le named Language-ext.properties in the folder $PORTAL_ WEB_INF_HOME/classes/content . Last but not least, add the following line at the end of the le Language-ext.properties. updates=Updates After restarting the application server, you would see the preceding changes on the portlet Announcements. Blogs, WYSIWYG Editors, and RSS [ 322 ] Assigning permissions There are two kinds of permissions that you can assign; namely, permissions on portlets and permissions on entries. The following table shows permissions on the portlets Announcements and Alerts. The role Community Member may set up all permissions (marked as 'X'): View, Conguration, and Add Entry. On the other hand, the role Guest may set up the permission View. By default, the role Community Member has the permission action View (marked as '*') just like the role Guest. Action Description Community Guest View Ability to view the portlet X, * X, * Conguration Ability to congure the portlet X Add Entry Ability to add entry X As you can see, "Lotti Stein", a member of the Guest community, doesn't have the permission Add Entry. This means that the tab "Manage Entries" is invisible for "Lotti Stein". If we want "Lotti Stein" to have the ability to add entry, it can be achieved by following these steps: 1. Locate the portlet Announcements in the page RSS. 2. Go to More | Conguration | Permissions on the top-right of the portlet. 3. Check the permission Add Entry under the role Community Member. 4. Click on the Submit button when you are ready. The following table shows permissions on entries. The role Community Member may set up all permissions (marked as 'X'): View, Update, and Delete, whereas the role Guest may set up the permission View. By default, the role Community Member has the permission action View (marked as '*'). On the other hand, the role Guest can have the permission View only on entries that have been scoped to general (that is, current portal instance). Action Description Community Guest View Ability to view the entry X, * X Update Ability to update the entry X Delete Ability to delete the entry X Chapter 6 [ 323 ] Obviously, "Lotti Stein", a member of the role "MB Topic Admin", doesn't have the permissions Update and Delete. This means that the icons Edit and Delete next to the entries are invisible for "Lotti Stein". Let's say that "Lotti Stein" should be able to update or delete entries, how do we accomplish it? We can do it by following these steps: 1. Log in as an admin, like "Palm Tree", and go to Manage | Control Panel in the dock bar menu. 2. Click on Roles under the category Portal of Control Panel. 3. Locate the role "MB Topic Admin", and click on the icon Dene Permissions under the Actions menu next to the role. 4. Navigate to Content | Announcements, and check the permissions View, Update, and Delete under the title Announcement. 5. Click on the Save button when you are ready. As shown in the preceding processes, permissions are assigned on all entries related to the announcements through the regular role. Of course, you can assign these permissions through the organization role or the community role. Don't forget that the scopes of the regular role, the organization role, and the community role are different. Note that permission on an individual entry isn't supported yet. What's different between two portlets? As you can see, alerts and announcements are similar. Both of them can be used to broadcast some messages to a list of users within a scope, thus providing a one-way messaging engine. Moreover, each type of alert or announcement can be styled to whatever purpose it might serve. However, in fact, they are slightly different. Announcements are the day-to-day type occurrences, where users can view the history of the announcements they received. However, there is no history view for alerts. More importantly, alerts are hidden by default—that is, the portlet Alerts is invisible to the end user unless an alert is published. Enhancement As you can see, the portlets Announcements and Alerts are similar. Both of them even share the same database table AnnouncementsEntry, distinguished only by the column alert (0 represents announcements, whereas 1 represents alerts). Thus, it would be better to merge these two portlets into one. How can we do this? Blogs, WYSIWYG Editors, and RSS [ 324 ] We can simply add the portlet conguration type with values: Announcement or Alert. If the type has the value Announcement, then the portlet would have the same look and feel as that of the portlet Announcements. Otherwise, the portlet would have the same look and feel as that of the portlet Alerts. When you navigate to More | Conguration | Setup | Current of the portlet, it will provide you with the capability to select the value of type of setup: Announcement or Alert. Of course, the portlet would be able to archive the setup under More | Conguration | Setup | Archived as well. These two portlets are not localizable. It would be useful to have the text content as a link to an existing journal article. Then we could get the benets of localization, workow, versioning, templating, and so on. With such a design, these portlets would be appropriate for Newsletter usage. Using RSS effectively Generally speaking, a web feed is an XML-based document containing content items with web links to longer versions. For example, common sources for web feeds may include news websites, blogs, and structured information such as weather data, "top ten" lists of hit tunes to search results, and so on. RSS and Atom are two main web- feed formats. The Atom applies to two standards. The Atom Syndication Format (ASF) is an XML language used for web feeds, and the Atom Publishing Protocol (APP) is an HTTP- based protocol for creating and updating web resources. In general, RSS is used to refer to the following formats: • Really Simple Syndication (RSS 2.0) • RDF Site Summary (RSS 1.0 and RSS 0.90) • Rich Site Summary (RSS 0.91) Three formats of syndication have emerged: RSS 2.0, RSS 1.0, and Atom. Which feed format do we choose? In general, these three formats are for three goals: 1. The simplest format (although extensible)—RSS 2.0: To display links to articles of a site 2. RSS 1.0: To get information on the feed. 3. Atom: Requires special software to process and has more requirements regarding the format of data. In short, RSS is an XML-based web content syndication format, in compliance with the XML 1.0 specication. Chapter 6 [ 325 ] RSS specication RSS is not a perfect format but is very popular and widely supported. Here, we briey introduce the RSS 2.0 specication. For more details related to RSS specication, refer to http://www. rss-specifications.com/rss-specifications.htm. An RSS document has an element <rss> with an attribute version at the top level. The attribute version species the version of RSS that the document conforms to. Subordinate to the <rss> element is a single element <channel>, which contains information about the channel and its contents. The following table depicts a list of the required channel elements, each with a brief description: Element Description Title The name of the channel. Link The URL link to the website corresponding to the channel. Description Phrase or sentence describing the channel. Item One item tag, at least for the content. For example, <rss version="2.0"> <channel> <title>Integration</title> <link>http://liferay.cignex.com/</link> <description>LDAP, SSO, Liferay and Alfresco full integration </description> <item></item> </channel> </rss> A channel may contain any number of items. An item represents content. The description is a synopsis of the content while the link points to the full content. For example: <item> <title>Liferay and Alfresco – RESTFul Integration</title> <link>http://liferay.cignex.com/sesame</link> <description>Integration based on REST</description> </item> Blogs, WYSIWYG Editors, and RSS [ 326 ] How does it work? Suppose there are web pages that we want to display on other websites. The set of web pages is the RSS feed. The RSS system, which publishes articles and news over the web, works as follows: • An XML le denes the RSS feed that holds the URL, title, and summary of each page to be displayed. • A user, who wants to read the feed on his/her computer, uses an RSS reader or their browser and just adds the feed with the proper command of its software. • Alternatively, a user displays the feed on a website—loading the RSS le from the provider by extracting URLs of pages and displaying titles and summaries. The user can also read them with the News Reader software or on the iGoogle page. • When visiting the website of the receiver, the script is launched rst. It recalls the RSS le from the provider's website and displays a list of news from the extracted data. • Visitors display a page from the provider by clicking on the title of the list. Summary This chapter introduced us to adding entries to Blogs, managing (that is, to view, update, and delete) entries of Blogs, and adding comments to a given entry of Blogs rst. Then it discussed how to assign permissions on the Blogs portlet and entries of Blogs. It also introduced the ways to publish blogs through the Recent Bloggers portlet and the Blogs Aggregator portlet, and also introduced us to building Blogs with the WYSIWYG editor FCKEditor. Finally, it discussed RSS and other related portlets such as the RSS portlet, Weather portlet, Announcements portlet, and Alerts portlet. In this chapter, we have learned how to: • Create blog entries • View, update, and delete blog entries • Add comments and rating on blog entries • Assign permissions on the Blogs portlet and blog entries • Publish blog entries through the Recent Bloggers portlet and the Blogs Aggregator portlet • Build blog entries with WYSIWYG editors Chapter 6 [ 327 ] • Congure WYSIWYG editors • Use RSS including the RSS portlet, the Alert portlet, the Announcement portlet, and the Weather portlet. In the next chapter, we're going to roll out to others teams, while discussing details about their communities and relationships with organizations. Roll Out to Other Teams In the intranet website "bookpub.com" of the enterprise "Palm Tree Publications", it would be nice to have the ability to build websites with communities, where employees can share interests about the communities Book Street and Book Workshop, and roll out to other teams. The communities provide teams with the ability to create and manage communities and enable their members to build different websites. The community has its own pages, which includes public pages and private pages, content management system, membership management, and permissions management. Meanwhile it would be nice if we could stage, schedule, and publish web content in our website "bookpub.com" locally or remotely through workow. As a content creator, you may update what you've created and publish it in a staging area. Then other users could review and modify it in the staging area. Moreover, content editors could make a decision whether to publish web content from the staging to live. Before going live, you may schedule web content as well. For publishing features, you might choose either local publishing or remote publishing; you may publish either the entire website or just a subset of pages. This chapter will discuss how to manage communities. It will include a discussion of how to create and manage communities, as well as how to create and manage the pages, teams, and members within a community. It will also introduce staging and publishing, workow, scheduling, virtual hosting, and a set of community tools. By the end of this chapter, you will have learned how to: • Manage communities, pages, teams, and memberships of a community • Apply site templates and page templates • Employ virtual hosting • Stage, preview, and publish websites • Manage staging workow Roll Out to Other Teams [ 330 ] • Schedule and publish remotely • Use community tools What's a community? As an administrator at the Enterprise "Palm Tree Publication", you would be required to provide an environment to roll out to other teams. Thus you may provide an environment for users to manage communities, which includes managing pages (both public pages and private pages), managing teams, assigning members, assigning user roles, and so on. What's community? Loosely speaking, a community is a special group that users in this group would share same of similar interest. In general, a community is a collection of users who have a common interest. Both roles and users can be assigned to a community, as shown in following screenshot: As mentioned earlier, an organization is a special group too. So, you may ask: What's the difference between a community and an organization? When should you use communities instead of organizations? Organizations are hierarchical in nature while communities are at. But communities give us the ability to join and invite members; organizations don't have this ability. Therefore, if you are planning to build a website and to provide the ability to join and invite members and no hierarchical structure is in need, then use communities. If you are planning to build a website and hierarchical structure is required, then use organization. In general, communities can be created and managed in two portlets. The rst portlet is Enterprise Admin Communities (portlet ID 134) in the Control Panel, the second is My Communities (portlet ID 29). Why two portlets? The portlet My Communities provides a way to navigate from community to community, which could be added to any page in current portal instance. We're going to describe the portlet Enterprise Admin Communities rst, the portlet My Communities will be introduced in the coming section. [...]... The following are the steps: 1 Download the theme ${so-theme-war} from http:/ /liferay. cignex com/palm_tree/book/0387/chapter07/so-theme -6. 0.0.1.war 2 Drop WAR file ${so-theme-war} to the folder $LIFERAY_ HOME/deploy The portal will deploy it automatically, when the portal is running 3 Click on Communities under the category Portal of Control Panel 4 Locate a community, let's say "Book Street", where... need to access the portlet Enterprise Admin Communities in the Control Panel Let's do it by following these steps: 1 Log in as an administrator, say Palm Tree 2 Go to Manage | Control Panel under the dock bar menu 3 Locate Communities under the category Portal of Control Panel 4 Click on Communities under the category Portal of Control Panel, you would be able to use the portlet Enterprise Admin Communities... category Portal of Control Panel first 3 Then locate a role, say "MB Topic Admin" 4 Click on the Define Permissions icon from the Actions tab next to the role 5 Click on the Portal | Communities link, enable the checkbox Manage Pages 6 Click on the Save button 7 As shown in the preceding processes, it grants permission Manage Pages for the role "MB Topic Admin" on all communities in the current portal. .. stated earlier, the portlet Enterprise Admin Communities is available in the Control Panel What's happening? When membership requests have been approved or denied, e-mails would be sent to requestors How to set it up you ask? Settings The portal sets the following properties in portal. properties by default communities.email.from.name=Joe Bloggs communities.email.from.address=test @liferay. com communities.email.membership.reply.subject=com /liferay/ portlet/... communities.email.membership.reply.subject=com /liferay/ portlet/ communities/dependencies/email_membership_reply_subject.tmpl communities.email.membership.reply.body=com /liferay/ portlet/ communities/dependencies/email_membership_reply_body.tmpl communities.email.membership.request.subject=com /liferay/ portlet/ communities/dependencies/email_membership_request_subject.tmpl communities.email.membership.request.body=com /liferay/ portlet/... to apply themes to the current page individually Uploading a logo As mentioned earlier, each community can have a logo as its enterprise logo Thus we could upload a logo as the enterprise logo of a community If no logo has been uploaded, then the community would use the default enterprise logo for public and private pages Let's say that you are going to upload a logo called BookStreet_logo.png on the... the theme Classic, we have the following code in $PORTAL_ ROOT_HOME/html/themes/ classic/templates /portal_ normal.vm $the_title - $company_name $community_name But in the theme so-theme, we have following code in $AS_WEB_APP_HOME/so- theme/templates /portal_ normal.vm #if ($is_signed_in)... category Portal of Control Panel, you would see a list of communities 4 Locate a community, say "Book Street", and click on the icon Join next to the right of the community, you would see that the icon Join would now become the icon Leave Leave As mentioned earlier, the portal provides the ability to allow a member of the community to leave the community For example, as a user, say "Lotti Stein", of the enterprise. .. restricted community [ 350 ] Chapter 7 Assigning permissions As mentioned earlier, the portlet Enterprise Admin Communities is available only in the Control Panel If a user like "Lotti Stein" was a member of a community like "Guest" in the current portal instance, then the user would be able to access the portlet Enterprise Admin Communities in the Control Panel, and she would have the ability to manage... Actions next to the right of the role 5 Click on the Portal | General link, enable the checkbox Add Community 6 Click on the Save button 7 Click on Applications | Communities link, enable the checkboxes: Access in Control Panel and View 8 Click on the Save button From now on, users and the members of the role "MB Topic Admin", will have access on the portlet Enterprise Admin Communities in the Control Panel . ${so-theme-war} from http:/ /liferay. cignex. com/palm_tree/book/0387/chapter07/so-theme -6. 0.0.1.war . 2. Drop WAR le ${so-theme-war} to the folder $LIFERAY_ HOME/deploy. The portal will deploy it automatically,. FROM Address is test @liferay. com . The e-mail TO name is empty and the e-mail TO Address is noreply@ liferay. com . You will denitely be able to override these settings in portal- ext. properties . In. Communities under the category Portal of Control Panel. 4. Click on Communities under the category Portal of Control Panel, you would be able to use the portlet Enterprise Admin Communities. Once

Ngày đăng: 12/08/2014, 21:20

Mục lục

    Chapter 6: Blogs, WYSIWYG Editors, and RSS

    What’s different between two portlets?

    How does it work?

    Chapter 7: Roll Out to Other Teams

    What's a community?

    Importing and exporting pages

    Updating look and feel of pages

    Bringing users into the communities

    Permissions on the portlet Enterprise Admin Communities

    What's the difference between community and organization?

Tài liệu cùng người dùng

Tài liệu liên quan