Mono Support Want to add a new functionality under blog section  (Closed)

Viewed 35092 time(s), 6 post(s), 11/10/2011 10:14:51 AM - by sudhir.mishra
11/10/2011 10:14:52 AM
15 Reputation 3 Total posts

HI,
1. I want to add new functionality on Blog Page. There will be a ADD TO FAVORITE button on each blog.
On clicking this blog will be added to users favorite table(NEW TABLE).

2. On right hand side of blog page there is a blog list. Here in the list I want show only the favorite blogs of the user.

3. On the right panel of this page I want another section where I will place a text box and button for my work.



1
11/10/2011 10:21:56 AM
15 Reputation 3 Total posts

secondly how can I change the used table.

Suppose previously Table Blogs is being used.

Now I want to use FavBlog table(New Table).

How to do this ???

Please tell me.

2
11/10/2011 11:29:07 AM
15993 Reputation 2214 Total posts

Hi,

I'll try to answer all of your questions, but before I start note that if you want to use the LLBLGen ORM (that is the ORM MonoX uses) please take a look at the LLBLGen documentation here.

1. I want to add new functionality on Blog Page. There will be a ADD TO FAVORITE button on each blog.
On clicking this blog will be added to users favorite table(NEW TABLE).

1. First of all you will need to create your own LLBLGen solution and add the custom table, regenerate the LLBLGen solution and use it in your code as you will get the YoutTableEntity object.
2. On the custom action that will provide the Add to favorites functionality you can use the UrlParams.Blog.BlogSlug object to get the BlogSlug and then you can use the BlogRepository.GetInstance().GetBlog method to get the Blog  object so you can save the Blog Id to your table.

2. On right hand side of blog page there is a blog list. Here in the list I want show only the favorite blogs of the user.
You can extend the existing MonoX WebPart that is used to show the Blog list or you can create your own WebPart for favorite blogs, you need to decide what approach you want to use. Get back to use with the approach so we can guide you.

3. On the right panel of this page I want another section where I will place a text box and button for my work.
Blog demo page that you are looking is located at ~\Portal\Blog.aspx and you can add your code below the following mark-up
<portal:PortalWebPartZoneTableless HeaderText='<%$ Code: PageResources.Zone_RightPartZone %>' ID="rightWebPartZone" runat="server" Width="100%" ChromeTemplateFile="RightColumn.htm" ShowChromeForNonAdmins="true">
                    <ZoneTemplate>
                        <MonoX:BlogInfo ID="blogInfo" CacheDuration="600" HideIfEmpty="true" runat="server" />
                        <MonoX:BlogList ID="blogList" CacheDuration="600" HideIfEmpty="true" runat="server" />
                        <MonoX:TagCloud ID="tagCloud" CacheDuration="600" HideIfEmpty="true" runat="server" />
                        <MonoX:BlogCategories ID="blogCategories" CacheDuration="600" HideIfEmpty="true" runat="server" />
                    </ZoneTemplate>
                </portal:PortalWebPartZoneTableless>

secondly how can I change the used table. 
Suppose previously Table Blogs is being used. 
Now I want to use FavBlog table(New Table). 
How to do this ???
To change / switch the Blog table to FavBlog table would require you to have a MonoX source code if you are talking about the switching all the MonoX Blog WebParts to use the FavBlog table. Note: This isn't a practice so please read some of our blog posts that discuss extending MonoX functionality. 

Let me know if you need anything else.

Regards

3
11/10/2011 11:46:14 AM
15 Reputation 3 Total posts

On the rights where its previously showing all blogs in BLOG page.

I want to show only the favorite blogs. which user had make his/her favorite.

I have the source code. Please let me know how can I change the table name.



regds..

4
11/10/2011 11:56:22 AM
15993 Reputation 2214 Total posts

I'll provide you with a guidance soon, can you please use your priority support forum so we can provide you with a better support (You can find a link to the priority support forum in your upper right corner, if you can't find it let me know).

Thanks.

5
11/10/2011 4:25:33 PM
15993 Reputation 2214 Total posts

I'm closing this topic as we have moved the discussion to priority support forum where I'll provide you with source code etc.

Regards

6
This is a demo site for MonoX. Please visit Mono Software for more info.