DotNetNuke Hosting with ASPHostPortal.com

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

DotNetNuke - ASPHostPortal.com :: Install module extension in DotNetNuke

clock September 1, 2016 18:46 by author Armend

How to Install module extension in DotNetNuke ?

What is actually a module extension in DNN? A module extension can be considered as plugin program that you can install on your site. Just imagine you have a car and you want to add a new sound system to your car, this new sound system can be considered as a plugin module to enhance your car looks and feeling.
To install a module extension in DNN, you will need to use a host account known super user account. Once login on the site, you will have a menu called host. Under this menu, you will find a menu called Extensions. Please click this menu.

A page contains extension modules list will appear.

Click the browse button to select the installation file. The installation file in DNN must in .zip format.

Click the Next button and you will be able to see the details of the extension specification.

If there is a release note, you will be able to see the what updates or changes that have been made.

If there is a license note, you will be able to review it as well. Tick the checkbox and click Next button to accept the license.

The installation will be fully completed if you do not see any warning or red text in the scrolling installation summary process

 

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 - ASPHostPortal.com :: Registered Script Control Error in DotNetNuke 8

clock August 25, 2016 19:08 by author Armend

If you’ve made the transition from DotNetNuke 7 to DotNetNuke 8 you’ve probably discovered that the AJAX Toolkit controls don’t play nice with DotNetNuke any more.  Fortunately the Telerik AJAX controls have been bundled with DotNetNuke for version 8.  I’ve discovered that converting to the Telerik controls has been beneficial and worth the upgrade.
Still, it can be a pain getting the code right.  One particular error that I ran into today was the Registered Script Control error.  It looks something like this:

 

"Script control ‘{controlname}’ is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().  Parameter name: scriptControl"

The error results from “stacked” AJAX controls.  Consider the following HTML

<%@ Register TagPrefix=”dnnui” Namespace=”DotNetNuke.Web.UI.WebControls” Assembly=”DotNetNuke.Web” %>
<%@ Register TagPrefix=”DNN” Namespace=”DotNetNuke.UI.WebControls” Assembly=”DotNetNuke.WebControls” %>
   <DNN:DNNTabStrip ID=”tabsProject” runat=”server” TabRenderMode=”All” Visible=”true”>
     <DNN:DNNTab runat=”server” Label-Text=”Properties” ID=”tabGeneral”>
       <dnnui:DnnAjaxPanel runat=”server” ID=”dapMain”>
         <asp:Label runat=”server” ID=”lblInfo”></asp:Label>
       </dnnui:DnnAjaxPanel>
   </DNN:DNNTab>
     <DNN:DNNTab runat=”server” Label-Text=”Properties” ID=”tabSecond”>
       <dnnui:DnnAjaxPanel runat=”server” ID=”dapSecond”>
         <asp:Label runat=”server” ID=”lblMessage”></asp:Label>
       </dnnui:DnnAjaxPanel>
   </DNN:DNNTab>
      </DNN:DNNTabStrip>

Let’s say that the second tab (tabSecond) should only appear under certain conditions; a record was created, a particular user is logged, whatever the condition is doesn’t matter, just that the tab should appear at certain times and not appear at other times.
In the code behind the condition block might look like this:

if (condition) then
tabSecond.Visible = False
end if

But this results in the Registered Script Control error.  Modify the condition block this way:

if (condition) then
dapSecond.EnableAJAX = False
tabSecond.Visible = False
end if

This should resolve the error

What was the issue?  I’m glad you asked.
The issue causing the error is that AJAX controls are registered with the AJAX script manager and cannot be unregistered, or moved.  Hiding an AJAX control is equivalent to moving it from the script.  In order to circumvent that we’re disabling AJAX on the control before it has a chance to be rendered and registered with the script manager.

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 - ASPHostPortal.com :: Tips To Setting up your DotNetNuke MDE

clock August 18, 2016 20:09 by author Armend

In this post I will explains about how setting up your DotNetNuke module development environment. Setting up your development environment can vary based on what your end goal is. If you are doing module development for your own use, and within your own DNN environments, you can ignore a few of the settings below. If you are doing module development with the idea that you might turn around and give the modules away, or sell them, then you will likely want to follow the guidelines set forth below to support the widest array of DNN installation environments.
I recommend that each developer have their own local development environment, with a local IIS website running DotNetNuke, and a SQL Server 2008/2012 (not express, though you can use it) database for the website. Having an individual development environment makes group module development far easier than if you share environments/databases.

 

