Blog Module
The Blog module is used to manage a standard blog and allows comments to be submitted against blog articles. It is very similar to the News module but with the additional functionality to submit comments. In this tutorial, we will show you how to manage comments.
Configuring a Blog module
The Blog module is very similar to the News module, so we won't go into the details of adding and managing new blog articles. However, we will show you how to manage comments, which is a specific functionality in the Blog module. For more information on how to create and manage blog articles, please refer to the tutorial for the News Module.
To start configuring a Blog module, you must first log into the GLU RMMS. Once you've logged in successfully, click the Manage button at the top right hand corner of the screen to go to the Manage section. Select one of the Blog modules you have created and click the "Configure" button.

Once you're in the Blog module's configuring screen, you can start adding new blog articles by clicking the "+" button in the Button Panel at the bottom of the screen. For the details on how to create new articles, please refer to the tutorial for the News Module. As you can see, the Blog module's configuration screen is very similar to that of the News module's

The Blog Post Details screen is also very similar to that of the News module's Article Details screen.

One of the things that's slightly different in the Blog module's Post Details screen compared to the News module's Article Details screen is that there is an additional "Require moderation" check box next to the Status drop down box. By default, new blog posts do not require moderation, meaning that any comments submitted are approved automatically and immediately available for viewing. However, ticking this check box will require the comments to be approved manually through the GLU RMMS. This is a good feature to make sure your blog is clean from foul languages or inappropriate comments.

You will also find a "Comments" button at the bottom right corner of the screen. This button will become clickable when there are comments submitted. Clicking on this button will take you to another screen showing the comments submmitted to this blog post.

You won't be able to create comments here in the Blog module's configuration screen. The comments have to be submitted through the BlogConnector component in your Flash project. We will show you a simple example of how to use a BlogConnector component to submit comments in the next section.
Using a BlogConnector to submit comments
We will create a simple Flash form to submit comments to a specific blog post as an example to demonstrate how to use a BlogConnector component to submit comments. Before you begin this example, make sure you've downloaded and installed the GLU Data Components MXP Package. You can also download the accompanying example here.

The example is a simple form that submits comments to the specified blog post. If you open up the example FLA file (BlogConnector_ex2.fla) in your Flash IDE and go to the actions frame, you would see the following ActionScripts:
import com.ddx.flashcms.components.event.*;
import com.ddx.flashcms.vo.blog.Blog;
import com.ddx.flashcms.vo.simplepage.*;
stop();
submit_btn.addEventListener(MouseEvent.CLICK, submitComment);
blogConnector.addEventListener(CompEvent.ON_CONNECT, onConnect);
blogConnector.addEventListener(CompErrorEvent.ON_CONNECT_ERROR, onConnectError);
blogConnector.addEventListener(CompEvent.ON_READY, onReady);
blogConnector.addEventListener(CommentEvent.ON_COMMENT_ADDED, onCommentAdded);
function submitComment(evt: MouseEvent) : void{
if(article_ti.text == ""){
error_txt.text = "Please specify the blog ID";
}else{
blogConnector.commentTitle = commentTitle_ti.text;
blogConnector.commentAuthor = commentAuthor_ti.text;
blogConnector.commentDescription = commentDescription_ti.text;
blogConnector.submitComment(uint(article_ti.text));
error_txt.text = "";
}
}
function onReady(evt: CompEvent) : void{
trace("onReady");
}
function onConnect(evt: Object) : void{
trace("onConnect");
}
function onConnectError(evt: CompErrorEvent) : void{
trace("onConnectError: " + evt.error);
}
function onCommentAdded(evt: CommentEvent) : void{
trace("onCommentAdded");
trace("new comment ID = " + evt.commentID);
}
The most important lines of code to note are between lines 19-22 where we populate the comment's title, author, and description and submits to the specified blog post.
blogConnector.commentAuthor = commentAuthor_ti.text;
blogConnector.commentDescription = commentDescription_ti.text;
blogConnector.submitComment(uint(article_ti.text));
Note also we have set the BlogConnector's autoConnect parameter to true and autoLoad to false so that no blog posts are retrieved automatically. For more information about these parameters, please refer to the Livedocs.

If you compile and run the example, it would submit the comment the comments to our default example post (blog ID=63). Feel free to substitute the BlogConnector's GUID with your own and enter your blog post ID which you can find in the Blog module's configuration screen.

Now that you have submitted some comments, lets see how you can manage them in the next section.
Managing submitted comments
The "Comments" button is only active in the Blog Post Details screen if there are comments submitted to the selected blog post. Assuming you have run the example above and submitted some comments, the button should now be clickable. To manage these comments, click the "Comments" button and the Blog Post Comments screen should appear listing all comments submitted.

You will notice the status for the comments submitted should be "New" as we've set the blog post to "Require moderation". These blog posts are not available online until they have been approved. To approve a blog post, select it in the comment list and click the "Edit" button in the Button Panel at the bottom. An "Edit Content" window will appear. You can moderate the content of the blog post if you wish. But to approve this post, simply select the "Approved: option in the Status drop down box. Finally, click the "Save" button to commit the changes.

To return back to the Blog Post Details screen, simply click the "Blog Post Details" link at the navigation bar at the top of the screen.
That's all there is for managing comments, and for this tutorial. And again, for more information about adding, editing, or deleting blog posts, please refer to the News Module tutorial as they are very similar.
Make sure you also check the related tutorials for other GLU modules:
Banner Module
Form Module
Gallery Module
Links Module
Menu Module
News Module
Registration Module
SimplePage Module


