DotNetNuke Hosting with ASPHostPortal.com

BLOG about DotNetNuke CMS, latest technology and Special DotNetNuke Hosting Package with ASPHostPortal.com

DotNetNuke Hosting - ASPHostPortal.com :: Tips Responsive Bootstrap skin for DNN

clock September 15, 2016 20:13 by author Armend

Bootstrap is a free collection of tools for creating websites and web applications. It contains HTML and CSS-based design templates for typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions.

Twitter's Bootstrap is an excellent set of carefully crafted user interface elements, layouts, and javascript tools, freely available to use in your next web design project. This video series aims to introduce you to Bootstrap; taking you all the way from downloading the resources, to building a complete Bootstrap-based website.

While in the process of developing our own Responsive Twitter Bootstrap Skin for DotNetNuke , we had to jump over a couple of hurdles. First we had to figure out how to implement a dropdown on hover menu. Secondly, we had to overcome the Bootstrap issue where once you are on a child page, you cannot navigate back to the parent page in the menu. Bootstrap is against both of these features, however we feel as though these features provide a user friendly interface, especially while using a tablet or smartphone. With that said, we wrote this article to save you the headache to incorporate these two features in your Responsive Twitter Bootstrap Skin for DotNetNuke .

 

The real beauty was that I realized, I had included both the data-toggle="dropdown" and the data-hover="dropdown". You must only use the data-hover="dropdown" to fix both issues! The correct code is below:

Now you will have dropdown on hover menu items AND will be able to navigate to the parent page from the child page.

Best Recommended DotNetNuke Hosting

ASPHostPortal.com is the leading provider of Windows hosting and affordable DotNetNuke Hosting. DotNetNuke Hosting from ASPHostPortal.com provides a safe, reliable and performance-driven foundation for your DotNetNuke website. DotNetNuke is the perfect Content Management System for managing and developing your website with one of ASPHostPortal’s Hosting plans. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability



DotNetNuke Hosting - ASPHostPortal.com :: Tips To Create Portals in DotNetNuke

clock September 8, 2016 20:11 by author Armend

In this post I will explains you how to create portal in DotNetNuke. Lets check it out

Introduction

DotNetNuke's portal system is one of its most compelling features. DNN Portals can be either Parent or Child. The different is from the url.

 


Parent Portal (example):

  • http://www.asphostportal.com
  • http://dnn.asphostportal.com


Child Portal (example):

http://www.asphostportal.com
http://asphostportal.com/dnn (As we have utilized "/" after area name, its called child portal)

Sometimes we have to create custom modules where we have to programmatically create portals. In this article we will plot how to make a a child portal programmatically. The technique needs few parameters to be passed which will be obliged to make the child portal. All these parameters have some settled reason. The part of individual parameters are unmistakably clarified in this technique.