Choosing a DotNetNuke Version

Choosing a version of DotNetNuke is important when you start your development for couple of reasons. For modules that you are developing for yourself, you need to ask, what is the minimum version of DotNetNuke that you have in production. Are you running DNN 5.6.1? Are you running 6.2.6, 7.0.0, 7.0.6? Based on the answer you can determine what version of DNN you should setup as your development environment. You shouldn't be developing on a newer version of DNN than what you have running in production. As with everything there are ways around this, but I am not going to go into the details on that in this tutorial.

As a developer working to create modules and release those, you might have production sites that are running on the latest and greatest version of DNN, but what about your customers? Or your potential customers? You have to ask yourself, do you want to provide support for really old versions of DotNetNuke? From a development perspective you will probably say no, but from a business perspective, you might say yes, and here’s why. Not everyone upgrades DotNetNuke websites as they should, and often times you will find that some people never upgrade. While I don’t advise taking that approach to managing a DotNetNuke website, it is a fact of life that people don’t always upgrade and there are thousands of people, if not tens of thousands, that have sites that aren’t running on the latest version of DNN. You should take that into account when you are doing your module development, if you compile your module against an older version of DNN then your module should run on newer versions of as well, for example. If you compile your module against DotNetNuke 6.2.6 it will likely run on every version of DNN released since then. Though there are extended cases where this won’t always work, DNN strives to maintain backwards compatibility, this isn't always possible.

You might also want to use features that are only available starting with a specific version of DotNetNuke, such as the workflow functionality found starting in DNN 5.1, in that case you may choose not to support older versions of the platform out of necessity. This will minimize the market in which you can sell your modules, but also can make for less support and an easier development cycle due to the features that DNN provides.

Choosing a Package

Now here’s one that may baffle you a bit. I’m going to recommend that you use the INSTALL package for whatever version of DotNetNuke that you download. What? The INSTALL package? What about the SOURCE package? Well you can use the source, but you don’t need it. The module development that I’m setting you up for doesn't require the DNN source, and using the INSTALL package makes your development environment cleaner. We aren't going to be opening the DotNetNuke project when we do our module development, so why have the files sitting around for nothing? Also, if you've ever tried to use the SOURCE package for anything, you'll know it isn't easy.
The steps for setting up your development environment will apply to both the Community and Professional editions of DotNetNuke.

Installation Configuration

Once you have the version selection out of the way you can go through the installation process. While I’m not going to walk you through the minutest of details of each step of installing DotNetNuke in this post, I will at least try to point you in the right direction for each step.

Download the INSTALL package of the version of DotNetNuke you want to use in your development environment.

Extract the files in the INSTALL package to a location of your choosing, this location is where you will point IIS (the web server) when we can configure the website. In my environment I typically use c:\websites\dnnxxx.me\ (One item of note: you may need to right click on the ZIP file and choose Properties before extracting, on the properties window if you have an UNBLOCK option, click that. Some versions of Windows have started blocking files within the DotNetNuke ZIP files, which will cause you problems later during the actual install.)

Setup IIS

IIS is the web server that comes with Windows computers. DNN 7 requires IIS 7 or later (7,7.5,8.0), so you will need at least Windows Vista, Windows 7, Windows 8, or Windows Server 2008 R2, Windows Server 2012.

In IIS you should create a new website (Note: If you use an existing website in IIS be sure to add the HOST binding for DNNxxx.ME), and point to the folder where you extracted the INSTALL package.

Note: With DotNetNuke 7.0+, .NET Framework 4.0 is required, so be sure that your application pool is configured to run under 4.0, and not 2.0.

Set File Permissions

Setting up the file permissions for your DNN install is often the step that causes the most trouble. You should right click on the FOLDER in which you extracted DNN (c:\websites\dnnxxx.me\) and choose properties. Choose the Security tab. You need to add permissions for the account in which your website's application pool is running under. You will want to setup the permissions to give the account Full or Modify permissions for the DNNxxx.ME folder. Which account you will use will vary based on your version of IIS, here’s a simple list of some of the default accounts based on the version of IIS.

