Solution to Content Approval if anyone cares

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
12/15/2008 5:46:07 PM
Gravatar
Total Posts 30

Solution to Content Approval if anyone cares

Hi Joe,

   I hope you can add some comments or input on the following solution I came up with on the content approval.

  For those who want to implement it , the way I did it was straight forward and simple.

  on my HtmlEdit.aspx.cs (code behind) , under btnUpdate_Click method, I overloaded the Save(bool isAdmin) method to accept a bool whether the user is an admin using webuser.isadmin() method. If this is true, and under Save() where it has "if (this.itemID > 0)" I did a condition again if the user is admin then it returns Update() else it CreatesTempHtmlContent, which is basically the same as create only on a duplicate table called mp_TempHtmlContent. Then I use the same SP and kinda tweaked it to use the latter table.  Once this is all done, I send an email notification to the Admin of the site with a link to virtual page called Content-Review.aspx and provide a new control called ContentReview.ascx that lays out (in table) all the pending status (content of the table mp_TempHtmlContent) and provide a link to a new page that displays the modified content. The page that receives the link has button event that says 'approved' then after, the mp_TempHtmlContent will transfer all the data to mp_HtmlContent, which is the original table if you had created a new content for the page.

  Well I hope this gives an idea to those who are into same path. If you have any comments I'd love to hear it so I can optimize this logic.

  regards,

gil

12/16/2008 5:31:08 AM
Gravatar
Total Posts 18439

Re: Solution to Content Approval if anyone cares

Its nice of you to offer to share your work, but I already have a plan and design for content approval that is a bit more elaborate so I don't want to include these changes right now.

I don't recommend modifying code included with mojoportal as it will make it difficult for you to upgrade. It would be better if you clone the html module into a separate module (with different table names and a different application name and guid, different .resx files, etc) before you customize it. Then your custom feature can still be used and you can still upgrade. If you do that and would like to share we could put a .zip on the community download page.

Best,

Joe

12/16/2008 5:40:37 PM
Gravatar
Total Posts 30

Re: Solution to Content Approval if anyone cares

Thanks Joe, I appreciate the feedback, now that you mentioned it I will probably just go with your suggestion for manageability and maintenance purposes. I will share my new created solutions to your forum.

Regards,

Gil

12/17/2008 7:17:58 AM
Gravatar
Total Posts 18439

Re: Solution to Content Approval if anyone cares

Sounds great! It may yet be some months before I complete my implementation so I'm sure people will like it if your solution is available soon.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.