/// <summary>
/// Creates new child portal
/// </summary>
protected void CreateNewPortal(string strPortalName, string strPassword, string strConfirmPassword,
 string strFirstName, string strLastName, string strUserName,
 string strQuestion, string strAnswer, string strEmail)
{
 
try
{
PortalController.PortalTemplateInfo template = LoadPortalTemplateInfoForSelectedItem();
 
bool blnChild;
string strPortalAlias;
string strChildPath = string.Empty;
var closePopUpStr = string.Empty;
 
var objPortalController = new PortalController();
 
//Set Portal Name
strPortalName = strPortalName.ToLowerInvariant();
strPortalName  = strPortalName.Text.Replace("http://", "");
 
//Validate Portal Name
if (!Globals.IsHostTab(PortalSettings.ActiveTab.TabID))
{
blnChild = true;
strPortalAlias = strPortalName;
}
else
{
blnChild = true;
 
strPortalAlias = blnChild ? strPortalName.Substring(strPortalName.LastIndexOf("/") + 1) : strPortalName;
}
 
string message = String.Empty;
ModuleMessage.ModuleMessageType messageType = ModuleMessage.ModuleMessageType.RedError;
if (!PortalAliasController.ValidateAlias(strPortalAlias, blnChild))
{
message = Localization.GetString("InvalidName", LocalResourceFile);
}
 
//Validate Password
if (strPassword != strConfirmPassword)
{
if (!String.IsNullOrEmpty(message)) message += "<br/>";
message += Localization.GetString("InvalidPassword", LocalResourceFile);
}
string strServerPath = Globals.GetAbsoluteServerPath(Request);
 
//Set Portal Alias for Child Portals
if (String.IsNullOrEmpty(message))
{
if (blnChild)
{
strChildPath = strServerPath + strPortalAlias;
 
if (Directory.Exists(strChildPath))
{
message = Localization.GetString("ChildExists", LocalResourceFile);
}
else
{
if (!Globals.IsHostTab(PortalSettings.ActiveTab.TabID))
{
strPortalAlias = Globals.GetDomainName(Request, true) + "/" + strPortalAlias;
}
else
{
strPortalAlias = strPortalName;
}
}
}
}
 
//Get Home Directory
string homeDir = "";
 
//Validate Home Folder
if (!string.IsNullOrEmpty(homeDir))
{
if (string.IsNullOrEmpty(String.Format("{0}\\{1}\\", Globals.ApplicationMapPath, homeDir).Replace("/", "\\")))
{
message = Localization.GetString("InvalidHomeFolder", LocalResourceFile);
}
if (homeDir.Contains("admin") || homeDir.Contains("DesktopModules") || homeDir.ToLowerInvariant() == "portals/")
{
message = Localization.GetString("InvalidHomeFolder", LocalResourceFile);
}
}
 
//Validate Portal Alias
if (!string.IsNullOrEmpty(strPortalAlias))
{
PortalAliasInfo portalAlias = PortalAliasController.GetPortalAliasLookup(strPortalAlias.ToLower());
if (portalAlias != null)
{
message = Localization.GetString("DuplicatePortalAlias", LocalResourceFile);
}
}
 
//Create Portal
if (String.IsNullOrEmpty(message))
{
//Attempt to create the portal
var objAdminUser = new UserInfo();
int intPortalId;
try
{
                            // These parameters are required to assign admin to the portal
objAdminUser.FirstName = strFirstName;
objAdminUser.LastName = strLastName;
objAdminUser.Username = strUsername;
objAdminUser.DisplayName = strFirstName + " " + strLastName;
objAdminUser.Email = strEmail;
objAdminUser.IsSuperUser = false;
 
objAdminUser.Membership.Approved = true;
objAdminUser.Membership.Password = strPassword;
objAdminUser.Membership.PasswordQuestion = strQuestion;
objAdminUser.Membership.PasswordAnswer = strAnswer;
 
objAdminUser.Profile.FirstName = strFirstName;
objAdminUser.Profile.LastName = strLastName;
 
intPortalId = objPortalController.CreatePortal(tbTitle.Text,
objAdminUser,
tbDescription.Text,
"",
template,
homeDir,
strPortalAlias,
strServerPath,
strChildPath,
blnChild);
 
//Clears the cache
DotNetNuke.Common.Utilities.DataCache.ClearPortalCache(PortalId, false);
}
catch (Exception ex)
{
intPortalId = Null.NullInteger;
message = ex.Message;
}
                        // Sends email on portal creation
SendMailOnPortalCreation(intPortalID, strEmail, strPortalAlias, objAdminUser);
}
 
DotNetNuke.UI.Skins.Skin.AddModuleMessage(this, "", message, messageType);
 
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}

The motivation behind this technique to send email on effective creation of child portal. The sending of email obliges legitimate SMTP settings in the DNN site.

private void SendMailOnPortalCreation(int intPortalID, string strEmail, string strPortalAlias, UserInfo objAdminUser)
{
try
{
if (intPortalId != -1)
{
//Create a Portal Settings object for the new Portal
PortalInfo objPortal = objPortalController.GetPortal(intPortalId);
var newSettings = new PortalSettings { PortalAlias = new PortalAliasInfo { HTTPAlias = strPortalAlias }, PortalId = intPortalId, DefaultLanguage = objPortal.DefaultLanguage };
string webUrl = Globals.AddHTTP(strPortalAlias);
try
{
if (!Globals.IsHostTab(PortalSettings.ActiveTab.TabID))
{
message = Mail.SendMail(PortalSettings.Email,
strEmail,
PortalSettings.Email + ";" + Host.HostEmail,
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_SUBJECT", objAdminUser),
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_BODY", objAdminUser),
"",
"",
"",
"",
"",
"");
}
else
{
message = Mail.SendMail(Host.HostEmail,
strEmail,
Host.HostEmail,
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_SUBJECT", objAdminUser),
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_BODY", objAdminUser),
"",
"",
"",
"",
"",
"");
}
}
catch (Exception exc)
{
Exceptions.ProcessModuleLoadException(this, exc);
 
closePopUpStr = (PortalSettings.EnablePopUps) ? "onclick=\"return " + UrlUtils.ClosePopUp(true, webUrl, true) + "\"" : "";
message = string.Format(Localization.GetString("UnknownSendMail.Error", LocalResourceFile), webUrl, closePopUpStr);
}
var objEventLog = new EventLogController();
objEventLog.AddLog(objPortalController.GetPortal(intPortalId), PortalSettings, UserId, "", EventLogController.EventLogType.PORTAL_CREATED);
 
//Redirect to this new site
if (message == Null.NullString)
{
 
//webUrl = (PortalSettings.EnablePopUps) ? UrlUtils.ClosePopUp(true, webUrl, false) : webUrl;
Response.Redirect(webUrl, true);
}
else
{
closePopUpStr = (PortalSettings.EnablePopUps) ? "onclick=\"return " + UrlUtils.ClosePopUp(true, webUrl, true) + "\"" : "";
message = string.Format(Localization.GetString("SendMail.Error", LocalResourceFile), message, webUrl, closePopUpStr);
messageType = ModuleMessage.ModuleMessageType.YellowWarning;
}
}
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}

Conclusion:

By utilizing the above procedure simply make the child portals in DNN. Assuredly, this post describes the procedure clearly and and useful for you

 

Best Recommended DotNetNuke Hosting

ASPHostPortal.com is the leading provider of Windows hosting and affordable DotNetNuke Hosting. DotNetNuke Hosting from ASPHostPortal.com provides a safe, reliable and performance-driven foundation for your DotNetNuke website. DotNetNuke is the perfect Content Management System for managing and developing your website with one of ASPHostPortal’s Hosting plans. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability



DotNetNuke Hosting - ASPHostPortal.com :: How To Integrating your Zoom search page into DNN

clock March 15, 2015 11:36 by author Mark

Integrating your Zoom search page into DNN

At this point, you should have a working search page which you can access and perform search queries on as seen above. You can use your search page just as it is, and simply modify the "search_template.html" file to match the look of your site. However, if you want to further integrate the search page inside your DNN website (so that it will maintain the same skinning and various modules you are using), then read on.
First, we need to "Add" a new page in DNN to serve as your new Search Page. This will contain a search form, and your search results. You can name this something appropriate like "Site search".
On this new page, we will need to add an IFRAME module (if you do not see "IFRAME module" in the Modules list, you will need to login as "host" and "Find/Install additional modules"). You can title this added module as "Search" or something similar. Now click on the "Edit IFrame Options" button.
Here you should specify the Link Type as a URL, and copy and paste the URL of your working search page (from before) in the "Location:" text box as seen below. For the width, specify "100%" and we recommend a decent height of something around 600 pixels (or enable Auto height if your search page is on the same domain as your DNN site).

 

Next, click on the expand box next to the "QueryString Parameters" heading. We will need to add all the parameters that Zoom will use so that the page can pass these parameters along to the actual "search.asp" script within the IFrame. Click on the "Add QueryString Parameter" link and specify the following:

 

This allows the main search query to be passed to this page. If you would like to have more parameters in your custom search forms (search forms that you will place on other pages of your site), then you will need to add them here as well. If you are not familiar with the idea of the custom search form or what other parameters are necessary, don't worry, as this will be explained a little later below and you can come back here to add more parameters as needed.

 

Now click "Save" to return to your search page. You should now see your Zoom search page loaded within the IFrame of your DNN search page!

 

Run a few test searches and you should find that everything should be working within your new DNN search page.
If you wish to modify the text or layout (or the colours and fonts of the search results) within the IFrame, you will need to change the "search_template.html" file. Please see chapter 6 of the Users Guide ("How do I customize the look of my search page?") for more information.

Note: You may notice that when you click on a search result, the link opens within the IFrame of the search page. If you wish to change this behaviour, go to the Zoom Configuration window, and select the "Search Page" tab. Under "Results linking", change the selected option to "Frame or window:" and enter "_top" (without the quote characters, but note that the underscore is important) in the text box next to this option. Re-index your website and upload the files for this change to take effect. You will now find your search result links will open outside of the IFrame.

Additional note: If you make the IFRAME very tall, you'll find that when you click on the "Next >>" results link down at the bottom of the search results page, the browser would not scroll back to the top of the frame automatically. To fix this, edit your "search_template.html" file and replace the <body> tag with the following:

<body onload="location.href='#'">

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.



About ASPHostPortal.com

We’re a company that works differently to most. Value is what we output and help our customers achieve, not how much money we put in the bank. It’s not because we are altruistic. It’s based on an even simpler principle. "Do good things, and good things will come to you".

Success for us is something that is continually experienced, not something that is reached. For us it is all about the experience – more than the journey. Life is a continual experience. We see the Internet as being an incredible amplifier to the experience of life for all of us. It can help humanity come together to explode in knowledge exploration and discussion. It is continual enlightenment of new ideas, experiences, and passions


Author Link


Corporate Address (Location)

ASPHostPortal
170 W 56th Street, Suite 121
New York, NY 10019
United States

Tag cloud

Sign in