IIS Version Operating System Account

  • IIS 7 Windows Vista, Windows Server 2008 localmachine\Network Service
  • IIS 7.5 Windows 2008 R2, Windows 7 IIS AppPool\APPPOOLNAME
  • IIS 8 Windows 2012, Windows 8 IIS AppPool\APPPOOLNAME

Note: If you are using IIS7.5/8.0 you’ll notice in the above table that we have APPPOOLNAME in the identity, this is because when you setup a new website in IIS a new application pool is created. In place of you should type in the name of the application pool that was created. You can also bypass this and configure your application pool to use the Network Service account instead of a dynamic account if you would like.

Database Configuration

In SQL Server you should go through and create a new database. I always create a database with the same name as the website, so in this case DNNxxx.ME. Once you have created the database, create a user that can access that database. I always use SQL authentication, turn off the enforce password requirements, and give the user DB Owner and Public access to the DNNxxx.ME database. Remember the username and password you create here as you will need them when you walk through the Installation screen for DotNetNuke.

DotNetNuke Installation Screen

Populate the installation screen with the standard DNN information, Host username, password, etc. For the Database option, choose Custom and configure your database connection, providing the Server IP/Name, the Database name (dnnxxx.me). For the database authentication you'll want to choose the option that allows you to enter the username/password for the database user that you created previously.

Now there are two additional options you can configure, normally I would tell you not to modify these, but from a development environment perspective I do recommend that you change the objectQualifier setting. It should be blank by default, you should type in “dnn” (without quotes), this will prepend “dnn_” to all of the objects that get created by DNN such as Tables and Stored Procedures. This is not something I recommend from a production stand point, but if you are developing modules for sale, then supporting objectQualifier in your development is recommended. It will save you time down the road if you have a customer who has an objectQualifier defined on their production databases.

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 - ASPHostPortal.com :: Enable Google Analytics on a DotNetNuke Website

clock August 11, 2016 20:15 by author Armend

In this post we will show you how to enable google Analytics on a DNN website. Google Analytics is one of those must-have tools when running a website.  The tasks of tracking traffic sources, browser versions, search terms, etc. are all made easy.  The developers of DotNetNuke have also made using Google Analytics on a DotNetNuke website simple.

 

Installing Google Analytics in DotNetNuke is a fairly common request from many individuals and I know it can be a quite troubling question for most. The primary questions are how and where can I put the javascript code provided by Google. Well you have a few options. First you could put the code directly in the skin for the site, the advantages to that would be that you will automatically have the code on all pages, however, the disadvantage is that you cannot use that skin as is on another portal due to the site specific Google information. I personally go the route of adding a text/html module to my site and set it to show on every page and insert the script in a very specific location which I will discuss below. There are a few drawbacks to this method. First you will not get any statistics information on traffic to "edit pages" where other modules are not displayed and you also will not receive information regarding administration modules. However, in most circumstances this shouldn't be an issue.

The best way to include this information is to include the information in the Module header of the text/html module. This is to prevent the accidental removal of the script code if you happen to click inside the module as an admin to enter in-line edit mode. Below I will walk you through the steps needed to implement Google Analytics using this method. (NOTE: you can extend this for other javascript integrations if needed).

Step By Step

  • Add a new Text/HTML module to a page of your site, you can position it anywhere, but I recommend the bottom of the page as administrative users will still see the module when they are logged in
  • Edit the text of the module to contain no text
  • Enter the module settings from the SolPart Action Menu
  • Expand the "Advanced Settings" section
  • Check the box next to "Display Module On All Pages?"
  • Insert your Javascript code in the "Header" box. This will ensure that the data is always retained
  • Now under "Page Settings" -> "Basic Settings" un-check the following boxes
    • Display Container
    • Allow Print
    • Allow Syndicate
  • Ensure that the "Cache Time" is set to 0 (Caching appeared to cause issues with this implementation in my testing)
  • Click "Update" to save your changes

This should complete the setup. You may now test to ensure everything is functioning correctly. You can log out as an administrator and view your site and no extra content should be displayed however if you look at the generated source you should see your javacript listed. Google Analytics should update within about 15 minutes to show that they are receiving your data.

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. 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.

 



DotNetNuke - ASPHostPortal.com :: How To Customizing Page Titles and Meta Data in DNN

