Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 68 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
68
Dung lượng
0,92 MB
Nội dung
Forums, Categorization, and Asset Publishing [ 182 ] As an administrator, you may need to set up users of the role Community Member having the default permissions setting (View, Add File, Add Message, Reply to Messages, and Subscribe) for the category "Book Category D". That is, you need to add permission actions Add File, Add Message, Reply to Messages, and Subscribe on the category Book Category D via the role Community Member. Let's do it by following these steps: 1. Click on the parent category Books in order to list its subcategories. 2. Locate the subcategory Book Category D where you want to change permissions. 3. Then click on the Permissions icon from the Actions next to the category. 4. Select permissions: Add File, Add message, Reply to Message, and Subscribe for the role Community Member. 5. Click on the Submit button. From now on, as a member of the Guest community, Lotti Stein has the permission actions View, Add File, Add Message, Reply to Messages, and Subscribe on the subcategory "Book Category D". The preceding steps provide a way to update permissions for an individual resource, for example, "Book Category D". How about permissions on categories—existing ones or newly created ones? Let's consider a use case: the user "Lotti Stein" should have the permission Update on categories, including subcategories—both existing ones and newly created ones. How to implement this use case? The following is the answer, as an example: by assigning permissions via roles in Control Panel. 1. Log in as an admin, says Palm Tree. 2. First click on Roles under the category Portal of Control Panel. 3. Then locate a role, say MB Topic Admin. 4. Then click on the Dene Permissions icon from the Actions next to the right of the role. 5. Click on the Content | Message Boards link, select the Update checkbox under the Message Boards category. 6. Finally, click on the Save button. Chapter 4 [ 183 ] As shown in preceding steps, the user is assigned the Update permission on Message Boards category across all groups in the current portal instance via the role "MB Topic Admin". The user "Lotti Stein" is a member of the role "MB Topic Admin". Therefore, the user "Lotti Stein" got the Update permission on the Message Boards category across all groups in the current portal instance. Permissions on message The following table shows the default permissions on messages, either threads or posts. The role Community Member is able to set up all permissions (marked as 'X'): Delete, Permissions, Subscribe, Update, and View. However, the role Guest is able to set up Delete, Permissions, and View (marked as 'X'). By default, the role Community Member has the actions (marked as '*') Subscribe and View, whereas the role Guest only has the View action (marked as '*'). Action Description Community Guest Delete Ability to delete messages X X Permissions Ability to assign permissions X X Subscribe Ability to subscribe to the thread X, * Update Ability to update messages X View Ability to view the details of messages X, * X, * Note that the role Owner is able to set up all permissions and, by default, has all permission actions. Of course, as an administrator, you can create a new role and assign any permission, based on the role, to different users. As you can see, as a member of the Guest community, "Lotti Stein" only has the permission actions View and Subscribe on messages (threads and posts). That's because we have added them through the role Community Member as the default settings. Now suppose that we're going to add the permission Update on message (both thread and post) in following scopes: • Individual thread or post • A set of threads and posts belonging to a category like "Book Category D" • All threads and posts in a group like Guest community • All threads and posts in a portal instance like current portal instance How to implement the above use cases? For individual threads or posts, you can assign permissions in the portlet Message Boards through custom regular roles or a custom community role (or Community Member) for community pages or a custom organization role (or Organization Member) for organization pages. Forums, Categorization, and Asset Publishing [ 184 ] For all threads and posts in a group, you can assign permissions in the Control Panel through a custom community role (or Community Member) for community pages or a custom organization role (or Organization Member) for organization pages. For all threads and posts in a portal instance, you can assign permissions in the Control Panel through custom regular roles. For a set of threads and posts belonging to a category, you could use a category hierarchy structure. In practice, when you assign any permission on a message to a role, make sure that you assign the related permissions, at least View, on both the portlet Message Boards and the message's subcategories and category. Otherwise, you wouldn't be able to view the portlet and the related categories. Moreover, the message would be invisible to people with the role. Using Message Boards effectively The following gure depicts a forum structure overview of Message Boards. A forum is made up of a set of categories. Each category may have many subcategories and threads. Furthermore, each thread may have many posts (in the form of replies). The thread refers to the collection of messages. A thread itself is a post too. The posts may be displayed in at chronological order by date of posting or in a question-answer order. The gure shows a thread of one question followed by all the answers in a hierarchy. Actually, threads can be regarded as the root level posts. Sub-posts are also supported, which enable comments in one of the replies to start another thread that remains linked to the original. Moreover, you can enable ags, thereby allowing users to ag content as inappropriate. In addition, you can subscribe to categories / subcategories and threads. Category Subscription Thread File tag Post Rating Flag C C C CCCCC 0 * 0 1 0 1 0 * 0 * 0 1 0 1 1 * 0 1 0 1 0 1 0 1 As shown in the preceding gure, you are able to attach a set of les to posts (and threads because a thread itself is a post). In addition, you are able to select existing tags or add new tags to posts. Chapter 4 [ 185 ] Category hierarchy As you can see, there are top-level categories with the permission action Add Category. A top-level category forms a root, that is, a message container. Each category can have many subcategories with the permission action Add Subcategory. Therefore, categories and subcategories form a hierarchical structure—categories form the root, while subcategories form the trunk and leaves. How can you benet from category hierarchy? The main benet you can get is inherited permissions. Another benet you can get is content sharing within a category hierarchy. As mentioned earlier, when you assign any permission on message to a role, you must make sure that you assign related permissions—at least, View, on the message's subcategories and categories. Therefore, we could use category hierarchy to assign permissions for a set of threads and posts belonging to a category or a subcategory. Semantics and Ontology When a message has been created, the portal will check for the spelling. That is, the message does have a specic syntax, but it doesn't involve semantics. Semantics is the study of the meanings of linguistic expressions (as opposed to their sound, spelling, and so on.). Moreover, it would be useful if messages could be managed through semantics. As previously mentioned, you can tag messages through folksonomy. Later, you would be able to apply taxonomy on messages. A folksonomy is a user-generated taxonomy used to categorize and retrieve web content, using open-ended labels called tags. On the other hand, taxonomy is the practice and science of classication— hierarchical in structure and commonly displaying parent-child relationships. This is a good way to approach a semantic classication of content like messages. Moreover, it would be possible to build a complete ontology based on the concepts of folksonomy and taxonomy. In this way, content could be classied as instances, and properties of content can be used to navigate through concepts declared in the ontology, which isn't ready yet but is highly awaited. Categorization Sooner or later, you will have a lot of posts on the Message Boards. Therefore, it is useful to allow users to generate content post and classify that content post in their own unique way. Let's rst experience tagging assets. Forums, Categorization, and Asset Publishing [ 186 ] Tagging assets As an administrator at the enterprise "Palm Tree Publications", you may need to add tags "liferay" and "book" in the post "RE: Let's discuss book Liferay". Let's do it by following these steps: 1. In a post updating page, locate the Tag box. 2. In the Tag text box, simply start typing the tag name and a list of tags will appear. For example, when "li" is typed into the textbox and a list of the available tags is populated. Select the tag you want, say "liferay", and that tag should show up on the top of the box. 3. Similarly, when "bo" is typed into the textbox and a list of the available tags is populated. Select the tag you want, say "book", and the tag should show up on the top of the box too. 4. Click on the Save button when you are ready. 5. For some reason, let's say, you need to remove a tag "Book" from the tag list. To remove a tag "Book", simply click on the mark "[x]" located next to the tag rst, and then click on the Save button when you are ready. 6. Similarly, you can tag content including Bookmark entries, Blog entries, Document Library documents, Image Gallery images, Wiki articles, Web Content articles, Message Board messages, and so on. Folksonomies As you can see, there is an open set of tags that could be extended by end users called Folksonomies. In general, as a user, you are able to carry out the following tasks based on the tags: • Extend tags by entering a tag, and press Enter • Select tags by clicking on the Selected Tags button, where it displays a set of existing tags for you to select multiple tags • Find tags by clicking on the Suggestions button, where it uses advanced search techniques to nd out tags Chapter 4 [ 187 ] In short, the portal provides meta tag Folksonomies, which is a tagging system that allows us to tag web content, documents, message board messages, and more. It also dynamically publishes content by tags. The meta tags can later be used to classify assets as well as search and aggregate them. Taxonomies Besides the meta tag Folksonomies, you could use another kind of tag called Taxonomies. In general, taxonomies are a way of organizing and aggregating content—a closed set of categories (that is, tags in a different name) of the vocabulary, which are created and organized in a hierarchical structure. Before going deeper, let's see an example. Consider that we have to build the vocabulary Book, along with the categories Chapter and Section in a hierarchy. We're going to build them in the next section. Now we're going to apply these tags—categories on Web Content—by following these steps: 1. Login as an admin, say, Palm Tree. 2. Click on Web Content under the category Content of the Control Panel rst. 3. Then select the tab Web Content. 4 . Click on the Add Web Content button. 5. In the Web Content editing page, click on Select Categories under Categorization. This would give you the ability to apply categories on the current web content, as shown in following screenshot: Forums, Categorization, and Asset Publishing [ 188 ] As you can see, categories are displayed in a hierarchical structure. You are able to choose as many categories as you expected. You could search and nd your favorite categories in a quick way when the number of categories is huge. Let's see how to build the categories hierarchy in the next section. Tags administration The following is a summary of tags and their related portlets in the portal. Administration: • Tags: This manages folksonomies—tags and their properties • Categories: This manages taxonomies—vocabulary, categories, and their properties Tag different types of assets in the portal: These include Bookmarks' entries, Blogs' entries, Wiki articles, Document Library documents, Image Gallery images, Web Content articles, and Message Board messages. Aggregate assets in the portal: Asset Publisher Display tags: • Tag Cloud—a visual depiction of user-generated tags. • Tags Navigation—used to display user-generated tags in multiple styles • Categories Navigation—used to display predened tags in a hierarchy structure Tags portlet To manage tags, you should go to Tags under the category Content of Control Panel. Using the Tags portlet (portlet ID 99), you can add tags and manage their properties. As shown in following screenshot, the Tags portlet provides the capabilities to manage tags with the options Search, Add Tag, and Permissions. Chapter 4 [ 189 ] To search for tags, you could simply input a search criterion say "ext" rst, and then click on the Search button. Search results will appear dynamically. To add a tag, simply click on the button Add Tag, input the tag name, say "ext", and change the default permission settings rst. Then click on the Save button to save inputs or the Cancel button in order to discard inputs. If the tag doesn't exist in the current group, then the tag will be added by associating it to the current group and it will bring us to the Edit Tag view. Otherwise, it will display a message stating "That tag already exists". Suppose that you want to change the tag "ext" to "extension", how would you do this? The process is simple, just click on the tag "ext" using edit links. In Edit Tag view, the tag name and properties are displayed. In the tag name "ext", you could type "extension", and click on the Save button. Optionally, you can click on the Close button or close icon to cancel the current process. To delete a property of a given tag, say "extension", locate the property rst and then click on the Delete icon next to the property. In order to add one more property of a given tag, say "extension", just click on add icon rst. Then simply input the name and value. You could click Click on the Save button to save the inputs or the Cancel button to cancel the inputs. Don't forget that you can merge tags with drag-and-drop. For example, you can drag the tag "book" and drop it to the tag "liferay", and you would see a pop-up message that says: Are you sure you want to merge "book" into "liferay"? This will change all items tagged with "book" to be tagged with "liferay". Properties are a way to add more detailed information to a specic tag. They are separated into key-value pairs that allow us to associate detailed information with a tag. Forums, Categorization, and Asset Publishing [ 190 ] To delete a tag, locate the tag, for example, "book", and then click on the tag using the edit links like the name "book" Follow it up by clicking on the Delete button in the Edit Tag view, as shown in the preceding screenshot. A pop up will appear asking you "Are you sure you want to delete this tag". Click on the OK button to conrm deletion, or the Cancel button to the cancel deletion process. As you can see, a tag could have many properties associated with it. Note that when a tag gets deleted, the properties that belong to the current tag will also get removed. Categories portlet In order to manage vocabularies and categories, you could go to Categories under the category Content of Control Panel. Using Categories portlet (portlet ID 147), you can add vocabularies and categories and also manage categories' properties. As shown in the following screenshot, the Categories portlet provides capabilities to manage tags including Search, Add Vocabulary, Add Category, and Permissions. As you may have noticed, the vocabulary Topic was created by default, and it was shown under the column Vocabularies. Of course, you can search vocabularies and categories in a convenient way. In order to do so, you could simply input a search criterion, say "book", rst, then select types—either Categories or Vocabularies, and then click on the Search button. Search results will appear dynamically. To add a vocabulary, simply click on the Add Vocabulary button, input the vocabulary name, for example, "Book", and change the default permission settings rst. Then click on the Save button to save inputs or the Cancel button to discard inputs. If the vocabulary doesn't exist in the current group, then the vocabulary will be added associated to the current group. Otherwise, it will show "That vocabulary already exists". That is, the vocabulary names must be unique in the current group. Suppose that you want to change the vocabulary "Portal" to "Portals". In order to implement it, double-click on the vocabulary "Portal" using edit links. In the Edit view, the vocabulary name would be editable. Where the vocabulary name is "Portal", you could type "Portals", and click on the Save button. Again, the updated vocabulary name must be unique in the current group. If needed, you can delete a vocabulary. You could rst locate a vocabulary say "Book", and click on the Delete Vocabulary button at the bottom of the title categories. As you can see, a vocabulary could have many categories associated with it. Therefore, when a vocabulary gets deleted, the categories which belong to the current vocabulary will get removed too. After adding vocabularies, you are ready to add categories, as shown in the following screenshot: Chapter 4 [ 191 ] In order to add a category, simply locate a vocabulary, for example "Book", and click on the button Add Category, input a tag name, say "Chapter", and change the default permission settings. Optionally, you are able to select different vocabularies from the drop-down list. Then click on the Save button to save inputs, or the Cancel button to discard inputs. If a category doesn't exist in the current vocabulary, then the category will be added to the current vocabulary, and it will bring us to the Edit Category view. Otherwise, it will throw an error message "That category already exists". In cases where you want to change the category "Chapter" to "Main Chapter", click on the category using the edit links, say "Chapter". In the Edit Category view, the category name and properties are displayed. In the category name "Chapter", you could type "Main Chapter", and click on the Save button. Optionally, you can press the Close button or close icon to cancel the current process. Again, the updated category name must be unique in the current vocabulary. A category can have another category as its parent category. That is, categories support hierarchical structure. In order to build the hierarchy, you could add categories such as "Chapter" and "Section" rst, and then you can drag-and-drop a category called "Section" to a correct parent category, say "Chapter". That's it! To delete a property of a given category called "Chapter", locate the property rst. After locating it, click on the delete icon next to the property. In order to add one more property of a given category, say "Chapter", just click on the add icon rst. Then simply input the name and value. Finally, click on the Save button to save inputs or the Cancel button to cancel inputs. [...]... under the "Liferay" node, namely, "Liferay and Alfresco Integration" and "Liferay Book" Let's do it by following these steps 1 Click on Wiki under the category Content of Control Panel 2 Click on the name of the "Liferay" node 3 Click on the Edit icon next to the page "FrontPage" 4 Select the format "Creole" 5 In editing mode, input "[ [Liferay and Alfresco Integration]]" and "[ [Liferay Book]]" 6 Click... we need to add a page called "Book Wiki" under the "Liferay Book" page Let's do it by following these steps: 1 Locate the "Liferay" node 2 Click on the name of the "Liferay" node 3 Find the "Liferay Book" link, and click on the name "Liferay Book " 4 Click on the Edit icon next to the page "Liferay Book" 5 Select the format, for example, "Creole" 6 In the editing page, input "[[Book Wiki]]" or other... example, if there are four tags—T1, T2, T3, and T4, we use three operators—and, or, and not By default, Asset Publisher supports four use cases (as basic expressions in general) 1 Contain any of these tags: T1, T2, T3, or T4 2 Contain all tags: T1, T2, T3, and T4 3 Does not Contain any tag: not (T1, T2, T3, or T4) 4 Does not Contain all tags: not (T1, T2, T3, T4) At the same time, the Asset Publisher portlet... editable For example, we plan to change the description of the node "Liferay" from the value "Liferay root" to the value "Liferay Wikis Root" Let's do it by following these steps: 1 Locate the "Liferay" node 2 Click on the Edit icon from the Actions menu next to the node 3 Update the description with the value "Liferay Wikis Root" only 4 Click on the Save button to save the changes Deleting a node Nodes... To | liferay. com under the dock bar menu, and then go to Manage | Control Panel under the dock bar menu 3 Click on Wiki under the category Content of Control Panel 4 By default, the node "Main" is created—click on the Manage Wiki icon on the top-left of the FrontPage [ 212 ] Chapter 5 5 Click on the Add Wiki button on the top of the nodes list 6 Enter the name "Liferay" and the description "Liferay. .. group Guest If Asset Publisher was added to the page "Asset Publishing" of the "Palm Tree Enterprise" organization's public pages, the default scope would've been the group organization "Palm Tree Enterprise" [ 2 04 ] Chapter 4 Besides the default scope, there is another group called Shared Global available in the portal Therefore, you would have three options for scope: default scope only, Shared Global... which contain any of the tags T1, T2, and T3, but don't contain the tag T4 We could express this condition as follows: (T1 or T2) and T3 and (not T4) The previous use case is just one example It could be represented through three basic expressions through the current UI 1 Exp_1: (T1 or T2) 2 Exp_2: T3 3 Exp_1: (not T4) [ 2 06 ] Chapter 4 Thus we would have the following final expression Obviously, the UI... of the enterprise "Palm Tree Publications", you need to create a page called Wikis in the Guest community and add the Wikis portlet in the page Wikis Then you are ready to create the "Liferay" and "Alfresco" nodes Managing nodes As an administrator of the enterprise "Palm Tree Publications", we're going to create nodes called "Liferay" and "Alfresco" As shown in the next screenshot, when the portal. .. Viewing RSS feeds You can view RSS feeds of nodes Let's say that you need to view RSS feeds of the node "Liferay" You can do it by following these steps 1 Locate the "Liferay" node 2 Click on the RSS icon from the Actions menu next to the node [ 2 14 ] Chapter 5 Importing pages In addition, the portal provides the capability to import pages from MediaWiki MediaWiki is a free software Wiki package written... Asset Publisher was added in the page of "Palm Tree Enterprise" organization—pubic pages or private pages, then the Asset Publisher portlet could publish assets of the group "Palm Tree Enterprise" plus those of shared Global Obviously, Asset Publisher can't publish assets across groups Guest and "Palm Tree Enterprise" at the same time [ 208 ] Chapter 4 It would be very useful if the Asset Publisher portlet . Chapter 2, Working with JSR-2 86 Portlets of the book Liferay Portal 5.2 Systems Development, Packt Publishing. Forums, Categorization, and Asset Publishing [ 1 94 ] When mapping tag to categoryId,. the portal instance. This means that these tags and categories would be globally visible in any of the groups of the current portal instance. Chapter 4 [ 197 ] Using tags effectively The portal. that you want to change the vocabulary " ;Portal& quot; to "Portals". In order to implement it, double-click on the vocabulary " ;Portal& quot; using edit links. In the Edit view,