The Mighty Blog

Dec11

Written by:Will
12/11/2006  RssIcon

I recently needed to retrieve Tab information from a URL for the Google Search Provider I am writing for DotNetNuke. (You can translate "tab" information into "page" information if you are not familiar with the term.)

I recently needed to retrieve Tab information from a URL for the Google Search Provider I am writing for DotNetNuke. (You can translate "tab" information into "page" information if you are not familiar with the term.)

With some much appreciated help from the DotNetNuke forums, and more specifically John Mitchell from the Core Team, I was able to write the following function that really helped me out. I hope it can help you out too.

Basically, I take the URL (hopefully it is properly formed) and return a TabInfo object from it. This will give me the basis for getting any of the information it provides, as well as portal information.

Private Function GetTabInformation(ByVal TabUrl As String) As DotNetNuke.Entities.Tabs.TabInfo
TabUrl = TabUrl.ToLower
Dim _TabId As Integer = 0
Dim _tc As New DotNetNuke.Entities.Tabs.TabController

If TabUrl.IndexOf("tabid") > 0 Then
_TabId = Integer.Parse(Regex.Match(TabUrl, "tabid[=/](\d+)", RegexOptions.IgnoreCase).Groups(1).Value)
Return _tc.GetTab(_TabId)
Else
Return Nothing
End If
End Function

DotNetNuke Google Search Provider Update
On a separate note, in developing this provider I have run into some unexpected snags that I might not have ran into if I were creating a provider for one of the other pieces of functionality. The search provider inherits from a separate provider source. In turn, I cannot implement the parameters like the other providers use. However, I have come up with a work-around which will require the user to use a "config" file to adjust the Google Appliance ip number (location) and collection name.


Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 
Add to Technorati Favorites
Tweet about my blog
Will Strohl - The Mighty Blog - RSS Feed

Tag Cloud

Sort by:Tag | SizeRSS
camp   community   dnn   dotnetnuke   dotnetnuke®   event   example   free   get   group   integer   jquery   meeting   module   odug   orlando   search   session   think   use  
The opinions expressed here are the personal opinions of Will Strohl and do not necessarily represent the views and opinions of the DotNetNuke Corporation.
© Copyright 2004-2010 by Will Strohl. All rights reserved.Website Skinned By: Ralph Williams  Website Hosted By: Applied Innovations