clock August 4, 2016 20:23 by author Armend

How To  Customizing Page Titles and Meta Data in DNN

There are several key fields that search engines use in their ranking algorithms: page title (that’s the text you see in the title bar of the browser), meta description (that’s text describing your page to search engines, which your visitors don’t normally see) and ‘H’ tags, which are your H1/H2/H3 tags denoting which are the headers in your content.

How you do this in DNN:

The page title and description are stored in the Page Settings. Simply open up the page settings for the current page, and you can edit these directly. Here’s the steps:

  • Login as an Administrator, then go to the ‘Edit Page’ drop down on the top right hand side of the screen.
  • Choose ‘Page Settings’ from that menu, and it will load up the settings for the page you’re currently browsing.
  • To modify the page title, edit the value in the ‘Page Title’ field. In my example below, I’ve chosen some words that we can assume match the keywords/phrases that our fictitious bike company uses. Try and keep the length below about 70 characters so that, when it gets displayed in a Search Engine Results Page (SERP), you can see the whole title.
  • To change the Page Description, type into the ‘Description’ box. Remember that your visitors won’t see this on your site. The key to a good description is again hitting your keywords, but doing so in a way that actually reads well. If your page gets included in a SERP, it’s likely that the search engine will use the Page Description as the two or three line description for your page. Try and keep it to under 150 characters so that it stands a good chance of displaying nicely in a SERP listing, and the ratio of your keywords to the rest of the text is not too diluted.
  • When you’re finished, click ‘Update Page’ – the settings screen will close and you’re finished. (You’ll note on my example I didn’t bother with the Meta Tags at all)

Overview: H Tags

DNN doesn’t enforce the use of any particular H tag, so you’re free to edit one into your content however you like. It’s also possible to define a custom skin for your DNN site that shows a H1 for a specific page value (such as the module title for a piece of content).

I’d recommend leaving any ‘H’ tags out of your skin and just making sure that you define a H1 tag for each separate piece of content that you write (like a blog post title, for example). But others may disagree with me and just be happy to define a H1 tag using the page name of each page. I prefer to customize every bit of content for maximum impact – but this does take much, much longer.

To make something a ‘H1’ in DNN, here’s how you do it:
Use the ‘Edit this Page’ button in the ‘Edit Page’ dropdown to enter edit mode for the current page.

  1. Hover over the ‘Pencil’ edit icon and click on ‘Edit Content’
  2. Type in your header (or select an existing header with your mouse)
  3. Use the style drop down to select ‘Heading 1’

 

 

About ASPHostPortal.com:

ASPHostPortal.com is The Best, Cheap and Recommended ASP.NET & Linux Hosting. ASPHostPortal.com has ability to support the latest Microsoft, ASP.NET, and Linux technology, such as: such as: WebMatrix, Web Deploy, Visual Studio, Latest ASP.NET Version, Latest ASP.NET MVC Version, Silverlight and Visual Studio Light Switch, Latest MySql version, Latest PHPMyAdmin, Support PHP, etc. Their service includes shared hosting, reseller hosting, and Sharepoint hosting, with speciality in ASP.NET, SQL Server, and Linux solutions. Protection, trustworthiness, and performance are at the core of hosting operations to make certain every website and software hosted is so secured and performs at the best possible level.



DotNetNuke - ASPHostPortal.com :: 10 Tips For DotNetNuke Skins for SmartPhones

clock July 28, 2016 20:28 by author Armend

10 Tips For DotNetNuke Skins for SmartPhones

DotnetNuke skinning is changing with the latest trends one of which is building websites for smartphones and handheld devices like iPod, iPad, Android-based smartphones and many more. In this Article I have shared 10 tips which will be extremely useful for DotnetNuke Skinning for smartphones and most handheld devices.

 

Tip #1

basic mobile styles
html, body {
background: #fff;
color: #000;
margin: 0;
padding: 0;
font: 12px/15px sans-serif;
}


Do not rely on support of font related styling

Tip #2

No width content, careful with floats

  • {width: auto;}
  • {float: none;}

Tip #3

Setting the viewport

Add to <head> section
<meta name=”viewport” content=“width=device-width”/>
In DNN, add to default.ascx
<script language=”javascript” type=”text/javascript” >
var script = document.createElement(“meta”);
script.name = “viewport”;
script.content = “width=device-width”;
document.getElementsByTagName(“head”).item(0).appendChild(script);
</script>

