Monday, July 15, 2013

Example on how to use dnnConfirm jQuery Plugin

The JS code below will show a dnn confirm dialog upon click on any button with my-Button class.  Pay attention to isButton option on initialization and the isTrigger parameter on button click.

//initialization
$(".my-Button").dnnConfirm({
    text: "Confirm Message",
    title: "Confirm",
    isButton: true
});
//button click handler
$(".my-Button").click(function (e, isTrigger) {

    if (isTrigger) {
        // Your code here
    }

    return false;

});

Friday, July 5, 2013

DotNetNuke+Apache Solr=High Speed Enterprise Search

We have successfully implemented Apache Solr as a Search Solution for DotNetNuke.

Here's the summary on how we did it.

First we installed BitNami Apache Solr Stack to our test machine(Windows 7).

We change the Solr Schema to fit our needs.  

We build a DNN Scheduler to add/edit/delete documents to Solr using Solrnet.

After we are done indexing,  we created a search class to query Solr Webservice using Solrnet.

Now we have an Intelligent and Fast Search. :)

FYI: Solr has a cool Dashboard that will let you check if your documents are being index properly or do some test query.

I will find time to share actual source code in the near future.

Regards

Sorting DotNetNuke List Using Linq

The code below will return a list of ListEntryInfo objects sorted by value in ascending order. :)

Dim lc As New DotNetNuke.Common.Lists.ListController()
Dim entries = From e In lc.GetListEntryInfoItems("ListName") Order By e.Value Ascending Select e