DotNetNuke 6 Module Development - module

I am totally new to dotnetnuke and have installed dnn6 comunity edition. i m trying to develop a dnn module to.
Display Detailed News
Display top 8 news on homepage (from where navigate to the Display Detailed News)
i am using installed web starter kit as template and vs .net2010 and development env.
In this regard i have 3 questions.
How to add user control to display TOP 8 NEWS to the existing module so that i may add it as New module from control in dnn site?
How to display different category of news in this control on different page?

1) You will need to either create a new Module Definition, add the Control as another option to an existing Definition, or even define a completely new module on the extensions page that uses the new ASCX file. Most likely you will do the first option, adding to a ModuleDef to existing module. Then when you add the module to a page, you'll actually get two different modules loaded on the page. You can delete the one you don't want to use. The DNN blog module does this with like 5 or 6 different controls that get added to the page.
2) You'll want to configure Module Settings for the ASCX that control which category the articles come from.
If you really are serious about doing module development I would encourage you to check out my VS Templates, instead of the starter kit You can find the DNN6/VS2010 templates in the .9 release http://christoctemplate.codeplex.com/releases/view/93348
All the newer releases are for Visual Studio 2012 (even the free versions work though, so check those out)

Related

Implementing Sitecore Search Using Lucene

I am in the process of trying to get Lucene search to work with my Sitecore installation.
I have tried following the example listed in the Sitecore guide (sections 2.1 thru 2.2.2).
After adding the LuceneSearchBox and clicking on the control's search button, I receive the following error:
Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
This is what appears in the address bar, in the event it provides some helpful clues:
mytestsite/sitecore/service/nolayout.aspx?item=%2fstandard_items%2fsearch_results&layout=%7b00000000-0000-0000-0000-000000000000%7d&device=Default
Should I be doing something with the LuceneSearchResults control? The guide does not mention doing anything with the LucenSearchResult control.
Notes:
I am using this on a web site that I have created, not the "Office Core Web site" listed in the guide.
I am running Sitecore 6.3.1
The most common way of working with Lucene in Sitecore is by using the Advanced Database Crawler project. Alex Shyba, a Solution Architect at Sitecore, put together a C# class library that wraps the native Lucene functionality and adds helper methods to make it easy to use Lucene to search for content in Sitecore.
There's two parts to this project: 1. Advanced Database Crawler, 2. Searcher.
Here's the URL, http://sitecoreblog.alexshyba.com/2010/11/sitecore-searcher-and-advanced-database.html?m=1.

How do you switch to a different site template in SharePoint 2010?

If you used a site template (such as the Document Center template) and wish to use a different template (such as a Team Site), how can you accomplish this? More importantly, how do you do this without losing permissions that have been setup on the document libraries, lists, etc?
This functionality is not available in SP2010. Once a site is setup with a template that is how it is created. That being said, you can simply add the functionality you require to make the site appear to be of another template. By selecting a template, you are simply setting a starting point and not restricted future usage.

prevent duplicate site / page / layouts / templates / webparts, possible

We have a sharepoint environment with many sites (and sometimes many site collections). Each site (or site collection) has the same default page with some custom webparts that use sitecolumn values (for example a projectcode or clientcode) to show information from external systems. (for each project we have to create a separate site (or site collection) because of other reasons)
What is the best approach to minimize duplication? The dynamic parts of the page are stored in site columns. When we add a new webpart, ideally the default page every site/page should show the new webpart without spreading the update to the individual pages
Thanks
One approach you may want to take is to use the web part as a wrapper for a user control. The user control does the heavy lifting on the site. Once the web part is included on your pages, the user control should be able to tell which site it is being executed on and pull the necessary dynamic data from your site columns.
When you need to make updates, you update the user control and then redeploy the solution package to the farm. Each site will pick up the change as soon as the solution is deployed.
Here is a little information about this approach:
http://msdn.microsoft.com/en-us/library/ff649867.aspx.
The above article relates to WSS 3.0, but that should give you a starting point.
An approach you may want to look at for SharePoint 2010 is a visual web part. More info can be found here: http://msdn.microsoft.com/en-us/library/ff597539.aspx.

How to add bunch of aspx files to a site definition sp2010 vs2010 project

I need to be able to deploy bunch of aspx files when a site (sub-site aka web) is provisioned. I added a feature but it seems whole feature thing has changed with vs 2010 or sp2010. I am totally lost. All I want to do is to deploy these pages when a web is provisioned. Is it possible?
You can't drop aspx pages into SharePoint per say. If you want to add functionality, some of the options are:
1) Using Web Parts - probably the most popular method
2) User Controls
At the end of the day, you will create it as a Feature using VSeWSS 3.0 in VS and packaging/deploying it as a solution. Steer clear of trying to hack this up in SharePoint Designer - for one, you won't have source control like you have with a Feature.
http://www.andrewconnell.com/blog/articles/UsingCodeBehindFilesInSharePointSites.aspx
http://www.codersbarn.com/?tag=/webpart

Localization of a DotNetNuke website

I am working on a website in dnn. I want to change the language of website or particular page. So I download the language package for spanish(es-es),chinese(zh-cn) and install them from host. Next when I changed the language of browser then the website language didn't change. Working on dnn 5.0.
Please let me know how I can use language packages in dnn website.
For initial translations and maintenance of DotNetNuke translations, I recommend the use of OmegaT. It handles resx files directly. And content (such as HTML or Blogs) can be downloaded, translated and then uploaded thanks to the APIs of DNN (drop me a note if you need the scripts).
OmegaT stores the translations in it's memory (a TMX file, which is actually some kind of XML). It also uses Google Translate and similars, and has a fast user interface which increases translation speed a lot when compared against continously waiting for DotNetNuke to handle your updated resources.
More info on OmegaT. An example of a translated site and modules: site translated from Dutch into English
You should probably ask this in the DotNetNuke forums: http://www.dotnetnuke.com/tabid/795/default.aspx.
There's one dedicated forum for questions about language packs and localization. You will probably find your answer there: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/77/scope/threads/Default.aspx
The language packs don't always have translations for everything on the site, especially content that you added yourself. You'll need to do two things to get them working properly:
Go to Admin > Languages, and enable the languages you want to use.
Open the Language Editor and start translating. Under each resource name, you will see an edit text box for the localized value, and a read-only text box for the default value. In most cases, you'll need to translate verbatim what you see under "default value".
We had to write our own menu provider to get the menu to do this - instead of going for the resource files we went for a database solution - other reasons applied to this as well - we also built an interface for doing this - as for things like the text/html module there are some third party builds that allow you to nationalize content. Apollo comes to mind Apollo Software they have some multilanguage modules
The language packs will typically only localize text used by the core such as "Login" and "Settings". It is designed so that you can have a site in a language other than English, not so you can have multiple languages on one site. You can easily have multiple portals, each with a different language.
In order to have multiple locales on one portal you will need to use a third party module or develop your own.