Tip #4

keep it simple

  • What are mobile visitors looking for?
  • What information do they want/need?
  • Do mobile visitors have time/interest in all of my tedious sidebar content?
  • With a barebones stylesheet, which elements are clearly superfluous?
  • Which navigational elements are absolutely necessary? Which are redundant?
  • Are there entire regions of my page that would be better off not displayed?


Display only the essential no leftpane or right pane

.leftpane, .rightpane {
display: none;
}

Tip #5

top navigation (vertical)
.mi, .mi .txt {display:block !important; text-align:left; margin:0 !important;}

Tip #6

Control image width

#content img {max-width: 250px;}
or
img {max-width: 250px;}

Tip #7

Slim headings
h1, h2, h3, h4, h5, h6 {font-weight: normal;}

Tip #8

links
Highlight links


a:link, a:visited {
text-decoration: underline;
color: #0000CC;
}
a:hover, a:active {
text-decoration: underline;
color: #660066;
}
Use the tel: de facto standard
<a href=“tel:+1999999999“>Call us!</a>
Avoid target=_blank

Tip #9

Forms

  • Minimum input
  • Do not use tables for layout
  • Use definition lists (dl, dt, dd)

Tip #10

  • Keep URIs of site entry points short
    www.example.org/example.html accept example.org/example
  • careful with color contrasts
  • Use (minimum) web standards
    XHTML 1.0 / HTML 4.01 / XHTML-MP, CSS 2.1, DOM 1, ECMAScript 3
  • Always specify a doctype
  • Use standard media types
    Static: JPEG, GIF, PNG / Dynamic: 3GP, AVI, WMV, MP4

Do not use the following tags

  • × frames
  • × tables for layout
  • × nested tables
  • × image maps
  • × graphics for spacing
  • × horizontal scrolling
  • × do not rely on plug-ins, DHTML behaviors, embedded objects or script

 

 



DotNetNuke - ASPHostPortal.com :: How To installing DotNetNuke 8.0.3 using WebMatrix

clock July 21, 2016 20:58 by author Armend

DotNetNuke is a widely used open source CMS for building web sites and web applications on the Microsoft Web Platform. DotNetNuke is often used in conjunction with WebMatrix, a free tool that allows for the creation, customization and publication of ASP.NET web
The following tutorial will demonstrate how quick and easy it is to get your DotNetNuke application up and running!

Installing DotNetNuke

To install the DotNetNuke application from WebMatrix:

  1. Select the App Gallery option.
  2. Choose the DotNetNuke Community Edition icon. The application can be given a new name or keep the default name.
  3. Select a database.
  4. Choose SQL Server and ensure that the Windows Integrated Authentication radio button is selected.
  5. Click Next.
  6. Once prompted to install DotNetNuke, click I Accept. The DotNetNuke Installation will take a few minutes to complete. Once completed, you will receive a confirmation message.
  7. Immediately after Installing DotNetNuke, load the DotNetNuke application by clicking the OK button.

Configuring DotNetNuke

To configure DotNetNuke in WebMatrix, use the Installation Wizard to complete the following steps:

  • Click the Run button on the menu ribbon. Be sure to run the root folder of the DotNetNuke application.
  • Upon running the DotNetNuke application, there will be three options for installation:
    • Customer
    • Typical
    • Auto
  • For purposes of this article, the Typical installation will be used.
  • The Installation Wizard will perform a permissions check. Upon completion, you will be notified.
  • After the permissions check, enter your database information.
  • Once all of the database information is provided, the Installation Wizard will install the database and create the connection for you.

    Note: The installation of the database could take a few minutes to complete. Once installed, a confirmation message will be provided.

  • Once the confirmation message is received, click Next to proceed.
  • Provide your host information on the next screen.
  • Click Next.


Once the installation is complete, you will be able to log into your DotNetNuke portal.



DotNetNUke - ASPHostPortal.com ::How To Reset the Passwords for All Users in a DNN Site

clock June 30, 2016 20:01 by author Armend

How To Reset the Passwords for All Users in a DNN Site

