Adding banner management to mojoPortal

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/5/2009 6:14:35 AM
Gravatar
Total Posts 72

Adding banner management to mojoPortal

I am looking to develop a custom banner feature for a site using mojoPortal.

Essentially the client was looking to have a rotating banner with each banner linking to featured blog posts.

However, I want to make this feature as generic and disconnected from the release code as possible (so didn't want to tie specifically to a blog post).

My thought is that I create a banner manager control to be used in administration. Since I can retrieve the URL of pages in the site as well as URLs for things like blog posts, forum topics etc. I should be to have something like:

Select Page / Module: <RadioButtons for Page/Module>

Select Module (if module radio button selected): <DropDownList of modules Blog, Forum, Gallery etc.>

Select Instance (of module): <DropDownList of available feature instances>

Select Item Type (of feature instance): <DropDownList of available item types e.g. Blog Post, Forum Details, Topic Details, Product details>

Select Item: <DropDownList of available items (of features) or available pages>

Select Banner Image: <file browser control to select/upload banner image>

The idea would be that a user could create a banner that linked to a blog post, a page, a product or even a individual document in a shared document library.

Of course the other method of implementing this would be to add a banner feature to each module but I don't think this is good practise since it will involve modifying existing source code.

Does this sound like a reasonable idea? Joe, (forgive me as I have not looked at the source for mojoPortal yet) but I presume based on the selections made in my example interface there are already methods present for returning list of pages, modules, and feature instances?

Many thanks,


Ben

 

 

 

11/5/2009 6:55:12 AM
Gravatar
Total Posts 18439

Re: Adding banner management to mojoPortal

Hi,

If I were building it I would use our AdRotator control like I use at the bottom of this site:

<mp:AdRotator id="ads1" runat="server" AdvertisementFile="~/Data/mojocommon/adgroup1.xml" />

You just include it in the layout.master file of your skin and point it to an xml file. It consumes an xml file so building an admin ui would just involve building an editor that updates the xml file.

You can specify the url in the xml file.

However I don't really see a good easy way to make it possible to browse by feature for urls. I would just train the user how to right click a link and copy the url and paste it in the url for the ad. There are both page view permissions and feature instance view permissions to consider and resolving the url for content items would vary by feature and is complicated by the fact that some content can be on more than one page.

You might define a specific location where add images can be uploaded and make it easy to browse and upload the ad images and easy to select for an ad.

Hope it helps,

Joe

11/5/2009 2:02:30 PM
Gravatar
Total Posts 72

Re: Adding banner management to mojoPortal

Thanks Joe,

Just found your article on the banner control

Might I ask where the source code is for this? I had a look on the codeplex site in mojoPortal.Web.Controls but could not find it.

Thanks,

Ben

11/5/2009 2:14:47 PM
Gravatar
Total Posts 18439

Re: Adding banner management to mojoPortal

Hi Ben,

If you have the source code and open the mojoportal.sln in Visual Studio, you will find it in the mojoPortal.Web.Controls project in the AdRotator folder.

Note that you could also use <asp:AdRotator, but the mojoPortal version has integrated google analytics tracking of ad clicks.

Best,

Joe

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