Now, before I go any further, it would be an absolute best practice to have and you’d be irresponsible if you didn’t have a formal policy to protect yourself and the clients you’re providing services to.  Have a clear understanding of how you accept sites, how you maintain them, and when you destroy your copies of them.  If you’re in support, I’d suggest destroying your backups as soon as your client confirms that their issue is solved.  The rule of thumb here, don’t keep copies.  Destroy them at your earliest convenience.  That being said, I am not a lawyer either, so you’ll want to review your policies and the laws in your region.

Resetting the Passwords for All Users

The context of this DNN tip is to allow you access to literally impersonate the users on a DNN site.  If the number of users is low, I’d suggest leaving this article now to use my DNN Demo Skin Objects.  Seriously, they’re pretty cool.  You should check them out.
Ideally, it would be convenient if you knew all of the passwords of the users on the site, but we won’t and we shouldn’t.  Instead, we’ll change every password for every user to “password” using the ASPX file below.  All you have to do is create an ASPX file in the root of the site, paste this code into it, and then view it in a web browser of your choice.  From there, it’s a single click to reset all of the passwords to “password.”

WARNING!!!  Never do this on a production site for any reason or put this file on a production server, anywhere.  Also, it should only be used for LEGAL and ETHICAL purposes.
The code below does the meat of the work for you, but you can just download the file by clicking the button below and save yourself some time.  

private int PortalId
    {
        get
        {
            return PortalController.GetCurrentPortalSettings().PortalId;
        }
    }
    protected void ProcessUsers(object sender, EventArgs e)
    {
        try
        {
            IterateThroughUsers();
        }
        catch (Exception ex)
        {
            Exceptions.ProcessModuleLoadException(this, ex, true);
        }
    }
    private void IterateThroughUsers()
    {
        var sb = new StringBuilder();
        var totalRecords = 0;
        sb.Append("
Updating Superusers
");
        var superUsers = UserController.GetUsers(false, true, Null.NullInteger);
        UpdateUserInfo(superUsers, ref sb);
        sb.Append("
Updating Normal Users
");
        var normalUsers = UserController.GetUsers(PortalId, -1, -1, ref totalRecords, true, false);
        UpdateUserInfo(normalUsers, ref sb);
        plcUserLog.Controls.Add(new LiteralControl(sb.ToString()));
    }
    private void UpdateUserInfo(ArrayList users, ref StringBuilder sb)
    {
        foreach (var user in users)
        {
            // convert the user object to UserInfo
            var oUser = (UserInfo)user;

            // update the password
            // REQUIRES: Change the enablePasswordRetrieval attribute to True in the web.config
            // for newer versions of DNN, use this:
            //MembershipProvider.Instance().ResetAndChangePassword(oUser, "password");
            var success = DotNetNuke.Security.Membership.MembershipProvider.Instance().ChangePassword(oUser, string.Empty, "password");
            sb.AppendFormat(
                success
                    ? "
{0} {1} ({2}) updated with a new password.
"
                    : "
{0} {1} ({2}) NOT UPDATED!
", oUser.FirstName, oUser.LastName,
                oUser.Username);
            // save the user
            UserController.UpdateUser(PortalId, oUser, false);
        }
    }

I hope this article helpful for you, happy Coding :)



DotNetNuke - ASPHostPortal.com :: Tips To Add jQuery To your DotNetNuke Skin

clock June 23, 2016 20:30 by author Armend

Tips To Add jQuery To your DotNetNuke Skin

At this point you’ll be hard pressed to find a site that does not use jQuery. It has become a requirement for many to bring flash like experience in the form of photo sliders or fast responding ajax applications.
Over that time adding jQuery to DotNetNuke (DNN) has not always been straight forward. DNN ships jQuery as part of the core framework and you might assume that it’s always available. But one of the most widely unknown issues is that it must be requested on every page in order for it to be available.

 

Common Symptoms:

  • Main menu does not show sub items.
  • Homepage slider does not rotate.
  • Layout is malformed.
  • Works fine when logged in but not when logged out.

When you login as an administrator jQuery will always be available since the control panel bar request it. However if you logout on that same page it might not have been requested by any module or skin object on that page.

Not Recommended Ways To Add jQuery

  • Do Not: Add script tag into page settings or in your skin file.
  • Why? This will potentially add multiple jQuery reference to your page. The real issue is if any plugins are registered between the first reference and the second reference they won’t be available after the second reference is instantiated.

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Recommended Way To Add jQuery

In your skin file you you can reference and add the control for jQuery. This will ensure that jQuery is available on every single page and that it will only be referenced one time. You also get the benefit of the Client Dependency Framework (CDF).

<%@ Register TagPrefix="dnn" TagName="jQuery" src="~/Admin/Skins/jQuery.ascx" %>
<dnn:jQuery runat="server"></dnn:jQuery>

You can optionally add public properties to register jQuery UI, DNN jQuery Plugins and Hover Intent.

<dnn:jQuery runat="server" jQueryUI="true" DnnjQueryPlugins="true" jQueryHoverIntent="true"></dnn:jQuery>

Note: The search skin object will also register jQuery.



DotNetNUke - ASPHostPortal.com :: How To Create An Announcement With A Slider

clock June 8, 2016 20:57 by author Armend

DotNetNuke has come a long way recently with making things much more w3 compliant. This has allowed for more than just cleaner code; it has also allowed for much more control of your website through jQuery and CSS. Also, according to the forums, it looks like things are getting even better for compliance and control. In this tutorial, we will tell you how to create an announcement with a slider in DotNetNuke.

 

One of our favorite updates of DNN modules to this new compliance, is the DNN Announcements module. With the latest release, we now have the ability to set up the announcements as a list and apply some cool jQuery to it. We decided that we wanted to have the main image fade in and out and the title and description to slide in from the bottom. We came across the s3Slider jQuery plugin which seemed to provide exactly what I was looking for. We have outlined the steps below on how to add it to your DotNetNuke site.

The HTML

  • Add the Announcements module to your page.
  • Click the “Settings” link.
  • Expand the “Announcements Settings”
  • Remove exisiting code from Header Template, Item Template, and Footer Template.
  • In the “Header Template:” text area, enter the following code:

<div id="s3slider">
<ul id="s3sliderContent">

  • In the “Item Template:” text area, enter the following code:

If you want your description area to be at the top of the image area, use the class top in the span.
If you want your description area to be at the bottom of the image area, use the class bottom in the span as I have here.

<li class="s3sliderImage">
[IMAGESOURCE]<span class="bottom"><strong>[TITLE][EDIT]</strong><br />
[DESCRIPTION]<br />
[READMORE]</span>
</li>

  • In the “Footer Template:” text area, enter the following code:

<li class="clear s3sliderImage"></li>

  • Also, in the “Footer Template” area close out the ul and div that was started in the “Header Template” area

The CSS

In your skin.css file, insert the following styles: (note the widths and heights in the CSS. They need to be exactly the same as the image for the announcemnts.)

#s3slider { width: 500px; height: 242px; position: relative; overflow: hidden;}
#s3sliderContent { width: 500px; position: absolute; top: 0; margin-left: 0;}
.s3sliderImage { float: left; position: relative; display: none;}
.s3sliderImage span { position: absolute; font: 14px/21px Arial, Helvetica, sans-serif; padding: 10px 13px;  width: 500px; background-color: #000; filter: alpha(opacity=70); -moz-opacity: 0.7; -khtml-opacity: 0.7; opacity: 0.7; color: #fff; display: none;}
.top { top: 0; left: 0;}
.bottom { bottom: 0; left: 0;}

The jQuery

Now that we have all of that in place, we can add the jQuery to make it work.

  • Include a refrence to jQuery in your skin. This is already done if widgets are inabled on your site.
  • Download the files from the s3Slider site. http://www.serie3.info/s3slider (link opens in new window)
  • Upload the s3Slider.js file to your skin folder.
  • In your skin file (for example: skin.ascx), enter the following code: (you can put this at the top or the bottom of your skin)

<script type="text/javascript" src="<%= SkinPath%>s3Slider.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
       $('#s3slider').s3Slider({
          timeOut: 7000
       });
    });
</script>

  • Now just start adding the content of your announcements! Be sure to make your images the same size as what is set in the CSS.

DotNetNuke Hosting Recommendation

ASPHostPortal.com

ASPHostPortal.com is Perfect, they have a suitable hosting plan for a starter in DotNetNuke Hosting. ASPHostPortal is the leading provider of Windows hosting and affordable ASP.NET Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. 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.

 



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